org.geotoolkit.metadata.iso.citation
Class DefaultCitation

Object
  extended by AbstractMetadata
      extended by ModifiableMetadata
          extended by MetadataEntity
              extended by DefaultCitation
All Implemented Interfaces:
Serializable, Cloneable, LenientComparable, IdentifiedObject, Citation

@ThreadSafe
public class DefaultCitation
extends MetadataEntity
implements Citation

Standardized resource reference.


Unified identifiers view
The ISO 19115 model provides specific attributes for the ISBN and ISSN codes. However the Geotk library handles those codes like any other identifiers. Consequently the ISBN and ISSN codes are included in the collection returned by getIdentifiers(), except at XML marshalling time (for ISO 19139 compliance).

Since:
2.1
Version:
3.19
Author:
Martin Desruisseaux (IRD, Geomatys), Jody Garnett (Refractions), Cédric Briançon (Geomatys)
See Also:
Serialized Form
Module:
metadata/geotk-metadata (download)    View source code for this class

Field Summary
 
Fields inherited from class MetadataEntity
identifiers
 
Fields inherited from class AbstractMetadata
LOGGER
 
Constructor Summary
DefaultCitation()
          Constructs an initially empty citation.
DefaultCitation(CharSequence title)
          Constructs a citation with the specified title.
DefaultCitation(Citation source)
          Constructs a new citation initialized to the values specified by the given object.
DefaultCitation(ResponsibleParty party)
          Constructs a citation with the specified responsible party.
 
Method Summary
static DefaultCitation castOrCopy(Citation object)
          Returns a Geotk metadata implementation with the same values than the given arbitrary implementation.
 Collection<InternationalString> getAlternateTitles()
          Returns the short name or other language name by which the cited information is known.
 Collection<ResponsibleParty> getCitedResponsibleParties()
          Returns the name and position information for an individual or organization that is responsible for the resource.
 InternationalString getCollectiveTitle()
          Returns the common title with holdings note.
 Collection<CitationDate> getDates()
          Returns the reference date for the cited resource.
 InternationalString getEdition()
          Returns the version of the cited resource.
 Date getEditionDate()
          Returns the date of the edition, or null if none.
 Collection<Identifier> getIdentifiers()
          Returns the unique identifier for the resource.
 String getISBN()
          Returns the International Standard Book Number, or null if none.
 String getISSN()
          Returns the International Standard Serial Number, or null if none.
 InternationalString getOtherCitationDetails()
          Returns other information required to complete the citation that is not recorded elsewhere.
 Collection<PresentationForm> getPresentationForms()
          Returns the mode in which the resource is represented, or an empty string if none.
 Series getSeries()
          Returns the information about the series, or aggregate dataset, of which the dataset is a part.
 InternationalString getTitle()
          Returns the name by which the cited resource is known.
 void setAlternateTitles(Collection<? extends InternationalString> newValues)
          Sets the short name or other language name by which the cited information is known.
 void setCitedResponsibleParties(Collection<? extends ResponsibleParty> newValues)
          Sets the name and position information for an individual or organization that is responsible for the resource.
 void setCollectiveTitle(InternationalString newValue)
          Sets the common title with holdings note.
 void setDates(Collection<? extends CitationDate> newValues)
          Sets the reference date for the cited resource.
 void setEdition(InternationalString newValue)
          Sets the version of the cited resource.
 void setEditionDate(Date newValue)
          Sets the date of the edition, or null if none.
 void setIdentifiers(Collection<? extends Identifier> newValues)
          Sets the unique identifier for the resource.
 void setISBN(String newValue)
          Sets the International Standard Book Number, or null if none.
 void setISSN(String newValue)
          Sets the International Standard Serial Number, or null if none.
 void setOtherCitationDetails(InternationalString newValue)
          Sets other information required to complete the citation that is not recorded elsewhere.
 void setPresentationForms(Collection<? extends PresentationForm> newValues)
          Sets the mode in which the resource is represented, or an empty string if none.
 void setSeries(Series newValue)
          Sets the information about the series, or aggregate dataset, of which the dataset is a part.
 void setTitle(InternationalString newValue)
          Sets the name by which the cited resource is known.
 
Methods inherited from class MetadataEntity
getIdentifier, getIdentifierMap, getStandard
 
Methods inherited from class ModifiableMetadata
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullSet, prune, unmodifiable
 
Methods inherited from class AbstractMetadata
asMap, asTree, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, parse, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultCitation

public DefaultCitation()
Constructs an initially empty citation.


DefaultCitation

public DefaultCitation(Citation source)
Constructs a new citation initialized to the values specified by the given object. This constructor performs a shallow copy (i.e. each source attributes are reused without copying them).

Parameters:
source - The metadata to copy, or null if none.

DefaultCitation

public DefaultCitation(CharSequence title)
Constructs a citation with the specified title.

Parameters:
title - The title as a String or an InternationalString object, or null if none.

DefaultCitation

public DefaultCitation(ResponsibleParty party)
Constructs a citation with the specified responsible party. This convenience constructor initialize the citation title to the first non-null of the following properties: organisation name, position name or individual name.

Parameters:
party - The name and position information for an individual or organization that is responsible for the resource, or null if none.
Since:
2.2
Method Detail

castOrCopy

public static DefaultCitation castOrCopy(Citation object)
Returns a Geotk metadata implementation with the same values than the given arbitrary implementation. If the given object is null, then this method returns null. Otherwise if the given object is already a Geotk implementation, then the given object is returned unchanged. Otherwise a new Geotk implementation is created and initialized to the attribute values of the given object, using a shallow copy operation (i.e. attributes are not cloned).

Parameters:
object - The object to get as a Geotk implementation, or null if none.
Returns:
A Geotk implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
Since:
3.18

getTitle

