Package org.apache.sis.internal.metadata
Class NameMeaning
java.lang.Object
org.apache.sis.util.Static
org.apache.sis.internal.metadata.NameMeaning
The meaning of some parts of URN in the
"ogc" namespace.
The meaning are defined by OGC Naming Authority (OGCNA) or other OGC sources.- Since:
- 0.5
- Version:
- 0.8
- Author:
- Martin Desruisseaux (IRD, Geomatys)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetVersion(org.opengis.metadata.citation.Citation authority) Returns the version of the namespace managed by the given authority.static StringtoObjectType(Class<?> type) Returns the "object type" part of an OGC URN for the given class, ornullif unknown.static StringFormats the given identifier using the"ogc:urn:def:"syntax with possible heuristic changes to the given values.
-
Method Details
-
toURN
Formats the given identifier using the"ogc:urn:def:"syntax with possible heuristic changes to the given values. The identifier code space, version and code are appended omitting any characters that are not valid for a Unicode identifier. If some information are missing in the given identifier, then this method returnsnull. This method tries to "fix" the given values using some heuristic knowledge about the meaning of URN.- Parameters:
type- the object type.authority- the authority as one of the values documented inDefinitionURIjavadoc.version- the code version, ornull. This is the only optional information.code- the code.- Returns:
- an identifier using the URN syntax, or
nullif a mandatory information is missing. - Since:
- 0.7
-
toObjectType
Returns the "object type" part of an OGC URN for the given class, ornullif unknown. SeeDefinitionURIjavadoc for a list of object types in URN.- Parameters:
type- the class for which to get the URN type.- Returns:
- the URN type, or
nullif unknown.
-
getVersion
Returns the version of the namespace managed by the given authority. Current Apache SIS implementation searches this information in theCitation.getEdition()property. This approach is based on the assumption that the authority is some specification document or reference to a database, not an organization. However, this policy may be revisited in any future SIS version.- Parameters:
authority- the authority from which to get a version, ornull.- Returns:
- the version, or
nullif none. - Since:
- 0.7
-