View Javadoc

1   /*$Id: SchemaMap.java,v 1.1 2004/09/02 01:31:15 nw Exp $
2    * Created on 01-Sep-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
9    *
10  **/
11  package org.astrogrid.test.schema;
12  
13  import java.util.HashMap;
14  import java.util.Map;
15  
16  /*** static class that provides maps of all namespace - schema locations in this project.
17   * useful to pass to schema-validation methods in {@link org.astrogrid.test.AstrogridAssert}
18   * @author Noel Winstanley nw@jb.man.ac.uk 01-Sep-2004
19   *@ see org.astrogrid.test.AstrogridAssert
20   */
21  public class SchemaMap {
22  
23      /*** Construct a new SchemaMap
24       * 
25       */
26      private SchemaMap() {
27      }
28      
29      public static final Map ALL; 
30      
31      static {
32          // populate the map.
33          ALL = new HashMap();
34          ALL.put("http://www.astrogrid.org/schema/CommonExecutionArchitectureBase/v1", SchemaMap.class.getResource("/schema/AGApplicationBase.xsd"));
35          ALL.put("http://www.astrogrid.org/schema/AGParameterDefinition/v1",SchemaMap.class.getResource("/schema/AGParameterDefinition.xsd"));
36          ALL.put("http://www.astrogrid.org/schema/CEATypes/v1",SchemaMap.class.getResource("/schema/CEATypes.xsd"));
37          ALL.put("http://www.astrogrid.org/schema/Credentials/v1",SchemaMap.class.getResource("/schema/Credentials.xsd"));
38          ALL.put("http://www.astrogrid.org/schema/ExecutionRecord/v1",SchemaMap.class.getResource("/schema/ExecutionRecord.xsd"));
39          ALL.put("urn:jes/types/v1",SchemaMap.class.getResource("/schema/JesTypes.xsd"));
40          ALL.put("http://www.ivoa.net/xml/CEAService/v0.1",SchemaMap.class.getResource("/schema/VOCEA.xsd"));
41          ALL.put("http://www.astrogrid.org/schema/AGWorkflow/v1",SchemaMap.class.getResource("/schema/Workflow.xsd"));
42     
43          ALL.put("http://ivoa.org/Accuracy",SchemaMap.class.getResource("/schema/externalSchema/quantity/Accuracy.xsd"));
44          ALL.put("http://ivoa.org/CoordinateSystems",SchemaMap.class.getResource("/schema/externalSchema/quantity/CoordinateSystems.xsd"));
45          ALL.put("http://ivoa.org/Mappings",SchemaMap.class.getResource("/schema/externalSchema/quantity/Mappings.xsd"));
46          ALL.put("http://ivoa.org/Quantity",SchemaMap.class.getResource("/schema/externalSchema/quantity/Quantity.xsd"));
47                  
48          ALL.put("urn:nvo-coords",SchemaMap.class.getResource("/schema/externalSchema/stc/coords.xsd"));
49          ALL.put("urn:nvo-region",SchemaMap.class.getResource("/schema/externalSchema/stc/region.xsd"));
50          ALL.put("urn:nvo-stc",SchemaMap.class.getResource("/schema/externalSchema/stc/stc.xsd"));
51                               
52          ALL.put("http://www.ivoa.net/xml/ConeSearch/v0.2",SchemaMap.class.getResource("/schema/externalSchema/ConeSearch-v0.2.xsd"));
53          ALL.put("http://www.ivoa.net/xml/SIA/v0.6",SchemaMap.class.getResource("/schema/externalSchema/SIA-v0.6.xsd"));
54          ALL.put("http://www.ivoa.net/xml/VOCommunity/v0.2",SchemaMap.class.getResource("/schema/externalSchema/VOCommunity-v0.2.xsd"));
55          ALL.put("http://www.ivoa.net/xml/VODataService/v0.4",SchemaMap.class.getResource("/schema/externalSchema/VODataService-v0.4.xsd"));
56     // VODataServiceCoverage-* omitted - no target namespace declared. doesn't look valid as a stand-alone schema 
57          ALL.put("http://www.ivoa.net/xml/VORegistry/v0.2",SchemaMap.class.getResource("/schema/externalSchema/VORegistry-v0.2.xsd"));
58          ALL.put("http://www.ivoa.net/xml/VOResource/v0.9",SchemaMap.class.getResource("/schema/externalSchema/VOResource-v0.9.xsd"));
59     // likewise, omitted VOResourceRelType-* 
60          ALL.put("http://www.ivoa.net/xml/VOTable/v1.0",SchemaMap.class.getResource("/schema/externalSchema/VOTable.xsd"));
61          // isn't there a more recent version of votable now too?
62                                                                                              
63      }
64      
65  
66  }
67  
68  
69  /* 
70  $Log: SchemaMap.java,v $
71  Revision 1.1  2004/09/02 01:31:15  nw
72  added in all external schemas to jar (for testing).
73  wrote static that lists all namesapces and system IDs for schemas.
74   
75  */