public InternationalString getTitle()
Returns the name by which the cited resource is known.

Specified by:
getTitle in interface Citation

setTitle

public void setTitle(InternationalString newValue)
Sets the name by which the cited resource is known.

Parameters:
newValue - The new title.

getAlternateTitles

public Collection<InternationalString> getAlternateTitles()
Returns the short name or other language name by which the cited information is known. Example: "DCW" as an alternative title for "Digital Chart of the World".

Specified by:
getAlternateTitles in interface Citation

setAlternateTitles

public void setAlternateTitles(Collection<? extends InternationalString> newValues)
Sets the short name or other language name by which the cited information is known.

Parameters:
newValues - The new alternate titles.

getDates

public Collection<CitationDate> getDates()
Returns the reference date for the cited resource.

Specified by:
getDates in interface Citation

setDates

public void setDates(Collection<? extends CitationDate> newValues)
Sets the reference date for the cited resource.

Parameters:
newValues - The new dates.

getEdition

public InternationalString getEdition()
Returns the version of the cited resource.

Specified by:
getEdition in interface Citation

setEdition

public void setEdition(InternationalString newValue)
Sets the version of the cited resource.

Parameters:
newValue - The new edition.

getEditionDate

public Date getEditionDate()
Returns the date of the edition, or null if none.

Specified by:
getEditionDate in interface Citation

setEditionDate

public void setEditionDate(Date newValue)
Sets the date of the edition, or null if none.

Parameters:
newValue - The new edition date.
TODO:
Use an unmodifiable Date here.

getIdentifiers

public Collection<Identifier> getIdentifiers()
Returns the unique identifier for the resource. Example: Universal Product Code (UPC), National Stock Number (NSN).

Unified identifiers view
In this Geotk implementation, the collection returned by this method includes the ISBN and ISSN codes (except at XML marshalling time for ISO 19139 compliance).

Specified by:
getIdentifiers in interface IdentifiedObject
Specified by:
getIdentifiers in interface Citation
Overrides:
getIdentifiers in class MetadataEntity
Returns:
All identifiers associated to this object, or an empty collection if none.
See Also:
getIdentifiers(), DefaultObjective.getIdentifiers(), AbstractIdentifiedObject.getIdentifiers()

setIdentifiers

public void setIdentifiers(Collection<? extends Identifier> newValues)
Sets the unique identifier for the resource. Example: Universal Product Code (UPC), National Stock Number (NSN).

The following exceptions apply:

Parameters:
newValues - The new identifiers.

getCitedResponsibleParties

public Collection<ResponsibleParty> getCitedResponsibleParties()
Returns the name and position information for an individual or organization that is responsible for the resource. Returns an empty string if there is none.

Specified by:
getCitedResponsibleParties in interface Citation

setCitedResponsibleParties

public void setCitedResponsibleParties(Collection<? extends ResponsibleParty> newValues)
Sets the name and position information for an individual or organization that is responsible for the resource. Returns an empty string if there is none.

Parameters:
newValues - The new cited responsible parties.

getPresentationForms

public Collection<PresentationForm> getPresentationForms()
Returns the mode in which the resource is represented, or an empty string if none.

Specified by:
getPresentationForms in interface Citation

setPresentationForms

public void setPresentationForms(Collection<? extends PresentationForm> newValues)
Sets the mode in which the resource is represented, or an empty string if none.

Parameters:
newValues - The new presentation form.

getSeries

public Series getSeries()
Returns the information about the series, or aggregate dataset, of which the dataset is a part. Returns null if none.

Specified by:
getSeries in interface Citation

setSeries

public void setSeries(Series newValue)
Sets the information about the series, or aggregate dataset, of which the dataset is a part. Set to null if none.

Parameters:
newValue - The new series.

getOtherCitationDetails

public InternationalString getOtherCitationDetails()
Returns other information required to complete the citation that is not recorded elsewhere. Returns null if none.

Specified by:
getOtherCitationDetails in interface Citation

setOtherCitationDetails

public void setOtherCitationDetails(InternationalString newValue)
Sets other information required to complete the citation that is not recorded elsewhere. Sets to null if none.

Parameters:
newValue - Other citations details.

getCollectiveTitle

public InternationalString getCollectiveTitle()
Returns the common title with holdings note. Note: title identifies elements of a series collectively, combined with information about what volumes are available at the source cited. Returns null if there is no title.

Specified by:
getCollectiveTitle in interface Citation

setCollectiveTitle

public void setCollectiveTitle(InternationalString newValue)
Sets the common title with holdings note. Note: title identifies elements of a series collectively, combined with information about what volumes are available at the source cited. Set to null if there is no title.

Parameters:
newValue - The new collective title.

getISBN

public String getISBN()
Returns the International Standard Book Number, or null if none. In this Geotk implementation, invoking this method is equivalent to:
return getIdentifierMap().getSpecialized(Citations.ISBN);

Specified by:
getISBN in interface Citation
See Also:
Citations.ISBN

setISBN

public void setISBN(String newValue)
Sets the International Standard Book Number, or null if none. In this Geotk implementation, invoking this method is equivalent to:
getIdentifierMap().putSpecialized(Citations.ISBN, newValue);

Parameters:
newValue - The new ISBN.

getISSN

public String getISSN()
Returns the International Standard Serial Number, or null if none. In this Geotk implementation, invoking this method is equivalent to:
return getIdentifierMap().getSpecialized(Citations.ISSN);

Specified by:
getISSN in interface Citation
See Also:
Citations.ISSN

setISSN

public void setISSN(String newValue)
Sets the International Standard Serial Number, or null if none. In this Geotk implementation, invoking this method is equivalent to:
getIdentifierMap().putSpecialized(Citations.ISSN, newValue);

Parameters:
newValue - The new ISSN.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.