|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectCitations
public final class Citations
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 Citations
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 "EPSG"
, and EPSG codes look like "EPSG:4326"
.
Field Summary | |
---|---|
static Citation |
AUTO
The WMS 1.1.1 "Automatic Projections" authority. |
static Citation |
AUTO2
The WMS 1.3.0 "Automatic Projections" authority. |
static Citation |
CRS
The WMS 1.3.0 "CRS" authority. |
static Citation |
EPSG
The European Petroleum Survey Group authority. |
static Citation |
ESRI
The ESRI organisation. |
static Citation |
GEOTIFF
The GeoTIFF specification. |
static Citation |
GEOTOOLS
The Geotools project. |
static Citation |
HTTP_OGC
URL in the OGC namespace. |
static Citation |
JAI
The Java Advanced Imaging library. |
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 Citation |
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 equals 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 equals 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 |
---|
public static final Citation OGC
ResponsiblePartyImpl.OGC
,
OPEN_GIS
public static final Citation OPEN_GIS
ResponsiblePartyImpl.OPEN_GIS
,
OGC
public static final Citation ESRI
ResponsiblePartyImpl.ESRI
public static final Citation ORACLE
ResponsiblePartyImpl.ORACLE
public static final Citation POSTGIS
ResponsiblePartyImpl.POSTGIS
public static final Citation GEOTOOLS
ResponsiblePartyImpl.GEOTOOLS
public static final Citation WMS
ResponsiblePartyImpl.OGC
,
OnLineResourceImpl.WMS
public static final Citation GEOTIFF
ResponsiblePartyImpl.GEOTIFF
public static final Citation JAI
ResponsiblePartyImpl.SUN_MICROSYSTEMS
public static final Citation EPSG
This citation is used as an authority for
coordinate reference system
identifiers. When searching an CRS
authority factory on EPSG data, Geotools compares the "EPSG"
string against the
identifiers (or against the title and alternate titles if there is no identifier)
using the identifierMatches
method.
ResponsiblePartyImpl.EPSG
,
AUTO
,
AUTO2
,
CRS
public static final Citation AUTO
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, Geotools compares the "AUTO"
string against the
identifiers (or against the title and alternate titles if there is no identifier)
using the identifierMatches
method.
WMS
,
AUTO2
,
CRS
,
EPSG
public static final Citation AUTO2
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, Geotools compares the "AUTO2"
string against the
identifiers (or against the title and alternate titles if there is no identifier)
using the identifierMatches
method.
WMS
,
AUTO
,
CRS
,
EPSG
public static final Citation CRS
AUTO2
.
WMS
,
AUTO
,
AUTO2
,
CRS
,
EPSG
public static final Citation URN_OGC
"urn:ogc:def"
and
"urn:x-ogc:def"
identifiers for the
"Authority name" identifier type.
public static final Citation HTTP_OGC
"http://www.opengis.net"
identifiers
for the "Authority name" identifier type.
Method Detail |
---|
public static Citation fromName(String title)
EPSG
, GEOTIFF
, etc.),
then this constant is returned. Otherwise, a new citation is created with the specified
name as the title.
title
- The citation title (or alternate title).
public static boolean titleMatches(Citation c1, Citation c2)
true
if at least one title or
alternate title 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.
c1
- The first citation to compare.c2
- the second citation to compare.
true
if at least one title or alternate title matches.public static boolean titleMatches(Citation citation, String title)
true
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.
citation
- The citation to check for.title
- The title or alternate title to compare.
true
if the title or alternate title matches the given string.public static boolean identifierMatches(Citation c1, Citation c2)
true
if at least one identifier 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 titleMatches
method. This fallback exists for compatibility with client codes using
citation titles without identifiers.
c1
- The first citation to compare.c2
- the second citation to compare.
true
if at least one identifier, title or alternate title matches.public static boolean identifierMatches(Citation citation, String identifier)
true
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.
citation
- The citation to check for.identifier
- The identifier to compare.
true
if the title or alternate title matches the given string.public static String getIdentifier(Citation citation)
"EPSG"
.
citation
- The citation for which to get the identifier.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |