| java.lang.Object org.geotools.referencing.factory.URN_Parser
URN_Parser | final class URN_Parser (Code) | | Split a URN into its
URN_Parser.type and
URN_Parser.version parts for
URN_AuthorityFactory .
This class must be immutable in order to avoid the need for synchronization in the authority
factory.
version: $Id: URN_Parser.java 24435 2007-02-16 03:32:10Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
final public String | authority The authority part of the URN (typically
"EPSG" ). | final public String | code The code part of the URN. | final public URN_Type | type The type part of the URN (
"crs" ,
"cs" ,
"datum" , etc). | final public String | urn The parsed code as full URN. | final public Version | version The version part of the URN, or
null if none. |
Constructor Summary | |
public | URN_Parser(String urn) Parses the specified URN.
Parameters: urn - The URN to parse. throws: NoSuchAuthorityCodeException - if the URN syntax is invalid. |
authority | final public String authority(Code) | | The authority part of the URN (typically
"EPSG" ).
|
code | final public String code(Code) | | The code part of the URN.
|
type | final public URN_Type type(Code) | | The type part of the URN (
"crs" ,
"cs" ,
"datum" , etc).
|
urn | final public String urn(Code) | | The parsed code as full URN.
|
version | final public Version version(Code) | | The version part of the URN, or
null if none.
|
URN_Parser | public URN_Parser(String urn) throws NoSuchAuthorityCodeException(Code) | | Parses the specified URN.
Parameters: urn - The URN to parse. throws: NoSuchAuthorityCodeException - if the URN syntax is invalid. GenericName String.regionMatches |
getAuthorityCode | public String getAuthorityCode()(Code) | | Returns the concatenation of the
and the
.
|
logWarningIfTypeMismatch | final void logWarningIfTypeMismatch(Class expected)(Code) | | Checks if the type is compatible with the expected one. This method is used as a safety
by
getFooAuthorityFactory(String) methods in
URN_AuthorityFactory . If a
mismatch is found, a warning is logged but no exception is thrown since it doesn't prevent
the class to work in a predicable way. It is just an indication for the user that his URN
may be wrong.
|
|
|