public final class Citations extends Static
IdentifierSpace
.Defined in the sis-metadata
module
Modifier and Type | Field and Description |
---|---|
static IdentifierSpace<Integer> |
EPSG
The European Petroleum Survey Group authority.
|
static Citation |
ESRI
The ESRI organization.
|
static Citation |
GEOTIFF
The GeoTIFF specification.
|
static IdentifierSpace<String> |
ISBN
International Standard Book Number (ISBN) defined by ISO-2108.
|
static Citation |
ISO
|
static IdentifierSpace<String> |
ISSN
International Standard Serial Number (ISSN) defined by ISO-3297.
|
static Citation |
NETCDF
The NetCDF specification.
|
static Citation |
OGC
The Open Geospatial Consortium organization.
|
static Citation |
OGP
The International Association of Oil & Gas Producers organization.
|
static Citation |
ORACLE
The Oracle organization.
|
static IdentifierSpace<String> |
PROJ4
The Proj.4 project.
|
static Citation |
SIS
The Apache SIS project.
|
Modifier and Type | Method and Description |
---|---|
static Citation |
fromName(String title)
Returns a citation of the given name.
|
static String |
getIdentifier(Citation citation)
Infers an identifier from the given citation, or returns
null if no identifier has been found. |
static boolean |
identifierMatches(Citation c1,
Citation 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 leniently
equal to a title or alternate title in c2 . |
static boolean |
titleMatches(Citation citation,
String title)
|
public static final Citation ISO
public static final Citation OGC
public static final Citation OGP
EPSG
database.EPSG
public static final Citation SIS
public static final Citation ESRI
public static final IdentifierSpace<String> PROJ4
public static final IdentifierSpace<Integer> EPSG
OGP
,
#AUTO
,
#AUTO2
,
#CRS
public static final IdentifierSpace<String> ISBN
DefaultCitation.getISBN()
public static final IdentifierSpace<String> ISSN
DefaultCitation.getISSN()
public static Citation fromName(String title)
null
or empty (ignoring spaces), then this method returns null
.EPSG
, GEOTIFF
, etc.), then that constant is returned.title
- 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 alternate
title matches the given string.public static boolean identifierMatches(Citation c1, Citation c2)
true
if at least one identifier in
c1
is equal to an identifier in c2
. The comparison is 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,
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 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 client codes using citation
titles 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 the title or alternate title
matches the given string.public static String getIdentifier(Citation citation)
null
if no identifier has been found.
This method is useful for extracting the namespace from an authority, for example "EPSG"
.
The implementation performs the following choices:
null
, then this method returns null
.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.Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.