View Javadoc

1   /*$Id: RegistrySchemaMap.java,v 1.3 2005/01/07 14:14:25 jdt 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.registry.common;
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 RegistrySchemaMap {
22  
23      /*** Construct a new SchemaMap
24       * 
25       */
26      private RegistrySchemaMap() {
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", RegistrySchemaMap.class.getResource("/schema/cea/AGApplicationBase.xsd"));
35          ALL.put("http://www.astrogrid.org/schema/AGParameterDefinition/v1",RegistrySchemaMap.class.getResource("/schema/cea/AGParameterDefinition.xsd"));
36          ALL.put("http://www.astrogrid.org/schema/CEATypes/v1",RegistrySchemaMap.class.getResource("/schema/cea/CEATypes.xsd"));
37          //ALL.put("http://www.astrogrid.org/schema/Credentials/v1",RegistrySchemaMap.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",RegistrySchemaMap.class.getResource("/schema/cea/VOCEA-v0.1.xsd"));
41          ALL.put("http://www.ivoa.net/xml/CEAService/v0.2",RegistrySchemaMap.class.getResource("/schema/cea/VOCEA-v0.2.xsd"));
42          //ALL.put("http://www.astrogrid.org/schema/AGWorkflow/v1",RegistrySchemaMap.class.getResource("/schema/Workflow.xsd"));
43     
44          ALL.put("http://ivoa.org/Accuracy",RegistrySchemaMap.class.getResource("/schema/adql/Accuracy.xsd"));
45          ALL.put("http://ivoa.org/CoordinateSystems",RegistrySchemaMap.class.getResource("/schema/adql/CoordinateSystems.xsd"));
46          ALL.put("http://ivoa.org/Mappings",RegistrySchemaMap.class.getResource("/schema/adql/Mappings.xsd"));
47          ALL.put("http://ivoa.org/Quantity",RegistrySchemaMap.class.getResource("/schema/adql/Quantity.xsd"));
48                  
49          ALL.put("urn:nvo-coords",RegistrySchemaMap.class.getResource("/schema/adql/coords.xsd"));
50          ALL.put("urn:nvo-region",RegistrySchemaMap.class.getResource("/schema/adql/region.xsd"));
51          ALL.put("urn:nvo-stc",RegistrySchemaMap.class.getResource("/schema/adql/stc.xsd"));
52          ALL.put("http://adql.ivoa.net/v0.73",RegistrySchemaMap.class.getResource("/schema/adql/ADQL-0.7.3.xsd"));
53          ALL.put("http://www.ivoa.net/xml/ADQL/v0.7.4",RegistrySchemaMap.class.getResource("/schema/adql/ADQL-0.7.4.xsd"));
54                                       
55          ALL.put("http://www.ivoa.net/xml/RegistryInterface/v0.1",RegistrySchemaMap.class.getResource("/schema/registry/RegistryInterface-v0.1.xsd"));            
56          ALL.put("http://www.ivoa.net/xml/ConeSearch/v0.2",RegistrySchemaMap.class.getResource("/schema/registry/ConeSearch-v0.2.xsd"));
57          ALL.put("http://www.ivoa.net/xml/ConeSearch/v0.3",RegistrySchemaMap.class.getResource("/schema/registry/ConeSearch-v0.3.xsd"));
58          ALL.put("http://www.ivoa.net/xml/SIA/v0.6",RegistrySchemaMap.class.getResource("/schema/registry/SIA-v0.6.xsd"));
59          ALL.put("http://www.ivoa.net/xml/SIA/v0.7",RegistrySchemaMap.class.getResource("/schema/registry/SIA-v0.7.xsd"));
60          ALL.put("http://www.ivoa.net/xml/VOCommunity/v0.2",RegistrySchemaMap.class.getResource("/schema/registry/VOCommunity-v0.2.xsd"));
61          ALL.put("http://www.ivoa.net/xml/VODataService/v0.4",RegistrySchemaMap.class.getResource("/schema/registry/VODataService-v0.4.xsd"));
62          ALL.put("http://www.ivoa.net/xml/VODataService/v0.5",RegistrySchemaMap.class.getResource("/schema/registry/VODataService-v0.5.xsd"));
63     // VODataServiceCoverage-* omitted - no target namespace declared. doesn't look valid as a stand-alone schema 
64          ALL.put("http://www.ivoa.net/xml/VORegistry/v0.2",RegistrySchemaMap.class.getResource("/schema/registry/VORegistry-v0.2.xsd"));
65          ALL.put("http://www.ivoa.net/xml/VORegistry/v0.3",RegistrySchemaMap.class.getResource("/schema/registry/VORegistry-v0.3.xsd"));
66          
67          ALL.put("http://www.ivoa.net/xml/VOResource/v0.9",RegistrySchemaMap.class.getResource("/schema/registry/VOResource-v0.9.xsd"));
68          ALL.put("http://www.ivoa.net/xml/VOResource/v0.10",RegistrySchemaMap.class.getResource("/schema/registry/VOResource-v0.10.xsd"));
69          
70     // likewise, omitted VOResourceRelType-* 
71          ALL.put("http://www.ivoa.net/xml/VOTable/v1.0",RegistrySchemaMap.class.getResource("/schema/registry/VOTable.xsd"));
72          ALL.put("http://www.astrogrid.org/xml/AstrogridDataService/v0.1",RegistrySchemaMap.class.getResource("/schema/registry/AstrogridDataService-0.1.xsd"));
73          ALL.put("http://www.astrogrid.org/xml/AstrogridDataService/v0.2",RegistrySchemaMap.class.getResource("/schema/registry/AstrogridDataService-0.2.xsd"));
74          
75          ALL.put("http://www.ivoa.net/xml/OpenSkyNode/v0.1",RegistrySchemaMap.class.getResource("/schema/registry/OpenSkyNode-v0.1.xsd"));
76          
77                                                                                              
78      }
79      
80  
81  }
82  
83  
84  /* 
85  $Log: RegistrySchemaMap.java,v $
86  Revision 1.3  2005/01/07 14:14:25  jdt
87  merged from Reg_KMB_787
88  
89  Revision 1.1.4.2.2.1  2005/01/05 10:54:15  KevinBenson
90  added javadoc to it
91  
92  Revision 1.1.4.2  2004/11/26 21:57:05  KevinBenson
93  adding more checks on validation for version 10
94  
95  Revision 1.1.4.1  2004/11/19 10:51:26  KevinBenson
96  okay this is the result of a comparison wiht eclipse with brach Reg_KMB_605
97  and then updating this branch Reg_KMB_728.  Reason for this was some new jsp pages
98  in head that was not picked up on 605
99  
100 Revision 1.1.2.1  2004/11/16 16:49:32  KevinBenson
101 new validation to the registry being added.  With some unit tests.  And a schemamap mapping all the schems to a local schema url file
102 
103 Revision 1.1  2004/09/02 01:31:15  nw
104 added in all external schemas to jar (for testing).
105 wrote static that lists all namesapces and system IDs for schemas.
106  
107 */