Class Person

java.lang.Object
org.apache.sis.internal.storage.gpx.Person
All Implemented Interfaces:
org.opengis.metadata.citation.Address, org.opengis.metadata.citation.Contact, org.opengis.metadata.citation.ResponsibleParty

public final class Person extends Object implements org.opengis.metadata.citation.ResponsibleParty, org.opengis.metadata.citation.Contact, org.opengis.metadata.citation.Address
Information about a person or organization. This element provides 3 optional properties:
  • The name.
  • The person email.
  • An URI to other information about the person or organization.
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.

Note that Party is an abstract type in ISO 19115 model. We are supposed to implement a subtype (Individual or Organisation). However, the GPX metadata does not specifies whether the "person" is actually an individual or an organization. In this situation of doubt, we do not select a subtype for avoiding to provide a wrong information.

Since:
0.8
Version:
0.8
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Email address.
    (package private) boolean
    true if this name is the creator, false if it is the author.
    Link to Web site or other external information about person.
    Name of person or organization.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an initially empty instance.
    Person(String creator)
    Creates an instance for the given creator.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Person
    castOrCopy(org.opengis.metadata.citation.ResponsibleParty r, Locale locale)
    Returns the given ISO 19115 metadata as a Person instance.
    boolean
    Compares this Person with the given object for equality.
    org.opengis.metadata.citation.Address
    ISO 19115 metadata property determined by the email field.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    org.opengis.metadata.citation.Contact
    ISO 19115 metadata property determined by the email and link fields.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property determined by the email field.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property determined by the name field.
    org.opengis.metadata.citation.OnlineResource
    ISO 19115 metadata property determined by the link field.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    org.opengis.metadata.citation.Telephone
    ISO 19115 metadata property not specified by GPX.
    org.opengis.util.InternationalString
    ISO 19115 metadata property not specified by GPX.
    ISO 19115 metadata property not specified by GPX.
    org.opengis.metadata.citation.Role
    ISO 19115 metadata property fixed to Role.ORIGINATOR or Role.AUTHOR.
    int
    Returns a hash code value for this Person.
    Returns a string representation of this person statement.

    Methods inherited from class java.lang.Object

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

    • name

      public String name
      Name of person or organization.
    • isCreator

      boolean isCreator
      true if this name is the creator, false if it is the author.
    • email

      public String email
      Email address.
      See Also:
  • Constructor Details

    • Person

      public Person()
      Creates an initially empty instance.
    • Person

      Person(String creator)
      Creates an instance for the given creator.
  • Method Details

    • castOrCopy

      public static Person castOrCopy(org.opengis.metadata.citation.ResponsibleParty r, Locale locale)
      Returns the given ISO 19115 metadata as a Person instance. This method copies the data only if needed.
      Parameters:
      r - the ISO 19115 metadata, or null.
      locale - the locale to use for localized strings.
      Returns:
      the GPX metadata, or null.
    • getRole

      public org.opengis.metadata.citation.Role getRole()
      ISO 19115 metadata property fixed to Role.ORIGINATOR or Role.AUTHOR.
      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 name, 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 name field.
      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 determined by the email and link fields. Invoking this method is one of the steps in the path from the Responsibility root to the getElectronicMailAddresses() and getOnlineResource() methods.
      Specified by:
      getContactInfo in interface org.opengis.metadata.citation.ResponsibleParty
      Returns:
      contact information for the party.
    • getPhone

      public org.opengis.metadata.citation.Telephone getPhone()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getPhone in interface org.opengis.metadata.citation.Contact
      Returns:
      telephone numbers at which the organization or individual may be contacted.
    • getAddress

      public org.opengis.metadata.citation.Address getAddress()
      ISO 19115 metadata property determined by the email field. Invoking this method is one of the steps in the path from the Responsibility root to the getElectronicMailAddresses() method.
      Specified by:
      getAddress in interface org.opengis.metadata.citation.Contact
      Returns:
      physical and email addresses at which the organization or individual may be contacted.
      See Also:
    • getOnlineResource

      public org.opengis.metadata.citation.OnlineResource getOnlineResource()
      ISO 19115 metadata property determined by the link field.
      Specified by:
      getOnlineResource in interface org.opengis.metadata.citation.Contact
      Returns:
      on-line information that can be used to contact the individual or organization.
    • getHoursOfService

      public org.opengis.util.InternationalString getHoursOfService()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getHoursOfService in interface org.opengis.metadata.citation.Contact
      Returns:
      time period when individuals can contact the organization or individual.
    • getContactInstructions

      public org.opengis.util.InternationalString getContactInstructions()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getContactInstructions in interface org.opengis.metadata.citation.Contact
      Returns:
      supplemental instructions on how or when to contact the individual or organization.
    • getDeliveryPoints

      public Collection<String> getDeliveryPoints()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getDeliveryPoints in interface org.opengis.metadata.citation.Address
      Returns:
      address line for the location.
    • getCity

      public org.opengis.util.InternationalString getCity()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getCity in interface org.opengis.metadata.citation.Address
      Returns:
      the city of the location.
    • getAdministrativeArea

      public org.opengis.util.InternationalString getAdministrativeArea()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getAdministrativeArea in interface org.opengis.metadata.citation.Address
      Returns:
      state, province of the location.
    • getPostalCode

      public String getPostalCode()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getPostalCode in interface org.opengis.metadata.citation.Address
      Returns:
      ZIP or other postal code, or null.
    • getCountry

      public org.opengis.util.InternationalString getCountry()
      ISO 19115 metadata property not specified by GPX.
      Specified by:
      getCountry in interface org.opengis.metadata.citation.Address
      Returns:
      country of the physical address, or null.
    • getElectronicMailAddresses

      public Collection<String> getElectronicMailAddresses()
      ISO 19115 metadata property determined by the email field.
      Specified by:
      getElectronicMailAddresses in interface org.opengis.metadata.citation.Address
      Returns:
      address of the electronic mailbox of the responsible organization or individual.
    • equals

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

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

      public String toString()
      Returns a string representation of this person statement. The statement is formatted in a way similar to the email address in client software applications. Example:
      John Smith <john.smith@somewhere.com> http://john.smith.com
      Overrides:
      toString in class Object
      Returns:
      a string representation of this person.