Class Copyright

java.lang.Object
org.apache.sis.internal.storage.gpx.Copyright
All Implemented Interfaces:
org.opengis.metadata.citation.Citation, org.opengis.metadata.citation.CitationDate, org.opengis.metadata.citation.ResponsibleParty, org.opengis.metadata.constraint.Constraints, org.opengis.metadata.constraint.LegalConstraints

public final class Copyright extends Object implements org.opengis.metadata.constraint.LegalConstraints, org.opengis.metadata.citation.ResponsibleParty, org.opengis.metadata.citation.Citation, org.opengis.metadata.citation.CitationDate
Information about the copyright holder and any license governing use of a GPX file. Information in this element allow to place data into the public domain or grant additional usage rights. This element provides 3 properties:
  • The author, which is the only mandatory property.
  • The copyright year (optional).
  • An URI to the license (optional).
Those properties can be read or modified directly. All methods defined in this class are bridges to the ISO 19115 metadata model and can be ignored if the user only wants to manipulate the GPX model.
Since:
0.8
Version:
1.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The copyright holder.
    Link to an external file containing the license text, or null if none.
    The copyright year, or null if unspecified.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Creates an initially empty instance.
    private
    Copyright(org.opengis.metadata.constraint.LegalConstraints c, Locale locale)
    Copies properties from the given ISO 19115 metadata.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Copyright
    castOrCopy(org.opengis.metadata.constraint.LegalConstraints c, Locale locale)
    Returns the given ISO 19115 metadata as a Copyright instance.
    boolean
    Compares this Copyright with the given object for equality.
    Collection<org.opengis.metadata.constraint.Restriction>
    ISO 19115 metadata property fixed to Restriction.COPYRIGHT.
    Collection<org.opengis.util.InternationalString>
    ISO 19115 metadata property not specified by GPX.
    Collection<org.opengis.metadata.citation.ResponsibleParty>
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    Deprecated.
    org.opengis.metadata.citation.Contact
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property determined by the year field.
    Collection<? extends org.opengis.metadata.citation.CitationDate>
    ISO 19115 metadata property determined by the year field.
    org.opengis.metadata.citation.DateType
    ISO 19115 metadata property fixed to DateType.IN_FORCE.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property not specified by GPX.
    Collection<org.opengis.metadata.Identifier>
    Returns citation or party identifiers, which is an empty list.
    ISO 19115 metadata property determined by the author field.
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    Collection<org.opengis.util.InternationalString>
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    Collection<org.opengis.metadata.citation.PresentationForm>
    ISO 19115 metadata property fixed to PresentationForm.DOCUMENT_DIGITAL.
    org.opengis.metadata.citation.Role
    ISO 19115 metadata property fixed to Role.OWNER.
    org.opengis.metadata.citation.Series
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    Collection<org.opengis.metadata.constraint.Restriction>
    ISO 19115 metadata property determined by the license field.
    Collection<org.opengis.util.InternationalString>
    ISO 19115 metadata property not specified by GPX.
    int
    Returns a hash code value for this Copyright.
    thisOrEmpty(boolean condition)
    Returns this object as a singleton if the given condition is true, or an empty set if the given condition is false.
    Returns a string representation of the copyright statement.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • author

      public String author
      The copyright holder. This field is mandatory in principle, but Copyright implementation is robust to null value. This field is mapped to the getName() responsible party name in ISO 19115 metadata.
    • year

      public Integer year
      The copyright year, or null if unspecified. This field is mapped to the citation date in ISO 19115 metadata.
      See Also:
    • license

      public URI license
      Link to an external file containing the license text, or null if none. This field is mapped to the online resources in ISO 19115 metadata.
  • Constructor Details

    • Copyright

      public Copyright()
      Creates an initially empty instance. Callers should set at least the author field after construction.
    • Copyright

      private Copyright(org.opengis.metadata.constraint.LegalConstraints c, Locale locale)
      Copies properties from the given ISO 19115 metadata.
  • Method Details

    • castOrCopy

      public static Copyright castOrCopy(org.opengis.metadata.constraint.LegalConstraints c, Locale locale)
      Returns the given ISO 19115 metadata as a Copyright instance. This method copies the data only if needed.
      Parameters:
      c - the ISO 19115 metadata, or null.
      locale - the locale to use for localized strings.
      Returns:
      the GPX metadata, or null.
    • getAccessConstraints

      public Collection<org.opengis.metadata.constraint.Restriction> getAccessConstraints()
      ISO 19115 metadata property fixed to Restriction.COPYRIGHT.
      Specified by:
      getAccessConstraints in interface org.opengis.metadata.constraint.LegalConstraints
      Returns:
      restrictions or limitations on obtaining the data.
    • getUseConstraints

      public Collection<org.opengis.metadata.constraint.Restriction> getUseConstraints()
      ISO 19115 metadata property determined by the license field.
      Specified by:
      getUseConstraints in interface org.opengis.metadata.constraint.LegalConstraints
      Returns:
      restrictions or limitations or warnings on using the data.
    • getOtherConstraints

      public Collection<org.opengis.util.InternationalString> getOtherConstraints()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getOtherConstraints in interface org.opengis.metadata.constraint.LegalConstraints
      Returns:
      other restrictions and legal prerequisites for accessing and using the resource.
    • getUseLimitations

      public Collection<org.opengis.util.InternationalString> getUseLimitations()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getUseLimitations in interface org.opengis.metadata.constraint.Constraints
      Returns:
      limitation affecting the fitness for use of the resource.
    • getRole

      public org.opengis.metadata.citation.Role getRole()
      ISO 19115 metadata property fixed to Role.OWNER. This is part of the properties returned by getResponsibleParties().
      Specified by:
      getRole in interface org.opengis.metadata.citation.ResponsibleParty
      Returns:
      function performed by the responsible party.
    • getOrganisationName

      public org.opengis.util.InternationalString getOrganisationName()
      ISO 19115 metadata property not specified by GPX. Actually could be the author, but we have no way to know if the author is an individual or an organization.
      Specified by:
      getOrganisationName in interface org.opengis.metadata.citation.ResponsibleParty
      Returns:
      name of the organization, or null if none.
    • getPositionName

      public org.opengis.util.InternationalString getPositionName()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getPositionName in interface org.opengis.metadata.citation.ResponsibleParty
      Returns:
      position of the individual in the organization, or null if none.
    • getIndividualName

      public String getIndividualName()
      ISO 19115 metadata property determined by the author field. This is part of the properties returned by getParties().
      Specified by:
      getIndividualName in interface org.opengis.metadata.citation.ResponsibleParty
      Returns:
      name of the party, or null if none.
    • getContactInfo

      public org.opengis.metadata.citation.Contact getContactInfo()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getParties().
      Specified by:
      getContactInfo in interface org.opengis.metadata.citation.ResponsibleParty
      Returns:
      contact information for the party.
    • getIdentifiers

      public Collection<org.opengis.metadata.Identifier> getIdentifiers()
      Returns citation or party identifiers, which is an empty list.
      Specified by:
      getIdentifiers in interface org.opengis.metadata.citation.Citation
      Returns:
      empty.
    • getTitle

      public org.opengis.util.InternationalString getTitle()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences(). It would be the license title if that information was provided.
      Specified by:
      getTitle in interface org.opengis.metadata.citation.Citation
      Returns:
      the license name.
    • getAlternateTitles

      public Collection<org.opengis.util.InternationalString> getAlternateTitles()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getAlternateTitles in interface org.opengis.metadata.citation.Citation
      Returns:
      other names for the resource.
    • getDates

      public Collection<? extends org.opengis.metadata.citation.CitationDate> getDates()
      ISO 19115 metadata property determined by the year field. This is part of the properties returned by getReferences(). Invoking this method is one of the steps in the path from the LegalConstraints root to the getDate() method.
      Specified by:
      getDates in interface org.opengis.metadata.citation.Citation
      Returns:
      reference date for the cited resource.
      See Also:
    • getDate

      public Date getDate()
      ISO 19115 metadata property determined by the year field. This is part of the properties returned by getDates().
      Specified by:
      getDate in interface org.opengis.metadata.citation.CitationDate
      Returns:
      reference date for the cited resource.
    • getDateType

      public org.opengis.metadata.citation.DateType getDateType()
      ISO 19115 metadata property fixed to DateType.IN_FORCE. This is part of the properties returned by getDates().
      Specified by:
      getDateType in interface org.opengis.metadata.citation.CitationDate
      Returns:
      event used for reference date.
    • getEdition

      public org.opengis.util.InternationalString getEdition()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getEdition in interface org.opengis.metadata.citation.Citation
      Returns:
      the license version, or null if none.
    • getEditionDate

      public Date getEditionDate()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getEditionDate in interface org.opengis.metadata.citation.Citation
      Returns:
      the license edition date, or null if none.
    • getCitedResponsibleParties

      public Collection<org.opengis.metadata.citation.ResponsibleParty> getCitedResponsibleParties()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences(). It would be the license author if that information was provided.
      Specified by:
      getCitedResponsibleParties in interface org.opengis.metadata.citation.Citation
      Returns:
      the information for individuals or organisations that are responsible for the license.
    • getPresentationForms

      public Collection<org.opengis.metadata.citation.PresentationForm> getPresentationForms()
      ISO 19115 metadata property fixed to PresentationForm.DOCUMENT_DIGITAL. This is part of the properties returned by getReferences().
      Specified by:
      getPresentationForms in interface org.opengis.metadata.citation.Citation
      Returns:
      the presentation mode of the license.
    • getSeries

      public org.opengis.metadata.citation.Series getSeries()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getSeries in interface org.opengis.metadata.citation.Citation
      Returns:
      the series or aggregate dataset of which the dataset is a part.
    • getOtherCitationDetails

      public org.opengis.util.InternationalString getOtherCitationDetails()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getOtherCitationDetails in interface org.opengis.metadata.citation.Citation
      Returns:
      other details.
    • getCollectiveTitle

      @Deprecated public org.opengis.util.InternationalString getCollectiveTitle()
      Deprecated.
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getCollectiveTitle in interface org.opengis.metadata.citation.Citation
      Returns:
      the common title.
    • getISBN

      public String getISBN()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getISBN in interface org.opengis.metadata.citation.Citation
      Returns:
      the International Standard Book Number.
    • getISSN

      public String getISSN()
      ISO 19115 metadata property not specified by GPX. This is part of the properties returned by getReferences().
      Specified by:
      getISSN in interface org.opengis.metadata.citation.Citation
      Returns:
      the International Standard Serial Number.
    • thisOrEmpty

      private Collection<Copyright> thisOrEmpty(boolean condition)
      Returns this object as a singleton if the given condition is true, or an empty set if the given condition is false.
    • equals

      public boolean equals(Object obj)
      Compares this Copyright with the given object for equality.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare with this Copyright.
      Returns:
      true if both objects are equal.
    • hashCode

      public int hashCode()
      Returns a hash code value for this Copyright.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value.
    • toString

      public String toString()
      Returns a string representation of the copyright statement. The statement is formatted in a way similar to the copyright statements found in file header. Example:
      Copyright 2016 John Smith http://john.smith.com
      Overrides:
      toString in class Object
      Returns:
      a string representation of the copyright statement.