org.opengis.example.metadata
Class SimpleCitation

Show UML class diagram
Object
  extended by SimpleCitation
All Implemented Interfaces:
Serializable, CharSequence, Comparable<InternationalString>, Citation, InternationalString

public class SimpleCitation
extends Object
implements Citation, InternationalString, Serializable

A Citation containing only a title attribute as an InternationalString. All other citation attributes are null or empty collections.

This class can also be used as an InternationalString implementation. 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
static SimpleCitation EPSG
          The European Petroleum Survey Group authority.
static SimpleCitation OGC
          The Open Geospatial Consortium authority.
protected  String title
          The citation title to be returned by getTitle() as an InternationalString.
 
Constructor Summary
SimpleCitation(String title)
          Creates a new citation having the given title.
 
Method Summary
 char charAt(int index)
          Returns the title character at the given index
 int compareTo(InternationalString object)
          Compares the title with the string representation of the given object for order.
 boolean equals(Object object)
          Returns true if the given object is a SimpleCitation having a title equals to this title.
 Set<InternationalString> getAlternateTitles()
          Short name or other language name by which the cited information is known.
 Set<ResponsibleParty> getCitedResponsibleParties()
          Name and position information for an individual or organization that is responsible for the resource.
 InternationalString getCollectiveTitle()
          Common title with holdings note.
 Set<CitationDate> getDates()
          Reference date for the cited resource.
 InternationalString getEdition()
          Version of the cited resource.
 Date getEditionDate()
          Date of the edition, or null if none.
 Set<Identifier> getIdentifiers()
          Unique identifier for the resource.
 String getISBN()
          International Standard Book Number, or null if none.
 String getISSN()
          International Standard Serial Number, or null if none.
 InternationalString getOtherCitationDetails()
          Other information required to complete the citation that is not recorded elsewhere.
 Set<PresentationForm> getPresentationForms()
          Mode in which the resource is represented, or an empty set if none.
 Series getSeries()
          Information about the series, or aggregate dataset, of which the dataset is a part.
 InternationalString getTitle()
           
 int hashCode()
          Returns a hash code value for this citation.
 int length()
          Returns the number of characters in the title.
 String subSequence(int start, int end)
          Returns a substring of the title for the given range of index.
 String toString()
          Returns the title as an unlocalized string.
 String toString(Locale locale)
          Returns the title, ignoring the given locale.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.

See Also:
Identifier.getAuthority(), AuthorityFactory.getAuthority()

title

protected final String title
The citation title to be returned by getTitle() as an InternationalString. This is also the value returned by the InternationalString methods like toString(Locale) and toString().

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 the getTitle(), toString() and toString(Locale) methods.

Parameters:
title - The citation title to be returned indirectly by getTitle().
Method Detail

length

public int length()
Returns the number of characters in the title.

Specified by:
length in interface CharSequence
Returns:
The number of chars in the title.

charAt

public char charAt(int index)
Returns the title character at the given index

Specified by:
charAt in interface CharSequence
Parameters:
index - The index of the char value to be returned.
Returns:
The specified char value.

subSequence

public String subSequence(int start,
                          int end)
Returns a substring of the title for the given range of index.

Specified by:
subSequence in interface CharSequence
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:
toString in interface CharSequence
Specified by:
toString in interface InternationalString
Overrides:
toString in class Object
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 this SimpleCitation class) is required.

Specified by:
toString in interface InternationalString
Parameters:
locale - Ignored by the SimpleCitation implementation.
Returns:
The string given to the constructor, localized if supported by the implementation.
See Also:
getTitle()

getTitle

public InternationalString getTitle()
Specified by:
getTitle in interface Citation

getAlternateTitles

public Set<InternationalString> getAlternateTitles()
Short name or other language name by which the cited information is known. The default implementation returns an empty set.

Specified by:
getAlternateTitles in interface Citation

getDates

public Set<CitationDate> getDates()
Reference date for the cited resource. The default implementation returns an empty set.

Specified by:
getDates in interface Citation

getEdition

public InternationalString getEdition()
Version of the cited resource. The default implementation returns null.

Specified by:
getEdition in interface Citation

getEditionDate

public Date getEditionDate()
Date of the edition, or null if none. The default implementation returns null.

Specified by:
getEditionDate in interface Citation

getIdentifiers

public Set<Identifier> getIdentifiers()
Unique identifier for the resource. The default implementation returns an empty set.

Specified by:
getIdentifiers in interface Citation

getCitedResponsibleParties

public Set<ResponsibleParty> getCitedResponsibleParties()
Name and position information for an individual or organization that is responsible for the resource. The default implementation returns an empty set.

Specified by:
getCitedResponsibleParties in interface Citation

getPresentationForms

public Set<PresentationForm> getPresentationForms()
Mode in which the resource is represented, or an empty set if none. The default implementation returns an empty set.

Specified by:
getPresentationForms in interface Citation

getSeries

public Series getSeries()
Information about the series, or aggregate dataset, of which the dataset is a part. The default implementation returns null.

Specified by:
getSeries in interface Citation

getOtherCitationDetails

public InternationalString getOtherCitationDetails()
Other information required to complete the citation that is not recorded elsewhere. The default implementation returns null.

Specified by:
getOtherCitationDetails in interface Citation

getCollectiveTitle

public InternationalString getCollectiveTitle()
Common title with holdings note. The default implementation returns null.

Specified by:
getCollectiveTitle in interface Citation

getISBN

public String getISBN()
International Standard Book Number, or null if none. The default implementation returns null.

Specified by:
getISBN in interface Citation

getISSN

public String getISSN()
International Standard Serial Number, or null if none. The default implementation returns null.

Specified by:
getISSN in interface Citation

compareTo

public int compareTo(InternationalString object)
Compares the title with the string representation of the given object for order.

Specified by:
compareTo in interface Comparable<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)
Returns true if the given object is a SimpleCitation having a title equals to this title.

Overrides:
equals in class Object
Parameters:
object - The object to compare with this SimpleCitation, or null.
Returns:
true If the given object is equals to this SimpleCitation.

hashCode

public int hashCode()
Returns a hash code value for this citation. The hash code is computed from the title string given to the constructor.

Overrides:
hashCode in class Object
Returns:
A hash code value for this citation.


Copyright © 1994-2013 Open Geospatial Consortium. All Rights Reserved.