org.geotools.metadata.iso.citation
Class Citations

java.lang.Object
  extended byorg.geotools.metadata.iso.citation.Citations

public final class Citations
extends java.lang.Object

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

Citations may be about an organisation (e.g. OpenGIS), a specification (e.g. WMS) or an authority that maintains definitions of codes (e.g. EPSG). In the later case, the citation contains an identifier which is the namespace of the codes maintained by the authority. For example the identifier for the EPSG citation is , and EPSG codes look like .

Since:
2.2
Version:
$Id: Citations.java 18851 2006-03-29 12:25:03Z desruisseaux $
Author:
Martin Desruisseaux, Jody Garnett
To Do:
Classify the pre-defined constants using the javadoc tag once it will be available (targeted for J2SE 1.6).

Field Summary
static org.opengis.metadata.citation.Citation AUTO
          The WMS 1.1.1 "Automatic Projections" authority.
static org.opengis.metadata.citation.Citation AUTO2
          The WMS 1.3.0 "Automatic Projections" authority.
static org.opengis.metadata.citation.Citation CRS
          The WMS 1.3.0 "CRS" authority.
static org.opengis.metadata.citation.Citation EPSG
          The European Petroleum Survey Group authority.
static org.opengis.metadata.citation.Citation ESRI
          The ESRI organisation.
static org.opengis.metadata.citation.Citation GEOTIFF
          The GeoTIFF specification.
static org.opengis.metadata.citation.Citation GEOTOOLS
          The Geotools project.
static org.opengis.metadata.citation.Citation JAI
          The Java Advanced Imaging library.
static org.opengis.metadata.citation.Citation OGC
          The Open Geospatial consortium organisation.
static org.opengis.metadata.citation.Citation OPEN_GIS
          The OpenGIS consortium organisation.
static org.opengis.metadata.citation.Citation ORACLE
          The Oracle organisation.
static org.opengis.metadata.citation.Citation WMS
          The Web Map Service specification.
 
Method Summary
static org.opengis.metadata.citation.Citation fromName(java.lang.String title)
          Returns a citation of the given name.
static boolean identifierMatches(org.opengis.metadata.citation.Citation c1, org.opengis.metadata.citation.Citation c2)
          Returns if at least one identifier in is equals to an identifier of the same type in .
static boolean identifierMatches(org.opengis.metadata.citation.Citation citation, java.lang.String identifier)
          Returns if any identifiers in the given citation matches the given string.
static boolean titleMatches(org.opengis.metadata.citation.Citation c1, org.opengis.metadata.citation.Citation c2)
          Returns if at least one title or alternate title in is equals to a title or alternate title in .
static boolean titleMatches(org.opengis.metadata.citation.Citation citation, java.lang.String title)
          Returns if the title or any alternate title in the given citation matches the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OGC

public static final org.opengis.metadata.citation.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 abreviations).

See Also:
ResponsiblePartyImpl.OGC, OPEN_GIS

OPEN_GIS

public static final org.opengis.metadata.citation.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 abreviations).

See Also:
ResponsiblePartyImpl.OPEN_GIS, OGC

ESRI

public static final org.opengis.metadata.citation.Citation ESRI
The ESRI organisation.

See Also:
ResponsiblePartyImpl.ESRI

ORACLE

public static final org.opengis.metadata.citation.Citation ORACLE
The Oracle organisation.

See Also:
ResponsiblePartyImpl.ORACLE

GEOTOOLS

public static final org.opengis.metadata.citation.Citation GEOTOOLS
The Geotools project.

See Also:
ResponsiblePartyImpl.GEOTOOLS

WMS

public static final org.opengis.metadata.citation.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 upgrated in future Geotools versions.

See Also:
Open Geospatial Consortium, WMS 1.1.1 specification, WMS 1.3.0 specification, ResponsiblePartyImpl.OGC, OnLineResourceImpl.WMS

GEOTIFF

public static final org.opengis.metadata.citation.Citation GEOTIFF
The GeoTIFF specification.

See Also:
ResponsiblePartyImpl.GEOTIFF

JAI

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

See Also:
ResponsiblePartyImpl.SUN_MICROSYSTEMS

EPSG

public static final org.opengis.metadata.citation.Citation EPSG
The European Petroleum Survey Group authority. An alternate title for this citation is "EPSG" (according ISO 19115, alternate titles often contain abreviations). In addition, this citation contains the "EPSG" identifier for the "Authority name" identifier type.

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

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

AUTO

public static final org.opengis.metadata.citation.Citation AUTO
The WMS 1.1.1 "Automatic Projections" authority. An alternate title for this citation is "AUTO" (according ISO 19115, alternate titles often contain abreviations). In addition, this citation contains the "AUTO" identifier for the "Authority name" identifier type.

Warning: 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, Geotools compares the 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 org.opengis.metadata.citation.Citation AUTO2
The WMS 1.3.0 "Automatic Projections" authority. An alternate title for this citation is "AUTO2" (according ISO 19115, alternate titles often contain abreviations). In addition, this citation contains the "AUTO2" identifier for the "Authority name" identifier type.

Warning: 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, Geotools compares the 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 org.opengis.metadata.citation.Citation CRS
The WMS 1.3.0 "CRS" authority. This is defined in the same document than AUTO2.

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

fromName

public static org.opengis.metadata.citation.Citation fromName(java.lang.String title)
Returns a citation of the given name. If the given name matches a title or an alternate titles of one of the pre-defined constants (EPSG, GEOTIFF, etc.), then this constant is returned. Otherwise, a new citation is created with the specified name as the title.

Parameters:
title - The citation title (or alternate title).
Returns:
A citation using the specified name

titleMatches

public static boolean titleMatches(org.opengis.metadata.citation.Citation c1,
                                   org.opengis.metadata.citation.Citation c2)
Returns if at least one title or alternate title in is equals to a title or alternate title in . The comparaison 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:
if at least one title or alternate title matches.

titleMatches

public static boolean titleMatches(org.opengis.metadata.citation.Citation citation,
                                   java.lang.String title)
Returns if the title or any alternate title in the given citation matches the given string. The comparaison 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:
if the title or alternate title matches the given string.

identifierMatches

public static boolean identifierMatches(org.opengis.metadata.citation.Citation c1,
                                        org.opengis.metadata.citation.Citation c2)
Returns if at least one identifier in is equals to an identifier of the same type in . The comparaison 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 comparaison 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:
if at least one title or alternate title matches.

identifierMatches

public static boolean identifierMatches(org.opengis.metadata.citation.Citation citation,
                                        java.lang.String identifier)
Returns if any identifiers in the given citation matches the given string. The comparaison 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 comparaison 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:
if the title or alternate title matches the given string.


Copyright © GeoTools. All Rights Reserved.