Package org.vast.ogc

Class OGCRegistry

java.lang.Object
org.vast.ogc.OGCRegistry

public class OGCRegistry extends Object

This class allows to keep track of what classes to use to read/write different versions of service requests as well as other (mostly xml) messages and documents. This class obtains the default mappings from the OGCRegistry.xml file.

Since:
Jan 16, 2007
  • Field Details

  • Constructor Details

    • OGCRegistry

      public OGCRegistry()
  • Method Details

    • getNamespaceURI

      public static String getNamespaceURI(String spec, String version)
      Computes namespace URI for the specified OGC spec and version
      Parameters:
      spec -
      version -
      Returns:
      complete namespace URI
    • getNamespaceURI

      public static String getNamespaceURI(String spec)
      Computes namespace URI for the specified OGC spec
      Parameters:
      spec -
      Returns:
      complete namespace URI
    • getOWSVersion

      public static String getOWSVersion(String spec, String version)
      Retrieves OWS version for given OGC spec
      Parameters:
      spec -
      version -
      Returns:
      version string
    • createReader

      public static <T> T createReader(String type, String subType, String version) throws IllegalStateException
      Instantiates a reader object for the specified content type, subtype and version
      Parameters:
      type -
      subType -
      version -
      Returns:
      reader instance
      Throws:
      IllegalStateException
    • createReader

      public static <T> T createReader(String type, String version) throws IllegalStateException
      Instantiates a reader object for the specified content type and version
      Parameters:
      type -
      version -
      Returns:
      reader instance
      Throws:
      IllegalStateException
    • createWriter

      public static <T> T createWriter(String type, String subType, String version) throws IllegalStateException
      Instantiates a writer object for the specified content type, subtype and version
      Parameters:
      type -
      subType -
      version -
      Returns:
      writer instance
      Throws:
      IllegalStateException
    • createWriter

      public static <T> T createWriter(String type, String version) throws IllegalStateException
      Instantiates a writer object for the specified content type and version
      Parameters:
      type -
      version -
      Returns:
      writer instance
      Throws:
      IllegalStateException
    • addReaderClass

      public static void addReaderClass(String type, String subType, String version, String className) throws IllegalStateException
      Registers a reader class for given content type and version
      Parameters:
      type -
      subType -
      version -
      className -
      Throws:
      IllegalStateException
    • addWriterClass

      public static void addWriterClass(String type, String subType, String version, String className) throws IllegalStateException
      Registers a writer class for given content type and version
      Parameters:
      type -
      subType -
      version -
      className -
      Throws:
      IllegalStateException
    • loadMaps

      public static void loadMaps(String xmlFileUrl, boolean replace)
      Loads an xml file containing mappings from types of readers/writers to class
      Parameters:
      xmlFileUrl -
      replace -
    • normalizeVersionString

      public static String normalizeVersionString(String version)
    • getNamespaces

      public static Map<String,String> getNamespaces()
      Provides direct access to the namespaceBuilders hashtable
      Returns:
      map of spec to namespace URIs