Package org.apache.sis.internal.simple
Class CitationConstant
java.lang.Object
org.apache.sis.internal.simple.SimpleCitation
org.apache.sis.internal.simple.CitationConstant
- All Implemented Interfaces:
Serializable
,org.opengis.metadata.citation.Citation
- Direct Known Subclasses:
CitationConstant.Authority
Base class for the
public static final Citation
constants defined in some SIS classes.
This base class contains only an abbreviation (e.g. "OGC"
or "EPSG"
) which can
be used as the primary key where to search for more information in a database. If no database
is available, then that simple primary key will be used as the citation title.- Since:
- 0.6
- Version:
- 1.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class ofpublic static final Citation
constants which are also used as namespace for identifiers. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.metadata.citation.Citation
The citation which contain the "real" data, ornull
if not yet created.final String
The name by which this citation is known toCitations.fromName(String)
.private static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.internal.simple.SimpleCitation
title
-
Constructor Summary
ConstructorsConstructorDescriptionCitationConstant
(String name) Creates a new proxy for the given primary key.CitationConstant
(String name, String namespace) Creates a new proxy for the given primary key but a different programmatic name. -
Method Summary
Modifier and TypeMethodDescriptionprivate org.opengis.metadata.citation.Citation
delegate()
Returns the citation instance which contain the actual data.Collection<? extends org.opengis.util.InternationalString>
Redirects the call to the delegate citation (the instance which actually contain the data).Collection<? extends org.opengis.metadata.citation.ResponsibleParty>
Collection<? extends org.opengis.metadata.citation.CitationDate>
getDates()
org.opengis.util.InternationalString
Collection<? extends org.opengis.metadata.Identifier>
getISBN()
getISSN()
org.opengis.util.InternationalString
Collection<org.opengis.metadata.citation.PresentationForm>
org.opengis.metadata.citation.Series
org.opengis.util.InternationalString
getTitle()
Returns the title, which is mandatory.protected Object
Invoked at deserialization time in order to replace the deserialized instance by the existing instance defined in theCitations
class.final void
refresh()
Notify this instance that the database content may have changed, or that the classpath has changed.Methods inherited from class org.apache.sis.internal.simple.SimpleCitation
equals, getCollectiveTitle, hashCode, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
namespace
The name by which this citation is known toCitations.fromName(String)
. Often the same than the abbreviation thatCitationConstant
uses as the title. If thisCitationConstant
is aCitationConstant.Authority
subtype, then this is also the authority namespace. -
delegate
private transient volatile org.opengis.metadata.citation.Citation delegateThe citation which contain the "real" data, ornull
if not yet created. This is usually an instance created byMetadataSource
. Those instances manage their own caching, so accesses to the database should not occur often.
-
-
Constructor Details
-
CitationConstant
Creates a new proxy for the given primary key. The key should be readable enough for being usable as a fallback if the database is not available.- Parameters:
name
- a human-understandable primary key for fetching more information.
-
CitationConstant
Creates a new proxy for the given primary key but a different programmatic name. The key should be readable enough for being usable as a fallback if the database is not available.- Parameters:
name
- a human-understandable primary key for fetching more information.namespace
- the name by which this citation is known toCitations.fromName(String)
.
-
-
Method Details
-
refresh
public final void refresh()Notify this instance that the database content may have changed, or that the classpath has changed. -
delegate
private org.opengis.metadata.citation.Citation delegate()Returns the citation instance which contain the actual data. That instance is provided by thesis-metadata
module, which is optional. If that module is not on the classpath, then thisdelegate()
method will use the few information provided by the current instance.Note that it should be very rare to not have
sis-metadata
on the classpath, since that module is required bysis-referencing
which is itself required by almost all other SIS modules. -
getTitle
public org.opengis.util.InternationalString getTitle()Returns the title, which is mandatory.- Specified by:
getTitle
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getTitle
in classSimpleCitation
- Returns:
- the title given at construction time.
-
getAlternateTitles
Redirects the call to the delegate citation (the instance which actually contain the data).- Specified by:
getAlternateTitles
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getAlternateTitles
in classSimpleCitation
- Returns:
- the value returned by the delegate.
-
getDates
- Specified by:
getDates
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getDates
in classSimpleCitation
-
getEdition
public org.opengis.util.InternationalString getEdition()- Specified by:
getEdition
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getEdition
in classSimpleCitation
-
getEditionDate
- Specified by:
getEditionDate
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getEditionDate
in classSimpleCitation
-
getIdentifiers
- Specified by:
getIdentifiers
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getIdentifiers
in classSimpleCitation
-
getCitedResponsibleParties
public Collection<? extends org.opengis.metadata.citation.ResponsibleParty> getCitedResponsibleParties()- Specified by:
getCitedResponsibleParties
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getCitedResponsibleParties
in classSimpleCitation
-
getPresentationForms
- Specified by:
getPresentationForms
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getPresentationForms
in classSimpleCitation
-
getSeries
public org.opengis.metadata.citation.Series getSeries()- Specified by:
getSeries
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getSeries
in classSimpleCitation
-
getOtherCitationDetails
public org.opengis.util.InternationalString getOtherCitationDetails()- Specified by:
getOtherCitationDetails
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getOtherCitationDetails
in classSimpleCitation
-
getISBN
- Specified by:
getISBN
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getISBN
in classSimpleCitation
-
getISSN
- Specified by:
getISSN
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getISSN
in classSimpleCitation
-
readResolve
Invoked at deserialization time in order to replace the deserialized instance by the existing instance defined in theCitations
class.- Returns:
- the instance to use, as an unique instance if possible.
- Throws:
ObjectStreamException
- never thrown.
-