org.apache.sis.xml

## Class Namespaces

- Object
- - Static
  - - Namespaces

-     public final class Namespaces
      extends Static

  Lists some namespaces URLs used by JAXB when (un)marshalling.

  Warning: string constants in this class may change in any SIS version. Those constants are made available for applications who wish to use the same URLs than SIS in their own JAXB annotations. Note that applications using those constants will have their URLs determined by the SIS version available at compile-time, not runtime, because the `javac` compiler inlines string constants.

  The following table lists the URLs, their usual prefix, and the SIS versions when each URL changed.

  Namespaces and change log
  Prefix | XML Namespace | Changes history
  --- | --- | ---
  gco | "http://www.isotc211.org/2005/gco" |
  gfc | "http://www.isotc211.org/2005/gfc" |
  gmd | "http://www.isotc211.org/2005/gmd" |
  gmi | "http://www.isotc211.org/2005/gmi" |
  srv | "http://www.isotc211.org/2005/srv" |
  gts | "http://www.isotc211.org/2005/gts" |
  gmx | "http://www.isotc211.org/2005/gmx" |
  gml | "http://www.opengis.net/gml/3.2" | SIS 0.4
  csw | "http://www.opengis.net/cat/csw/2.0.2" |
  xsi | "http://www.w3.org/2001/XMLSchema-instance" |
  xlink | "http://www.w3.org/1999/xlink" |

  Profiles
  Some countries or organizations define profiles of international standards, which may contain country-specific extensions. The namespace of such extensions are usually defined in a separated class dedicated to the profile. Some of them are listed below:
  - "http://www.cnig.gouv.fr/2005/fra"
  Since:
    0.3

  Defined in the `sis-utility` module

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CSW` The `"http://www​.opengis​.net/cat/csw/2.0.2"` URL.
    `static String` | `GCO` The `"http://www​.isotc211​.org/2005/gco"` URL.
    `static String` | `GFC` The `"http://www​.isotc211​.org/2005/gfc"` URL.
    `static String` | `GMD` The `"http://www​.isotc211​.org/2005/gmd"` URL.
    `static String` | `GMI` The `"http://www​.isotc211​.org/2005/gmi"` URL.
    `static String` | `GML` The `"http://www​.opengis​.net/gml/3.2"` URL.
    `static String` | `GMX` The `"http://www​.isotc211​.org/2005/gmx"` URL.
    `static String` | `GTS` The `"http://www​.isotc211​.org/2005/gts"` URL.
    `static String` | `SRV` The `"http://www​.isotc211​.org/2005/srv"` URL.
    `static String` | `XLINK` The `"http://www​.w3​.org/1999/xlink"` URL.
    `static String` | `XSI` The `"http://www​.w3​.org/2001/XMLSchema-instance"` URL.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getPreferredPrefix(String namespace, String defaultValue)` Returns the preferred prefix for the given namespace URI.

    - ### Methods inherited from class Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### GCO

          public static final String GCO

      The `"http://www​.isotc211​.org/2005/gco"` URL. The usual prefix for this namespace is `"gco"`.
      See Also:
        Constant Field Values

    - #### GFC

          public static final String GFC

      The `"http://www​.isotc211​.org/2005/gfc"` URL. The usual prefix for this namespace is `"gfc"`.
      See Also:
        Constant Field Values

    - #### GMD

          public static final String GMD

      The `"http://www​.isotc211​.org/2005/gmd"` URL. The usual prefix for this namespace is `"gmd"`.
      See Also:
        Constant Field Values

    - #### GMI

          public static final String GMI

      The `"http://www​.isotc211​.org/2005/gmi"` URL. The usual prefix for this namespace is `"gmi"`.
      See Also:
        Constant Field Values

    - #### SRV

          public static final String SRV

      The `"http://www​.isotc211​.org/2005/srv"` URL. The usual prefix for this namespace is `"srv"`.
      See Also:
        Constant Field Values

    - #### GTS

          public static final String GTS

      The `"http://www​.isotc211​.org/2005/gts"` URL. The usual prefix for this namespace is `"gts"`.
      See Also:
        Constant Field Values

    - #### GMX

          public static final String GMX

      The `"http://www​.isotc211​.org/2005/gmx"` URL. The usual prefix for this namespace is `"gmx"`.
      See Also:
        Constant Field Values

    - #### GML

          public static final String GML

      The `"http://www​.opengis​.net/gml/3.2"` URL. The usual prefix for this namespace is `"gml"`. The 3.2 version is equivalent to ISO 19136.

      History

      Change log
      SIS version | URL
      --- | ---
      0.3 | http://www.opengis.net/gml

      See Also:
        Constant Field Values

    - #### CSW

          public static final String CSW

      The `"http://www​.opengis​.net/cat/csw/2.0.2"` URL. The usual prefix for this namespace is `"csw"`.
      See Also:
        Constant Field Values

    - #### XSI

          public static final String XSI

      The `"http://www​.w3​.org/2001/XMLSchema-instance"` URL. The usual prefix for this namespace is `"xsi"`. This is also defined by `XMLConstants​.W3C_XML_SCHEMA_INSTANCE_NS_URI`.
      See Also:
        `XMLConstants​.W3C_XML_SCHEMA_INSTANCE_NS_URI`, Constant Field Values

    - #### XLINK

          public static final String XLINK

      The `"http://www​.w3​.org/1999/xlink"` URL. The usual prefix for this namespace is `"xlink"`.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getPreferredPrefix

          public static String getPreferredPrefix(String namespace,
                                                  String defaultValue)

      Returns the preferred prefix for the given namespace URI.
      Parameters:
        `namespace` - the namespace URI for which the prefix needs to be found. Can not be `null`.
        `defaultValue` - the default prefix to returned if the given `namespace` is not recognized, or `null`.
      Returns:
        the prefix inferred from the namespace URI, or `null` if the given namespace is unrecognized and the `defaultValue` is null.

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.