public final class Citations extends Static
Citation
constants:
Citation
are references mostly for human reading.IdentifierSpace
provide the code spaces for identifiers
(most often Coordinate Reference System identifiers)
together with information about who maintains those identifiers."EPSG:4326"
is a widely-used identifier
for the “World Geodetic System (WGS) 1984” Coordinate Reference System (CRS).
The "4326"
part is the identifier code and
the "EPSG"
part is the identifier code space.
The meaning of codes in that code space is controlled by an authority,
the “EPSG Geodetic Parameter Dataset”. The cited
responsible party for the EPSG dataset is the “International Association of Oil & Gas producers” (IOGP).
DefaultCitation.getIdentifiers()
for the ISBN
and ISSN
constants.ImmutableIdentifier.getAuthority()
for other IdentifierSpace
constants.DefaultMetadata.getMetadataStandards()
for other Citation
constants.IdentifierSpace
instances).Citation
by comparing their titles or
their identifiers.Defined in the sis-metadata
module
Modifier and Type | Field and Description |
---|---|
static IdentifierSpace<Integer> |
EPSG
The authority for identifiers of objects defined by the
EPSG Geodetic Parameter Dataset.
|
static IdentifierSpace<String> |
ESRI
The authority for identifiers of objects defined by ESRI.
|
static IdentifierSpace<Integer> |
GEOTIFF
The authority for identifiers of objects defined by the
the GeoTIFF specification.
|
static IdentifierSpace<String> |
ISBN
The International Standard Book Number (ISBN) defined by ISO-2108.
|
static List<Citation> |
ISO_19115
The Geographic Information — Metadata standards defined by ISO 19115.
|
static IdentifierSpace<String> |
ISSN
The International Standard Serial Number (ISSN) defined by ISO-3297.
|
static IdentifierSpace<Integer> |
MAP_INFO
The authority for identifiers of objects defined by MapInfo.
|
static IdentifierSpace<String> |
NETCDF
The authority for identifiers of objects defined by the
NetCDF specification.
|
static IdentifierSpace<String> |
OGC
The authority for identifiers found in specifications from the
Open Geospatial Consortium.
|
static IdentifierSpace<String> |
PROJ4
The authority for identifiers of objects defined by the Proj.4 project.
|
static IdentifierSpace<Integer> |
S57
The IHO transfer standard
for digital hydrographic data specification.
|
static Citation |
SIS
The codespace of objects that are specific to the Apache SIS project.
|
static IdentifierSpace<Integer> |
WMS
The authority for identifiers of objects defined by the
Web Map Service (WMS) specification.
|
Modifier and Type | Method and Description |
---|---|
static Citation |
fromName(String identifier)
Returns a citation of the given identifier.
|
static String |
getCodeSpace(Citation citation)
Infers a code space from the given citation, or returns
null if none. |
static String |
getIdentifier(Citation citation)
Infers an identifier from the given citation, or returns
null if no identifier has been found. |
static String |
getUnicodeIdentifier(Citation citation)
Infers a valid Unicode identifier from the given citation, or returns
null if none. |
static boolean |
identifierMatches(Citation c1,
Citation c2)
|
static boolean |
identifierMatches(Citation citation,
String identifier)
Returns
true if at least one identifier
in the given citation have a code matching the given
string. |
static boolean |
titleMatches(Citation c1,
Citation c2)
Returns
true if at least one title or
alternate title in c1 is leniently
equal to a title or alternate title in c2 . |
static boolean |
titleMatches(Citation citation,
String title)
|
public static final List<Citation> ISO_19115
MI_Band
and MD_Band
). This is why those standards
are defined in a collection rather than as separated constants.
public static final IdentifierSpace<Integer> EPSG
"EPSG"
.
"EPSG"
namespace shall be used for identifying
Coordinate Reference System objects.
But in the particular case of GML, both "EPSG"
and "IOGP"
appear in different locations.
For example:
<gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>Guidelines:
"EPSG"
name shall be used in URN. This part of the URN is called "the authority" and
is returned by both Identifier.getAuthority()
and Identifier.getCodeSpace()
."IOGP"
name appears in the GML codeSpace
attribute, but despite the attribute name this
is not the Identifier.getCodeSpace()
value of the "EPSG:4326"
identifier.
Instead, Apache SIS considers "IOGP"
as the codespace of the "IOGP:EPSG"
identifier,
which is the identifier of this citation."IOGP:EPSG"
identifier is handled in a special way by getIdentifier(Citation)
,
which return only "EPSG"
.
ImmutableIdentifier.getAuthority()
ConcurrentAuthorityFactory.getAuthority()
with the addition of version information.public static final IdentifierSpace<Integer> WMS
The citation responsible parties
are the OGC and ISO organizations.
The namespace declared by this constant is "OGC"
,
but the "CRS"
, "AUTO"
and "AUTO2"
namespaces are also commonly found in practice.
public static final IdentifierSpace<String> OGC
"OGC"
.
Apache SIS uses this authority mostly for map projection methods and parameters as they were defined in older
OGC specifications (in more recent specifications, EPSG identifiers tend to be more widely used).
"OGC:Mercator_1SP"
identifier
and the following parameters:
Name in OGC namespace | Name in default namespace (EPSG) |
---|---|
"OGC:semi_major" | |
"OGC:semi_minor" | |
"OGC:latitude_of_origin" | Latitude of natural origin |
"OGC:central_meridian" | Longitude of natural origin |
"OGC:scale_factor" | Scale factor at natural origin |
"OGC:false_easting" | False easting |
"OGC:false_northing" | False northing |
public static final IdentifierSpace<String> ESRI
"ESRI"
.
This citation is used as the authority for many map projection method and parameter names
other than the EPSG ones.
Name in ESRI namespace | Name in OGC namespace |
---|---|
"ESRI:Semi_Major" | "OGC:semi_major" |
"ESRI:Semi_Minor" | "OGC:semi_minor" |
"ESRI:Latitude_Of_Origin" | "OGC:latitude_of_origin" |
"ESRI:Central_Meridian" | "OGC:central_meridian" |
"ESRI:Scale_Factor" | "OGC:scale_factor" |
"ESRI:False_Easting" | "OGC:false_easting" |
"ESRI:False_Northing" | "OGC:false_northing" |
public static final IdentifierSpace<String> NETCDF
"NetCDF"
.
This citation is used as the authority for some map projection method and parameter names
as used in netCDF files.
Name in netCDF namespace | Name in default namespace (EPSG) |
---|---|
"NetCDF:semi_major_axis" | |
"NetCDF:semi_minor_axis" | |
"NetCDF:latitude_of_projection_origin" | Latitude of natural origin |
"NetCDF:longitude_of_projection_origin" | Longitude of natural origin |
"NetCDF:scale_factor_at_projection_origin" | Scale factor at natural origin |
"NetCDF:false_easting" | False easting |
"NetCDF:false_northing" | False northing |
public static final IdentifierSpace<Integer> GEOTIFF
public static final IdentifierSpace<String> PROJ4
public static final IdentifierSpace<Integer> MAP_INFO
public static final IdentifierSpace<Integer> S57
public static final IdentifierSpace<String> ISBN
DefaultCitation.getISBN()
public static final IdentifierSpace<String> ISSN
DefaultCitation.getISSN()
public static final Citation SIS
public static Citation fromName(String identifier)
null
or empty (ignoring spaces), then this method returns null
.EPSG
, GEOTIFF
, etc.), then that constant is returned.identifier
- the citation title (or alternate title), or null
.null
if the given title is null or empty.public static boolean titleMatches(Citation c1, Citation c2)
true
if at least one title or
alternate title in c1
is leniently
equal to a title or alternate title in c2
. The comparison is case-insensitive
and ignores every character which is not a letter or a digit. The titles ordering is not significant.c1
- the first citation to compare, or null
.c2
- the second citation to compare, or null
.true
if both arguments are non-null, and 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 comparison is case-insensitive and ignores every character
which is not a letter or a digit.citation
- the citation to check for, or null
.title
- the title or alternate title to compare, or null
.true
if both arguments are non-null, and the title or an alternate
title matches the given string.public static boolean identifierMatches(Citation c1, Citation c2)
true
if at least one identifier
code in c1
is equal to an identifier code in
c2
. Code spaces are compared only if
provided in the two identifiers being compared. Comparisons are case-insensitive and ignores
every character which is not a letter or a digit.
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 the citation
titles without identifiers.
c1
- the first citation to compare, or null
.c2
- the second citation to compare, or null
.true
if both arguments are non-null, and at least one identifier matches.public static boolean identifierMatches(Citation citation, String identifier)
true
if at least one identifier
in the given citation have a code matching the given
string. The comparison is case-insensitive and ignores every character which is not a
letter or a digit.
If (and only if) the citation does not contain any identifier, then this method
fallback on titles comparison using the titleMatches
method. This fallback exists for compatibility with citations using
title and
alternate titles (often abbreviations)
without identifiers.
citation
- the citation to check for, or null
.identifier
- the identifier to compare, or null
.true
if both arguments are non-null, and an identifier matches the given string.public static String getIdentifier(Citation citation)
null
if no identifier has been found.
This method is useful for extracting a short designation of an authority (e.g. "EPSG"
)
for display purpose. This method performs the following choices:
null
, then this method returns null
."[codespace:]code"
format. If a codespace exists,
then the above restriction about the code is relaxed in two ways:
"[codespace:]code"
format, despite not being a valid Unicode identifier.null
.citation
- the citation for which to get the identifier, or null
.null
if the given citation is null or does not declare any identifier or title.public static String getUnicodeIdentifier(Citation citation)
null
if none.
This method is useful for extracting a short designation of an authority (e.g. "EPSG"
)
for processing purpose. This method performs the following actions:
getIdentifier(Citation)
except that '_'
is used instead of ':'
as the separator between the codespace and the code.null
or is not a
valid Unicode identifier,
then return null
.µ
ª
(feminine ordinal indicator)º
(masculine ordinal indicator)⁔
citation
- the citation for which to get the Unicode identifier, or null
.null
if the given citation is null or does not have any Unicode identifier or title.ImmutableIdentifier
,
IdentifiedObjects.getUnicodeIdentifier(IdentifiedObject)
,
CharSequences.isUnicodeIdentifier(CharSequence)
public static String getCodeSpace(Citation citation)
null
if none.
This method is very close to getUnicodeIdentifier(Citation)
, except that it looks for
IdentifierSpace.getName()
before to scan the identifiers and titles. The result should
be the same in most cases, except some cases like the Citations
constant for "Proj.4"
in which case this method returns "Proj4"
instead of null
.citation
- the citation for which to infer the code space, or null
.null
if the given citation is null or does not have any Unicode identifier or title.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.