Class DefaultKeywords
java.lang.Object
org.apache.sis.metadata.AbstractMetadata
org.apache.sis.metadata.ModifiableMetadata
org.apache.sis.metadata.iso.ISOMetadata
org.apache.sis.metadata.iso.identification.DefaultKeywords
- All Implemented Interfaces:
Serializable,Emptiable,LenientComparable,IdentifiedObject,org.opengis.metadata.identification.Keywords
public class DefaultKeywords
extends ISOMetadata
implements org.opengis.metadata.identification.Keywords
Keywords, their type and reference source.
The following property is mandatory in a well-formed metadata according ISO 19115:
MD_Keywords
└─keyword…… Commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.Limitations
- Instances of this class are not synchronized for multi-threading. Synchronization, if needed, is caller's responsibility.
- Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases.
Serialization support is appropriate for short term storage or RMI between applications running the
same version of Apache SIS. For long term storage, use
XMLinstead.
- Since:
- 0.3
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.metadata.ModifiableMetadata
ModifiableMetadata.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DefaultKeywordClassUser-defined categorization of groups of keywords that extend or are orthogonal to the standardized keyword type codes.private Collection<org.opengis.util.InternationalString>Commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.private static final longSerial number for compatibility with different versions.private org.opengis.metadata.citation.CitationName of the formally registered thesaurus or a similar authoritative source of keywords.private org.opengis.metadata.identification.KeywordTypeSubject matter used to group similar keywords.Fields inherited from class org.apache.sis.metadata.iso.ISOMetadata
identifiers -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an initially empty keywords.DefaultKeywords(CharSequence... keywords) Creates keywords initialized to the given key word.DefaultKeywords(org.opengis.metadata.identification.Keywords object) Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultKeywordscastOrCopy(org.opengis.metadata.identification.Keywords object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.Returns the user-defined categorization of groups of keywords that extend or are orthogonal to the standardized keyword type codes.Collection<org.opengis.util.InternationalString>Returns commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.org.opengis.metadata.citation.CitationReturns the name of the formally registered thesaurus or a similar authoritative source of keywords.org.opengis.metadata.identification.KeywordTypegetType()Returns the subject matter used to group similar keywords.voidsetKeywordClass(DefaultKeywordClass newValue) Sets the user-defined categorization of groups of keywords.voidsetKeywords(Collection<? extends org.opengis.util.InternationalString> newValues) Sets commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.voidsetThesaurusName(org.opengis.metadata.citation.Citation newValue) Sets the name of the formally registered thesaurus or a similar authoritative source of keywords.voidsetType(org.opengis.metadata.identification.KeywordType newValue) Sets the subject matter used to group similar keywords.Methods inherited from class org.apache.sis.metadata.iso.ISOMetadata
getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifier, transitionToMethods inherited from class org.apache.sis.metadata.ModifiableMetadata
checkWritePermission, collectionType, copyCollection, copyList, copyMap, copySet, deepCopy, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, writeCollection, writeList, writeMap, writeSetMethods inherited from class org.apache.sis.metadata.AbstractMetadata
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for compatibility with different versions.- See Also:
-
keywords
Commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject. -
type
private org.opengis.metadata.identification.KeywordType typeSubject matter used to group similar keywords. -
thesaurusName
private org.opengis.metadata.citation.Citation thesaurusNameName of the formally registered thesaurus or a similar authoritative source of keywords. -
keywordClass
User-defined categorization of groups of keywords that extend or are orthogonal to the standardized keyword type codes.
-
-
Constructor Details
-
DefaultKeywords
public DefaultKeywords()Constructs an initially empty keywords. -
DefaultKeywords
Creates keywords initialized to the given key word.- Parameters:
keywords- commonly used words or formalised words or phrases used to describe the subject, ornullif none.
-
DefaultKeywords
public DefaultKeywords(org.opengis.metadata.identification.Keywords object) Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, because the other metadata contained in the given object are not recursively copied.- Parameters:
object- the metadata to copy values from, ornullif none.- See Also:
-
-
Method Details
-
castOrCopy
Returns a SIS metadata implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:- If the given object is
null, then this method returnsnull. - Otherwise if the given object is already an instance of
DefaultKeywords, then it is returned unchanged. - Otherwise a new
DefaultKeywordsinstance is created using the copy constructor and returned. Note that this is a shallow copy operation, because the other metadata contained in the given object are not recursively copied.
- Parameters:
object- the object to get as a SIS implementation, ornullif none.- Returns:
- a SIS implementation containing the values of the given object (may be the
given object itself), or
nullif the argument was null.
- If the given object is
-
getKeywords
Returns commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.- Specified by:
getKeywordsin interfaceorg.opengis.metadata.identification.Keywords- Returns:
- word(s) or phrase(s) used to describe the subject.
-
setKeywords
Sets commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject.- Parameters:
newValues- the new keywords.
-
getType
public org.opengis.metadata.identification.KeywordType getType()Returns the subject matter used to group similar keywords.- Specified by:
getTypein interfaceorg.opengis.metadata.identification.Keywords- Returns:
- subject matter used to group similar keywords, or
null.
-
setType
public void setType(org.opengis.metadata.identification.KeywordType newValue) Sets the subject matter used to group similar keywords.- Parameters:
newValue- the new keyword type.
-
getThesaurusName
public org.opengis.metadata.citation.Citation getThesaurusName()Returns the name of the formally registered thesaurus or a similar authoritative source of keywords.- Specified by:
getThesaurusNamein interfaceorg.opengis.metadata.identification.Keywords- Returns:
- name of registered thesaurus or similar authoritative source of keywords, or
null.
-
setThesaurusName
public void setThesaurusName(org.opengis.metadata.citation.Citation newValue) Sets the name of the formally registered thesaurus or a similar authoritative source of keywords.- Parameters:
newValue- the new thesaurus name.
-
getKeywordClass
@UML(identifier="keywordClass", obligation=OPTIONAL, specification=ISO_19115) public DefaultKeywordClass getKeywordClass()Returns the user-defined categorization of groups of keywords that extend or are orthogonal to the standardized keyword type codes.Upcoming API change — generalization
The element type will be changed to theKeywordClassinterface when GeoAPI will provide it (tentatively in GeoAPI 3.1).- Returns:
- user-defined categorization of groups of keywords, or
nullif none. - Since:
- 0.5
-
setKeywordClass
Sets the user-defined categorization of groups of keywords.Upcoming API change — generalization
The argument type will be changed to theKeywordClassinterface when GeoAPI will provide it (tentatively in GeoAPI 3.1).- Parameters:
newValue- new user-defined categorization of groups of keywords.- Since:
- 0.5
-