org.geotoolkit.metadata.iso.citation
Class Citations

Object
  extended by Static
      extended by Citations

public final class Citations
extends Static

A set of pre-defined constants and static methods working on citations. Pre-defined metadata constants are usually declared in implementation classes like DefaultResponsibleParty. But citations are an exception since they are extensively referenced in the Geotk library, and handling citations requires some convenience methods. They are factored out in this Citations class for clarity.

The citation constants declared in this class are for:

In the later case, the citations are actually of kind IdentifierSpace. The namespaces of codes maintained by the authority are given by the citation identifiers. For example EPSG codes look like "EPSG:4326", so the identifier for the EPSG citation is defined as "EPSG".

Since:
2.2
Version:
3.20
Author:
Martin Desruisseaux (IRD, Geomatys), Jody Garnett (Refractions)
Module:
metadata/geotk-metadata (download)    View source code for this class

Field Summary
static IdentifierSpace<String> AUTO
          The WMS 1.1.1 "Automatic Projections" authority.
static IdentifierSpace<String> AUTO2
          The WMS 1.3.0 "Automatic Projections" authority.
static IdentifierSpace<String> CRS
          The WMS 1.3.0 "CRS" authority.
static IdentifierSpace<Integer> EPSG
          The European Petroleum Survey Group authority.
static Citation ESRI
          The ESRI organisation.
static Citation GEOTIFF
          The GeoTIFF specification.
static Citation GEOTOOLKIT
          The Geotoolkit.org project.
static Citation GEOTOOLS
          The GeoTools project.
static IdentifierSpace<URI> HTTP_OGC
          URL in the OGC namespace.
static IdentifierSpace<Integer> IGNF
          The French mapping agency (Institut Géographique National).
static Citation IHO
          The International hydrographic organization.
static IdentifierSpace<String> ISBN
          International Standard Book Number (ISBN) defined by ISO-2108.
static Citation ISO
          The International Organization for Standardization organisation.
static IdentifierSpace<String> ISSN
          International Standard Serial Number (ISSN) defined by ISO-3297.
static Citation JAI
          The Java Advanced Imaging library.
static Citation NETCDF
          The NetCDF specification.
static Citation NETCDF_CF
          The NetCDF Climate and Forecast (CF) Metadata Convention specification.
static Citation OGC
          The Open Geospatial consortium organisation.
static Citation OPEN_GIS
          The OpenGIS consortium organisation.
static Citation ORACLE
          The Oracle organisation.
static Citation POSTGIS
          The PostGIS project.
static IdentifierSpace<String> PROJ4
          The Proj.4 project.
static Citation S57
          The IHO transfer standard for digital hydrographic data specification.
static Citation UNKNOWN
          Unknown authority, vendor or specification.
static IdentifierSpace<URI> URN_OGC
          URN in the OGC namespace.
static Citation WMS
          The Web Map Service specification.
 
Method Summary
static Citation fromName(String title)
          Returns a citation of the given name.
static String getIdentifier(Citation citation)
          Returns the shortest identifier for the specified citation, or the title if there is no identifier.
static boolean identifierMatches(Citation c1, Citation c2)
          Returns true if at least one identifier in c1 is equal to an identifier in c2.
static boolean identifierMatches(Citation citation, String identifier)
          Returns true if any identifiers in the given citation matches the given string.
static boolean titleMatches(Citation c1, Citation c2)
          Returns true if at least one title or alternate title in c1 is equal to a title or alternate title in c2.
static boolean titleMatches(Citation citation, String title)
          Returns true if the title or any alternate title in the given citation matches the given string.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ISO

public static final Citation ISO
The International Organization for Standardization organisation. An alternate title for this citation is "ISO" (according ISO 19115, alternate titles often contain abbreviations).

Since:
3.19

OGC

public static final Citation OGC
The Open Geospatial consortium organisation. "Open Geospatial consortium" is the new name for "OpenGIS consortium". An alternate title for this citation is "OGC" (according ISO 19115, alternate titles often contain abbreviations).

See Also:
OPEN_GIS, Convention.OGC

OPEN_GIS

