0
|
1 package de.mpiwg.itgroup.eSciDoc.utils;
|
|
2 import java.util.Iterator;
|
|
3
|
|
4 import javax.xml.XMLConstants;
|
|
5 import javax.xml.namespace.NamespaceContext;
|
|
6
|
|
7
|
|
8 public class EScidocNameSpaceContext implements NamespaceContext {
|
|
9 static public String escidocItem="http://www.escidoc.de/schemas/item/0.7";
|
|
10 static public String MPIWG = "http://www.mpiwg-berlin.mpg.de/ns/mpiwg";
|
|
11 static public String prop="http://escidoc.de/core/01/properties/";
|
|
12 static public String escidocComponents="http://www.escidoc.de/schemas/components/0.7";
|
|
13 static public String xlink="http://www.w3.org/1999/xlink";
|
|
14 static public String metadataRecords="http://www.escidoc.de/schemas/metadatarecords/0.4";
|
|
15 public static final String DC = "http://purl.org/dc/elements/1.1/";
|
|
16 public static final String container="http://www.escidoc.de/schemas/container/0.7";
|
|
17 public static final String item="http://www.escidoc.de/schemas/item/0.7";
|
|
18 public static final String srw="http://www.loc.gov/zing/srw/";
|
|
19 public static final String version = "http://escidoc.de/core/01/properties/version/";
|
|
20
|
|
21 public String getNamespaceURI(String prefix) {
|
|
22 if (prefix.equals("escidocItem"))
|
|
23 return escidocItem;
|
|
24 else if (prefix.equals("mpiwg"))
|
|
25 return MPIWG;
|
|
26 else if (prefix.equals("escidocComponents"))
|
|
27 return escidocComponents;
|
|
28 else if (prefix.equals("prop"))
|
|
29 return prop;
|
|
30 else if (prefix.equals("xlink"))
|
|
31 return xlink;
|
|
32 else if (prefix.equals("metadata-records"))
|
|
33 return metadataRecords;
|
|
34 else if (prefix.equals("dc"))
|
|
35 return DC;
|
|
36 else if (prefix.equals("container"))
|
|
37 return container;
|
|
38 else
|
|
39 return XMLConstants.NULL_NS_URI;
|
|
40
|
|
41
|
|
42 }
|
|
43
|
|
44 public String getPrefix(String namespaceURI) {
|
|
45 if (namespaceURI.equals(escidocItem))
|
|
46 return "escidocITem";
|
|
47 else if (namespaceURI.equals(MPIWG))
|
|
48 return "mpiwg";
|
|
49 else if (namespaceURI.equals(prop))
|
|
50 return "prop";
|
|
51 else if (namespaceURI.equals(escidocComponents))
|
|
52 return "escidocComponents";
|
|
53 else if (namespaceURI.equals(xlink))
|
|
54 return "xlink";
|
|
55 else if (namespaceURI.equals(metadataRecords))
|
|
56 return "metadata-record";
|
|
57 else if (namespaceURI.equals(DC))
|
|
58 return "dc";
|
|
59 else if (namespaceURI.equals(container))
|
|
60 return "container";
|
|
61 else
|
|
62 return null;
|
|
63 }
|
|
64
|
|
65 public Iterator getPrefixes(String namespaceURI) {
|
|
66 // TODO Auto-generated method stub
|
|
67 return null;
|
|
68 }
|
|
69
|
|
70 }
|