| java.lang.Object org.geotools.metadata.iso.citation.Citations
Citations | final public class Citations (Code) | | A set of pre-defined constants and static methods working on
.
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
Citations class for clarity.
Citations may be about an organisation (e.g.
),
a specification (e.g.
) or an authority that
maintains definitions of codes (e.g.
). In the later case, the citation
contains an
which is the namespace of the
codes maintained by the authority. For example the identifier for the
Citations.EPSG citation
is
"EPSG" , and EPSG codes look like
"EPSG:4326" .
since: 2.2 version: $Id: Citations.java 27523 2007-10-17 09:14:21Z desruisseaux $ author: Martin Desruisseaux author: Jody Garnett @category |
Field Summary | |
final public static Citation | AUTO The WMS 1.1.1 "Automatic Projections"
authority. | final public static Citation | AUTO2 The WMS 1.3.0 "Automatic Projections" authority. | final public static Citation | CRS The WMS 1.3.0 "CRS" authority. | final public static Citation | EPSG The European Petroleum Survey Group authority.
An
for this citation is
"EPSG" (according ISO 19115, alternate titles often contain abreviations). | final public static Citation | ESRI The ESRI organisation. | final public static Citation | GEOTIFF The GeoTIFF specification. | final public static Citation | GEOTOOLS The Geotools project. | final public static Citation | HTTP_OGC URL in the OGC namespace. | final public static Citation | JAI The Java Advanced Imaging library. | final public static Citation | OGC The Open Geospatial consortium organisation. | final public static Citation | OPEN_GIS The OpenGIS consortium organisation. | final public static Citation | ORACLE The Oracle organisation. | final public static Citation | POSTGIS The PostGIS project. | final public static Citation | URN_OGC URN in the OGC namespace. | final public static Citation | WMS The Web Map Service specification. |
Method Summary | |
public static Citation | fromName(String title) Returns a citation of the given name. | public static String | getIdentifier(Citation citation) Returns the shortest identifier for the specified citation, or the title if there is
no identifier. | public static boolean | identifierMatches(Citation c1, Citation c2) Returns
true if at least one
in
c1 is equals to an identifier in
c2 . | public static boolean | identifierMatches(Citation citation, String identifier) Returns
true if any
in the given
citation matches the given string. | public static boolean | titleMatches(Citation c1, Citation c2) Returns
true if at least one
or
in
c1 is equals to a title
or alternate title in
c2 . | public static boolean | titleMatches(Citation citation, String title) Returns
true if the
or any
in the given citation
matches the given string. |
HTTP_OGC | final public static Citation HTTP_OGC(Code) | | URL in the OGC namespace. This citation contains the
"http://www.opengis.net"
for the "Authority name"
.
since: 2.4 |
OPEN_GIS | final public static Citation OPEN_GIS(Code) | | The OpenGIS consortium organisation.
"OpenGIS consortium" is the old name for "Open Geospatial consortium".
for this citation are
"OpenGIS" and "OGC" (according ISO 19115, alternate titles often contain abreviations).
See Also: ResponsiblePartyImpl.OPEN_GIS See Also: Citations.OGC |
URN_OGC | final public static Citation URN_OGC(Code) | | URN in the OGC namespace. This citation contains the
"urn:ogc:def" and
"urn:x-ogc:def"
for the
"Authority name"
.
since: 2.4 |
fromName | public static Citation fromName(String title)(Code) | | Returns a citation of the given name. If the given name matches a
or an
of one of the pre-defined constants (
Citations.EPSG ,
Citations.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). A citation using the specified name |
getIdentifier | public static String getIdentifier(Citation citation)(Code) | | 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" .
since: 2.4 |
identifierMatches | public static boolean identifierMatches(Citation c1, Citation c2)(Code) | | Returns
true if at least one
in
c1 is equals to an identifier in
c2 . 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
Citations.titleMatches(Citation,Citation)titleMatches method. This fallback exists for compatibility with client codes using
citation
without identifiers.
Parameters: c1 - The first citation to compare. Parameters: c2 - the second citation to compare. true if at least one identifier, title or alternate title matches. |
identifierMatches | public static boolean identifierMatches(Citation citation, String identifier)(Code) | | Returns
true if any
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
Citations.titleMatches(Citation,String) titleMatches method. This fallback exists for compatibility with client codes using
citation
without identifiers.
Parameters: citation - The citation to check for. Parameters: identifier - The identifier to compare. true if the title or alternate title matches the given string. |
titleMatches | public static boolean titleMatches(Citation c1, Citation c2)(Code) | | Returns
true if at least one
or
in
c1 is equals to a title
or alternate title in
c2 . The comparaison is case-insensitive and ignores leading
and trailing spaces. The titles ordering is not significant.
Parameters: c1 - The first citation to compare. Parameters: c2 - the second citation to compare. true if at least one title or alternate title matches. |
titleMatches | public static boolean titleMatches(Citation citation, String title)(Code) | | Returns
true if the
or any
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. Parameters: title - The title or alternate title to compare. true if the title or alternate title matches the given string. |
|
|