Package org.vast.ogc
Class OGCRegistry
java.lang.Object
org.vast.ogc.OGCRegistry
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addReaderClass
(String type, String subType, String version, String className) Registers a reader class for given content type and versionstatic void
addWriterClass
(String type, String subType, String version, String className) Registers a writer class for given content type and versionstatic <T> T
createReader
(String type, String version) Instantiates a reader object for the specified content type and versionstatic <T> T
createReader
(String type, String subType, String version) Instantiates a reader object for the specified content type, subtype and versionstatic <T> T
createWriter
(String type, String version) Instantiates a writer object for the specified content type and versionstatic <T> T
createWriter
(String type, String subType, String version) Instantiates a writer object for the specified content type, subtype and versionProvides direct access to the namespaceBuilders hashtablestatic String
getNamespaceURI
(String spec) Computes namespace URI for the specified OGC specstatic String
getNamespaceURI
(String spec, String version) Computes namespace URI for the specified OGC spec and versionstatic String
getOWSVersion
(String spec, String version) Retrieves OWS version for given OGC specstatic void
Loads an xml file containing mappings from types of readers/writers to classstatic String
normalizeVersionString
(String version)
-
Field Details
-
XLINK
- See Also:
-
DEFAULT_OWS_VERSION
- See Also:
-
VERSION_NORMALIZE_PATTERN
-
readerClasses
-
writerClasses
-
namespaces
-
owsVersions
-
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
OGCRegistry
public OGCRegistry()
-
-
Method Details
-
getNamespaceURI
Computes namespace URI for the specified OGC spec and version- Parameters:
spec
-version
-- Returns:
- complete namespace URI
-
getNamespaceURI
Computes namespace URI for the specified OGC spec- Parameters:
spec
-- Returns:
- complete namespace URI
-
getOWSVersion
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
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
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
Loads an xml file containing mappings from types of readers/writers to class- Parameters:
xmlFileUrl
-replace
-
-
normalizeVersionString
-
getNamespaces
Provides direct access to the namespaceBuilders hashtable- Returns:
- map of spec to namespace URIs
-