public static final Citation OPEN_GIS
The OpenGIS consortium organisation. "OpenGIS consortium" is the old name for "Open Geospatial consortium". Alternate titles for this citation are "OpenGIS" and "OGC" (according ISO 19115, alternate titles often contain abbreviations).

See Also:
OGC

IHO

public static final Citation IHO
The International hydrographic organization.

Since:
3.22
See Also:
S57

ESRI

public static final Citation ESRI
The ESRI organisation. This company defines many Coordinate Reference Systems in addition to the EPSG ones.

See Also:
Convention.ESRI

ORACLE

public static final Citation ORACLE
The Oracle organisation.

See Also:
Convention.ORACLE

POSTGIS

public static final Citation POSTGIS
The PostGIS project.

Since:
2.4

GEOTOOLKIT

public static final Citation GEOTOOLKIT
The Geotoolkit.org project.


GEOTOOLS

public static final Citation GEOTOOLS
The GeoTools project.


WMS

public static final Citation WMS
The Web Map Service specification. Alternate titles for this citation are "WMS", "WMS 1.3.0", "OGC 04-024" and "ISO 19128". Note that the version numbers may be upgraded in future Geotk versions.

See Also:
Open Geospatial Consortium, WMS 1.1.1 specification, WMS 1.3.0 specification

NETCDF

public static final Citation NETCDF
The NetCDF specification.

Since:
3.08
See Also:
Convention.NETCDF

NETCDF_CF

public static final Citation NETCDF_CF
The NetCDF Climate and Forecast (CF) Metadata Convention specification.

Since:
3.21

GEOTIFF

public static final Citation GEOTIFF
The GeoTIFF specification.

See Also:
Convention.GEOTIFF

S57

public static final Citation S57
The IHO transfer standard for digital hydrographic data specification.

Since:
3.22
See Also:
IHO

JAI

public static final Citation JAI
The Java Advanced Imaging library. An alternate title for this citation is "JAI" (according ISO 19115, alternate titles often contain abbreviations).


EPSG

public static final IdentifierSpace<Integer> EPSG
The European Petroleum Survey Group authority. An alternate title for this citation is "EPSG" (according ISO 19115, alternate titles often contain abbreviations). In addition, this citation contains the "EPSG" identifier.

This citation is used as an authority for coordinate reference system identifiers. When searching an CRS authority factory on EPSG data, Geotk compares the "EPSG" string against the identifiers (or against the title and alternate titles if there is no identifier) using the identifierMatches method.

See Also:
AUTO, AUTO2, CRS, Convention.EPSG

IGNF

public static final IdentifierSpace<Integer> IGNF
The French mapping agency (Institut Géographique National). This agency defines many Coordinate Reference Systems in addition to the EPSG ones.

Since:
3.20

AUTO

public static final IdentifierSpace<String> AUTO
The WMS 1.1.1 "Automatic Projections" authority. An alternate title for this citation is "AUTO" (according ISO 19115, alternate titles often contain abbreviations). In addition, this citation contains the "AUTO" identifier.

Warning: AUTO is different from AUTO2 used for WMS 1.3.0.

This citation is used as an authority for coordinate reference system identifiers. When searching an CRS authority factory on AUTO data, Geotk compares the "AUTO" string against the identifiers (or against the title and alternate titles if there is no identifier) using the identifierMatches method.

See Also:
Open Geospatial Consortium, WMS 1.1.1 specification, WMS, AUTO2, CRS, EPSG

AUTO2

public static final IdentifierSpace<String> AUTO2
The WMS 1.3.0 "Automatic Projections" authority. An alternate title for this citation is "AUTO2" (according ISO 19115, alternate titles often contain abbreviations). In addition, this citation contains the "AUTO2" identifier.

Warning: AUTO2 is different from AUTO used for WMS 1.1.1 and earlier.

This citation is used as an authority for coordinate reference system identifiers. When searching an CRS authority factory on AUTO2 data, Geotk compares the "AUTO2" string against the identifiers (or against the title and alternate titles if there is no identifier) using the identifierMatches method.

See Also:
Open Geospatial Consortium, WMS 1.3.0 specification, WMS, AUTO, CRS, EPSG

