|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| package org.apache.xindice.xml; |
|
21 |
| |
|
22 |
| import org.apache.xindice.core.Collection; |
|
23 |
| import org.apache.xindice.core.data.Key; |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| public final class NodeSource { |
|
32 |
| |
|
33 |
| public static final String SOURCE_NS = "http://xml.apache.org/xindice/Query"; |
|
34 |
| public static final String SOURCE_COL = "col"; |
|
35 |
| public static final String SOURCE_KEY = "key"; |
|
36 |
| public static final String SOURCE_COUNT = "count"; |
|
37 |
| public static final String SOURCE_MODIFIED = "modified"; |
|
38 |
| |
|
39 |
| private Collection collection = null; |
|
40 |
| private Key key = null; |
|
41 |
| |
|
42 |
| |
|
43 |
71145
| public NodeSource(Collection collection, Key key) {
|
|
44 |
71145
| this.collection = collection;
|
|
45 |
71145
| this.key = key;
|
|
46 |
| } |
|
47 |
| |
|
48 |
0
| public NodeSource(Collection collection) {
|
|
49 |
0
| this.collection = collection;
|
|
50 |
| } |
|
51 |
| |
|
52 |
519
| public Collection getCollection() {
|
|
53 |
519
| return collection;
|
|
54 |
| } |
|
55 |
| |
|
56 |
561
| public Key getKey() {
|
|
57 |
561
| return key;
|
|
58 |
| } |
|
59 |
| |
|
60 |
0
| public String getCanonicalName() {
|
|
61 |
0
| if (key != null) {
|
|
62 |
0
| return collection.getCanonicalDocumentName(key);
|
|
63 |
| } else { |
|
64 |
0
| return collection.getCanonicalName();
|
|
65 |
| } |
|
66 |
| } |
|
67 |
| } |