Class NameMeaning

java.lang.Object
org.apache.sis.util.Static
org.apache.sis.internal.metadata.NameMeaning

public final class NameMeaning extends Static
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 Details

    • toURN

      public static String toURN(Class<?> type, String authority, String version, String code)
      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 returns null. 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 in DefinitionURI javadoc.
      version - the code version, or null. This is the only optional information.
      code - the code.
      Returns:
      an identifier using the URN syntax, or null if a mandatory information is missing.
      Since:
      0.7
    • toObjectType

      public static String toObjectType(Class<?> type)
      Returns the "object type" part of an OGC URN for the given class, or null if unknown. See DefinitionURI javadoc for a list of object types in URN.
      Parameters:
      type - the class for which to get the URN type.
      Returns:
      the URN type, or null if unknown.
    • getVersion

      public static String getVersion(org.opengis.metadata.citation.Citation authority)
      Returns the version of the namespace managed by the given authority. Current Apache SIS implementation searches this information in the Citation.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, or null.
      Returns:
      the version, or null if none.
      Since:
      0.7