CRS

public static final IdentifierSpace<String> CRS
The WMS 1.3.0 "CRS" authority. This is defined in the same document than AUTO2. This citation declares both "CRS" and "OGC" identifiers, because we see both "CRS:84" and "OGC:CRS84" in practice.

See Also:
WMS, AUTO, AUTO2, CRS, EPSG

URN_OGC

public static final IdentifierSpace<URI> URN_OGC
URN in the OGC namespace. This citation contains the "urn:ogc:def" and "urn:x-ogc:def" identifiers.

Since:
2.4

HTTP_OGC

public static final IdentifierSpace<URI> HTTP_OGC
URL in the OGC namespace. This citation contains the "http://www.opengis.net" identifiers.

Since:
2.4

PROJ4

public static final IdentifierSpace<String> PROJ4
The Proj.4 project.

Since:
3.20
See Also:
Convention.PROJ4

ISBN

public static final IdentifierSpace<String> ISBN
International Standard Book Number (ISBN) defined by ISO-2108. The ISO-19115 metadata standard defines a specific attribute for this information, but the Geotk library handles it like any other identifier.

Since:
3.19
See Also:
Citation.getISBN()

ISSN

public static final IdentifierSpace<String> ISSN
International Standard Serial Number (ISSN) defined by ISO-3297. The ISO-19115 metadata standard defines a specific attribute for this information, but the Geotk library handles it like any other identifier.

Since:
3.19
See Also:
Citation.getISSN()

UNKNOWN

public static final Citation UNKNOWN
Unknown authority, vendor or specification.

Since:
3.05
Method Detail

fromName

public static Citation fromName(String title)
Returns a citation of the given name. The method makes the following choice:

Parameters:
title - The citation title (or alternate title), or null.
Returns:
A citation using the specified name, or null if the given title is null or empty.

titleMatches

public static boolean titleMatches(Citation c1,
                                   Citation c2)
Returns true if at least one title or alternate title in c1 is equal to a title or alternate title in c2. The comparison is case-insensitive and ignores leading and trailing spaces. The titles ordering is not significant.

Parameters:
c1 - The first citation to compare.
c2 - the second citation to compare.
Returns:
true if at least one title or alternate title matches.

titleMatches

public static boolean titleMatches(Citation citation,
                                   String title)
Returns true if the title or any alternate title in the given citation matches the given string. The comparison is case-insensitive and ignores leading and trailing spaces.

Parameters:
citation - The citation to check for.
title - The title or alternate title to compare.
Returns:
true if the title or alternate title matches the given string.

identifierMatches

public static boolean identifierMatches(Citation c1,
                                        Citation c2)
Returns true if at least one identifier in c1 is equal to an identifier in c2. The comparison is case-insensitive and ignores leading and trailing spaces. The identifier ordering is not significant.

If (and only if) the citations do not contains any identifier, then this method fallback on titles comparison using the titleMatches method. This fallback exists for compatibility with client codes using citation titles without identifiers.

Parameters:
c1 - The first citation to compare.
c2 - the second citation to compare.
Returns:
true if at least one identifier, title or alternate title matches.

identifierMatches

public static boolean identifierMatches(Citation citation,
                                        String identifier)
Returns true if any identifiers in the given citation matches the given string. The comparison is case-insensitive and ignores leading and trailing spaces. If (and only if) the citation do not contains any identifier, then this method fallback on titles comparison using the titleMatches method. This fallback exists for compatibility with client codes using citation titles without identifiers.

Parameters:
citation - The citation to check for.
identifier - The identifier to compare.
Returns:
true if the title or alternate title matches the given string.

getIdentifier

public static String getIdentifier(Citation citation)
Returns the shortest identifier for the specified citation, or the title if there is no identifier. This method is useful for extracting the namespace from an authority, for example "EPSG".

Parameters:
citation - The citation for which to get the identifier, or null.
Returns:
The shortest identifier of the given citation, or null if the given citation was null or doesn't declare any identifier or title.
Since:
2.4


Copyright © 2009-2013 Geotoolkit.org. All Rights Reserved.