Class SchemaMap

java.lang.Object
org.javastro.ivoa.schema.SchemaMap

public class SchemaMap extends Object
static class that provides maps of all namespace - schema locations in this project. The schema are all local copies in the project.
  • Field Details

    • ALL

      public static final Map<String,String> ALL
      ALL the map of all the namespaces to locations of the schema on the classpath.
    • xmlCatalogue

      public static final String xmlCatalogue
  • Method Details

    • getSchemaURL

      public static URL getSchemaURL(String namespace)
    • getSchemaAsStream

      public static InputStream getSchemaAsStream(String namespace)
      return an inputstream for the namespace
      Parameters:
      namespace - - the namespace idendifier for the schema
      Returns:
    • getRegistrySchemaAsSources

      public static StreamSource[] getRegistrySchemaAsSources()
      Get the sources of schema used in the registry. This is necessary as the way that the schema validators work is that they need an initial schema to validate against - it is not worked out dynamically by reading the namespace declarations unfortunately (probably because they can appear anywhere in the instance - so in practice two runs through the document are neccessary to be able to capture this information and then to do the actual validation) The only way that the parsers do tend to do the "dynamic" schema loading is if there is a xsi:schemaLocation declaration at the top.
      Returns:
    • getAllSchemaAsSources

      public static StreamSource[] getAllSchemaAsSources()
    • asXMLCatalogue

      public static InputSource asXMLCatalogue()