Package org.opengis.example.metadata
Class SimpleCitation
- Object
-
- SimpleCitation
-
- All Implemented Interfaces:
Serializable,CharSequence,Comparable<InternationalString>,Citation,InternationalString
public class SimpleCitation extends Object implements Citation, InternationalString, Serializable
ACitationcontaining only a title attribute as anInternationalString. All other citation attributes arenullor empty collections.This class can also be used as an
InternationalStringimplementation. Because there is only one attribute - the title - there is no ambiguity about the value represented by the citation or the international string.- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleCitationEPSGThe European Petroleum Survey Group authority.static SimpleCitationOGCThe Open Geospatial Consortium authority.protected StringtitleThe citation title to be returned bygetTitle()as anInternationalString.
-
Constructor Summary
Constructors Constructor Description SimpleCitation(String title)Creates a new citation having the given title.
-
Method Summary
Modifier and Type Method Description charcharAt(int index)Returns the title character at the given indexintcompareTo(InternationalString object)Compares the title with the string representation of the given object for order.booleanequals(Object object)Returnstrueif the given object is aSimpleCitationhaving a title equals to this title.InternationalStringgetTitle()inthashCode()Returns a hash code value for this citation.intlength()Returns the number of characters in the title.StringsubSequence(int start, int end)Returns a substring of the title for the given range of index.StringtoString()Returns the title as an unlocalized string.StringtoString(Locale locale)Returns the title, ignoring the given locale.-
Methods inherited from interface CharSequence
chars, codePoints
-
Methods inherited from interface Citation
getAlternateTitles, getCitedResponsibleParties, getCollectiveTitle, getDates, getEdition, getEditionDate, getGraphics, getIdentifiers, getISBN, getISSN, getOnlineResources, getOtherCitationDetails, getPresentationForms, getSeries
-
-
-
-
Field Detail
-
OGC
public static final SimpleCitation OGC
The Open Geospatial Consortium authority.- See Also:
Factory.getVendor()
-
EPSG
public static final SimpleCitation EPSG
The European Petroleum Survey Group authority. This authority provides many CRS definitions.
-
title
protected final String title
The citation title to be returned bygetTitle()as anInternationalString. This is also the value returned by theInternationalStringmethods liketoString(Locale)andtoString().- See Also:
getTitle(),toString(),toString(Locale)
-
-
Constructor Detail
-
SimpleCitation
public SimpleCitation(String title)
Creates a new citation having the given title. The given string will be returned, directly or indirectly, by thegetTitle(),toString()andtoString(Locale)methods.- Parameters:
title- the citation title to be returned indirectly bygetTitle().
-
-
Method Detail
-
length
public int length()
Returns the number of characters in the title.- Specified by:
lengthin interfaceCharSequence- Returns:
- the number of
chars in the title.
-
charAt
public char charAt(int index)
Returns the title character at the given index- Specified by:
charAtin interfaceCharSequence- Parameters:
index- the index of thecharvalue to be returned.- Returns:
- the specified
charvalue.
-
subSequence
public String subSequence(int start, int end)
Returns a substring of the title for the given range of index.- Specified by:
subSequencein interfaceCharSequence- Parameters:
start- the start index, inclusive.end- the end index, exclusive.- Returns:
- the specified substring of the title.
-
toString
public String toString()
Returns the title as an unlocalized string. This method returns directly the string given to the constructor.- Specified by:
toStringin interfaceCharSequence- Specified by:
toStringin interfaceInternationalString- Overrides:
toStringin classObject- Returns:
- the string given to the constructor.
- See Also:
getTitle()
-
toString
public String toString(Locale locale)
Returns the title, ignoring the given locale. For localization support, an other class (or a subclass of thisSimpleCitationclass) is required.- Specified by:
toStringin interfaceInternationalString- Parameters:
locale- ignored by theSimpleCitationimplementation.- Returns:
- the string given to the constructor, localized if supported by the implementation.
- See Also:
getTitle()
-
getTitle
public InternationalString getTitle()
-
compareTo
public int compareTo(InternationalString object)
Compares the title with the string representation of the given object for order.- Specified by:
compareToin interfaceComparable<InternationalString>- Parameters:
object- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
equals
public boolean equals(Object object)
Returnstrueif the given object is aSimpleCitationhaving a title equals to this title.
-
-