1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.test.schema;
12
13 import org.apache.commons.logging.Log;
14 import org.apache.commons.logging.LogFactory;
15
16 import java.util.HashMap;
17 import java.util.Iterator;
18 import java.util.Map;
19
20 /*** static class that provides maps of all namespace - schema locations in this project.
21 * useful to pass to schema-validation methods in {@link org.astrogrid.test.AstrogridAssert}
22 * @author Noel Winstanley nw@jb.man.ac.uk 01-Sep-2004
23 * @author pharriso@eso.org May 27, 2005
24 *@ see org.astrogrid.test.AstrogridAssert
25 * @deprecated Use org.astrogrid.contracts.SchemaMap instead.
26 */
27 public class SchemaMap {
28 /***
29 * Logger for this class
30 */
31 private static final Log logger = LogFactory.getLog(SchemaMap.class);
32
33 /*** Construct a new SchemaMap
34 *
35 */
36 private SchemaMap() {
37 }
38
39 public static final Map ALL;
40
41 static {
42
43 ALL = new HashMap();
44 ALL.put("http://www.astrogrid.org/schema/CommonExecutionArchitectureBase/v1", SchemaMap.class.getResource("/schema/AGApplicationBase.xsd"));
45 ALL.put("http://www.astrogrid.org/schema/AGParameterDefinition/v1",SchemaMap.class.getResource("/schema/AGParameterDefinition.xsd"));
46 ALL.put("http://www.astrogrid.org/schema/CEATypes/v1",SchemaMap.class.getResource("/schema/CEATypes.xsd"));
47 ALL.put("http://www.astrogrid.org/schema/Credentials/v1",SchemaMap.class.getResource("/schema/Credentials.xsd"));
48 ALL.put("http://www.astrogrid.org/schema/ExecutionRecord/v1",SchemaMap.class.getResource("/schema/ExecutionRecord.xsd"));
49 ALL.put("http://www.ivoa.net/xml/CEAService/v0.1",SchemaMap.class.getResource("/schema/VOCEA.xsd"));
50 ALL.put("http://www.ivoa.net/xml/CEAService/v0.2",SchemaMap.class.getResource("/schema/VOCEA-v0.2.xsd"));
51 ALL.put("http://www.astrogrid.org/schema/CEAImplementation/v1", SchemaMap.class.getResource("/schema/CEAImplementation.xsd"));
52 ALL.put("http://www.astrogrid.org/schema/AGWorkflow/v1",SchemaMap.class.getResource("/schema/Workflow.xsd"));
53
54 ALL.put("http://ivoa.org/Accuracy",SchemaMap.class.getResource("/schema/externalSchema/quantity/Accuracy.xsd"));
55 ALL.put("http://ivoa.org/CoordinateSystems",SchemaMap.class.getResource("/schema/externalSchema/quantity/CoordinateSystems.xsd"));
56 ALL.put("http://ivoa.org/Mappings",SchemaMap.class.getResource("/schema/externalSchema/quantity/Mappings.xsd"));
57 ALL.put("http://ivoa.org/Quantity",SchemaMap.class.getResource("/schema/externalSchema/quantity/Quantity.xsd"));
58
59 ALL.put("urn:nvo-coords",SchemaMap.class.getResource("/schema/externalSchema/stc/coords.xsd"));
60 ALL.put("urn:nvo-region",SchemaMap.class.getResource("/schema/externalSchema/stc/region.xsd"));
61 ALL.put("urn:nvo-stc",SchemaMap.class.getResource("/schema/externalSchema/stc/stc.xsd"));
62
63 ALL.put("http://www.ivoa.net/xml/ConeSearch/v0.2",SchemaMap.class.getResource("/schema/externalSchema/ConeSearch-v0.2.xsd"));
64 ALL.put("http://www.ivoa.net/xml/SIA/v0.6",SchemaMap.class.getResource("/schema/externalSchema/SIA-v0.6.xsd"));
65 ALL.put("http://www.ivoa.net/xml/VOCommunity/v0.2",SchemaMap.class.getResource("/schema/externalSchema/VOCommunity-v0.2.xsd"));
66 ALL.put("http://www.ivoa.net/xml/VODataService/v0.4",SchemaMap.class.getResource("/schema/externalSchema/VODataService-v0.4.xsd"));
67
68 ALL.put("http://www.ivoa.net/xml/VORegistry/v0.2",SchemaMap.class.getResource("/schema/externalSchema/VORegistry-v0.2.xsd"));
69 ALL.put("http://www.ivoa.net/xml/VOResource/v0.9",SchemaMap.class.getResource("/schema/externalSchema/VOResource-v0.9.xsd"));
70
71
72 ALL.put("http://www.ivoa.net/xml/ConeSearch/v0.3",SchemaMap.class.getResource("/schema/externalSchema/v10/ConeSearch-v0.3.xsd"));
73 ALL.put("http://www.ivoa.net/xml/SIA/v0.7",SchemaMap.class.getResource("/schema/externalSchema/v10/SIA-v0.7.xsd"));
74 ALL.put("http://www.ivoa.net/xml/VODataService/v0.5",SchemaMap.class.getResource("/schema/externalSchema/v10/VODataService-v0.5.xsd"));
75 ALL.put("http://www.ivoa.net/xml/VORegistry/v0.3",SchemaMap.class.getResource("/schema/externalSchema/v10/VORegistry-v0.3.xsd"));
76 ALL.put("http://www.ivoa.net/xml/VOResource/v0.10",SchemaMap.class.getResource("/schema/externalSchema/v10/VOResource-v0.10.xsd"));
77
78 ALL.put("http://www.ivoa.net/xml/RegistryInterface/v0.1",SchemaMap.class.getResource("/schema/externalSchema/v10/RegistryInterface-v0.1.xsd"));
79
80 ALL.put("http://www.ivoa.net/xml/VOTable/v1.0",SchemaMap.class.getResource("/schema/externalSchema/VOTable.xsd"));
81 ALL.put("http://www.ivoa.net/xml/VOTable/v1.1",SchemaMap.class.getResource("/schema/externalSchema/VOTable-1.1.xsd"));
82
83
84
85 for (Iterator iter = SchemaMap.ALL.keySet().iterator(); iter.hasNext();) {
86 String key = (String) iter.next();
87 if(SchemaMap.ALL.get(key) == null)
88 {
89 logger.error("key "+key+ " has no associated schema");
90 }
91 }
92
93 }
94
95
96 }
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136