1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| package org.apache.xindice.client.xmldb.services; |
21 |
| |
22 |
| import org.apache.xindice.client.xmldb.CommonConfigurable; |
23 |
| import org.apache.xindice.client.xmldb.XindiceCollection; |
24 |
| import org.apache.xindice.core.meta.MetaData; |
25 |
| |
26 |
| import org.xmldb.api.base.Collection; |
27 |
| import org.xmldb.api.base.Service; |
28 |
| import org.xmldb.api.base.XMLDBException; |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| |
34 |
| |
35 |
| |
36 |
| public class MetaService extends CommonConfigurable implements Service { |
37 |
| |
38 |
| |
39 |
| |
40 |
| |
41 |
| private Collection collection; |
42 |
| |
43 |
3418
| public String getVersion() {
|
44 |
3418
| return "1.0";
|
45 |
| } |
46 |
| |
47 |
3418
| public String getName() {
|
48 |
3418
| return "MetaService";
|
49 |
| } |
50 |
| |
51 |
3418
| public void setCollection(Collection collection) {
|
52 |
3418
| this.collection = collection;
|
53 |
| } |
54 |
| |
55 |
21
| public MetaData getMetaData() throws XMLDBException {
|
56 |
21
| return ((XindiceCollection) collection).getMetaData(null);
|
57 |
| } |
58 |
| |
59 |
6
| public void setMetaData(MetaData meta) throws XMLDBException {
|
60 |
6
| ((XindiceCollection) collection).setMetaData(null, meta);
|
61 |
| } |
62 |
| |
63 |
33
| public MetaData getMetaData(String id) throws XMLDBException {
|
64 |
33
| return ((XindiceCollection) collection).getMetaData(id);
|
65 |
| } |
66 |
| |
67 |
12
| public void setMetaData(String id, MetaData meta) throws XMLDBException {
|
68 |
12
| ((XindiceCollection) collection).setMetaData(id, meta);
|
69 |
| } |
70 |
| |
71 |
0
| public long getLastModifiedTime() throws XMLDBException {
|
72 |
0
| return ((XindiceCollection) collection).getMetaData(null).getLastModifiedTime();
|
73 |
| } |
74 |
| |
75 |
0
| public long getCreatedTime() throws XMLDBException {
|
76 |
0
| return ((XindiceCollection) collection).getMetaData(null).getCreatedTime();
|
77 |
| } |
78 |
| |
79 |
0
| public long getLastModifiedTime(String name) throws XMLDBException {
|
80 |
0
| return ((XindiceCollection) collection).getMetaData(name).getLastModifiedTime();
|
81 |
| } |
82 |
| |
83 |
0
| public long getCreatedTime(String name) throws XMLDBException {
|
84 |
0
| return ((XindiceCollection) collection).getMetaData(name).getCreatedTime();
|
85 |
| } |
86 |
| } |