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 classClass ofpublic static final Citationconstants which are also used as namespace for identifiers. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.metadata.citation.CitationThe citation which contain the "real" data, ornullif not yet created.final StringThe name by which this citation is known toCitations.fromName(String).private static final longFor 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.Citationdelegate()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.InternationalStringCollection<? extends org.opengis.metadata.Identifier>getISBN()getISSN()org.opengis.util.InternationalStringCollection<org.opengis.metadata.citation.PresentationForm>org.opengis.metadata.citation.Seriesorg.opengis.util.InternationalStringgetTitle()Returns the title, which is mandatory.protected ObjectInvoked at deserialization time in order to replace the deserialized instance by the existing instance defined in theCitationsclass.final voidrefresh()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 thatCitationConstantuses as the title. If thisCitationConstantis aCitationConstant.Authoritysubtype, then this is also the authority namespace. -
delegate
private transient volatile org.opengis.metadata.citation.Citation delegateThe citation which contain the "real" data, ornullif 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-metadatamodule, 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-metadataon the classpath, since that module is required bysis-referencingwhich is itself required by almost all other SIS modules. -
getTitle
public org.opengis.util.InternationalString getTitle()Returns the title, which is mandatory.- Specified by:
getTitlein interfaceorg.opengis.metadata.citation.Citation- Overrides:
getTitlein 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:
getAlternateTitlesin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getAlternateTitlesin classSimpleCitation- Returns:
- the value returned by the delegate.
-
getDates
- Specified by:
getDatesin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getDatesin classSimpleCitation
-
getEdition
public org.opengis.util.InternationalString getEdition()- Specified by:
getEditionin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getEditionin classSimpleCitation
-
getEditionDate
- Specified by:
getEditionDatein interfaceorg.opengis.metadata.citation.Citation- Overrides:
getEditionDatein classSimpleCitation
-
getIdentifiers
- Specified by:
getIdentifiersin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getIdentifiersin classSimpleCitation
-
getCitedResponsibleParties
public Collection<? extends org.opengis.metadata.citation.ResponsibleParty> getCitedResponsibleParties()- Specified by:
getCitedResponsiblePartiesin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getCitedResponsiblePartiesin classSimpleCitation
-
getPresentationForms
- Specified by:
getPresentationFormsin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getPresentationFormsin classSimpleCitation
-
getSeries
public org.opengis.metadata.citation.Series getSeries()- Specified by:
getSeriesin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getSeriesin classSimpleCitation
-
getOtherCitationDetails
public org.opengis.util.InternationalString getOtherCitationDetails()- Specified by:
getOtherCitationDetailsin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getOtherCitationDetailsin classSimpleCitation
-
getISBN
- Specified by:
getISBNin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getISBNin classSimpleCitation
-
getISSN
- Specified by:
getISSNin interfaceorg.opengis.metadata.citation.Citation- Overrides:
getISSNin classSimpleCitation
-
readResolve
Invoked at deserialization time in order to replace the deserialized instance by the existing instance defined in theCitationsclass.- Returns:
- the instance to use, as an unique instance if possible.
- Throws:
ObjectStreamException- never thrown.
-