annotate src/de/mpiwg/itgroup/eSciDoc/Tools/EScidocTools.java @ 2:fab8e78184fa

minor
author dwinter
date Mon, 10 Jan 2011 12:42:27 +0100
parents c6929e63b0b8
children 58b52df9763c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c6929e63b0b8 first import
dwinter
parents:
diff changeset
1 package de.mpiwg.itgroup.eSciDoc.Tools;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
2
c6929e63b0b8 first import
dwinter
parents:
diff changeset
3 import java.io.ByteArrayInputStream;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
4 import java.io.IOException;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
5 import java.io.InputStream;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
6 import java.util.List;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
7
c6929e63b0b8 first import
dwinter
parents:
diff changeset
8 import org.apache.http.HttpResponse;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
9 import org.apache.http.client.ClientProtocolException;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
10 import org.jdom.JDOMException;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
11 import org.jdom.xpath.XPath;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
12
c6929e63b0b8 first import
dwinter
parents:
diff changeset
13 import de.mpiwg.itgroup.eSciDoc.utils.eSciDocXmlObject;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
14
c6929e63b0b8 first import
dwinter
parents:
diff changeset
15 public class EScidocTools {
c6929e63b0b8 first import
dwinter
parents:
diff changeset
16 public static final String DC = "http://purl.org/dc/elements/1.1/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
17 private static final String OAI = "http://www.openarchives.org/OAI/2.0/oai_dc/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
18 static public String FOXML = "info:fedora/fedora-system:def/foxml#";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
19 static public String VLP = "http://www.mpiwg-berlin.mpg.de/ns/vlp";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
20 static public String MPIWG = "http://www.mpiwg-berlin.mpg.de/ns/mpiwg";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
21 static public String RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
22 static public String FEDORA = "info:fedora/fedora-system:def/relations-external#";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
23 static public String escidocItem="http://www.escidoc.de/schemas/item/0.9";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
24 static public String prop="http://escidoc.de/core/01/properties/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
25 static public String escidocComponents="http://www.escidoc.de/schemas/components/0.9";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
26 static public String xlink="http://www.w3.org/1999/xlink";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
27 static public String metadataRecords="http://www.escidoc.de/schemas/metadatarecords/0.5";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
28 public static final String container="http://www.escidoc.de/schemas/container/0.8";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
29 public static final String item="http://www.escidoc.de/schemas/item/0.7";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
30 public static final String srw="http://www.loc.gov/zing/srw/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
31 public static final String version = "http://escidoc.de/core/01/properties/version/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
32 public static final String ECHO="http://www.echo.eu/rdf#";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
33 public static final String cmm="http://www.escidoc.de/schemas/contentmodel/0.1";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
34 public static final String zs="http://www.loc.gov/zing/srw/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
35 public static final String srel="http://escidoc.de/core/01/structural-relations/";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
36 public static final String structMap="http://www.escidoc.de/schemas/structmap/0.4";
c6929e63b0b8 first import
dwinter
parents:
diff changeset
37
c6929e63b0b8 first import
dwinter
parents:
diff changeset
38 public EScidocTools(EScidocBasicHandler connector) {
c6929e63b0b8 first import
dwinter
parents:
diff changeset
39 // TODO Auto-generated constructor stub
c6929e63b0b8 first import
dwinter
parents:
diff changeset
40 }
c6929e63b0b8 first import
dwinter
parents:
diff changeset
41
c6929e63b0b8 first import
dwinter
parents:
diff changeset
42
c6929e63b0b8 first import
dwinter
parents:
diff changeset
43
c6929e63b0b8 first import
dwinter
parents:
diff changeset
44
c6929e63b0b8 first import
dwinter
parents:
diff changeset
45
c6929e63b0b8 first import
dwinter
parents:
diff changeset
46 public static XPath getESciDocXpath(String xpath) throws JDOMException{
c6929e63b0b8 first import
dwinter
parents:
diff changeset
47 XPath xpathResources = XPath.newInstance(xpath);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
48 xpathResources.addNamespace("prop",prop);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
49 xpathResources.addNamespace("mpiwg",MPIWG);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
50
c6929e63b0b8 first import
dwinter
parents:
diff changeset
51 xpathResources.addNamespace("rdf",RDF);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
52 xpathResources.addNamespace("echonavigation",ECHO);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
53
c6929e63b0b8 first import
dwinter
parents:
diff changeset
54 xpathResources.addNamespace("dc",DC);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
55 xpathResources.addNamespace("oai",OAI);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
56 xpathResources.addNamespace("foxml",FOXML);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
57 xpathResources.addNamespace("vlp",VLP);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
58
c6929e63b0b8 first import
dwinter
parents:
diff changeset
59
c6929e63b0b8 first import
dwinter
parents:
diff changeset
60 xpathResources.addNamespace("fedora",FEDORA);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
61 xpathResources.addNamespace("escidocItem",escidocItem);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
62 xpathResources.addNamespace("prop",prop);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
63 xpathResources.addNamespace("escidocComponents",escidocComponents);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
64 xpathResources.addNamespace("xlink",xlink);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
65 xpathResources.addNamespace("metadata-records",metadataRecords);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
66 xpathResources.addNamespace("container",container);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
67 xpathResources.addNamespace("item",item);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
68 xpathResources.addNamespace("srw",srw);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
69 xpathResources.addNamespace("version",version);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
70 xpathResources.addNamespace("echo",ECHO);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
71 xpathResources.addNamespace("escidocContentModel",cmm);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
72 xpathResources.addNamespace("zs",zs);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
73 xpathResources.addNamespace("srel",srel);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
74 xpathResources.addNamespace("struct-map",structMap);
c6929e63b0b8 first import
dwinter
parents:
diff changeset
75 return xpathResources;
c6929e63b0b8 first import
dwinter
parents:
diff changeset
76 }
c6929e63b0b8 first import
dwinter
parents:
diff changeset
77
c6929e63b0b8 first import
dwinter
parents:
diff changeset
78
c6929e63b0b8 first import
dwinter
parents:
diff changeset
79
c6929e63b0b8 first import
dwinter
parents:
diff changeset
80
c6929e63b0b8 first import
dwinter
parents:
diff changeset
81 }