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:
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PersoncastOrCopy(org.opengis.metadata.citation.ResponsibleParty r, Locale locale) Returns the given ISO 19115 metadata as aPersoninstance.booleanCompares thisPersonwith the given object for equality.org.opengis.metadata.citation.AddressISO 19115 metadata property determined by theemailfield.org.opengis.util.InternationalStringISO 19115 metadata property not specified by GPX.org.opengis.util.InternationalStringgetCity()ISO 19115 metadata property not specified by GPX.org.opengis.metadata.citation.Contactorg.opengis.util.InternationalStringISO 19115 metadata property not specified by GPX.org.opengis.util.InternationalStringISO 19115 metadata property not specified by GPX.ISO 19115 metadata property not specified by GPX.ISO 19115 metadata property determined by theemailfield.org.opengis.util.InternationalStringISO 19115 metadata property not specified by GPX.ISO 19115 metadata property determined by thenamefield.org.opengis.metadata.citation.OnlineResourceISO 19115 metadata property determined by thelinkfield.org.opengis.util.InternationalStringISO 19115 metadata property not specified by GPX.org.opengis.metadata.citation.TelephonegetPhone()ISO 19115 metadata property not specified by GPX.org.opengis.util.InternationalStringISO 19115 metadata property not specified by GPX.ISO 19115 metadata property not specified by GPX.org.opengis.metadata.citation.RolegetRole()ISO 19115 metadata property fixed toRole.ORIGINATORorRole.AUTHOR.inthashCode()Returns a hash code value for thisPerson.toString()Returns a string representation of this person statement.
-
Field Details
-
name
Name of person or organization. -
isCreator
boolean isCreatortrueif this name is the creator,falseif it is the author. -
email
Email address.- See Also:
-
link
Link to Web site or other external information about person.
-
-
Constructor Details
-
Person
public Person()Creates an initially empty instance. -
Person
Person(String creator) Creates an instance for the given creator.
-
-
Method Details
-
castOrCopy
Returns the given ISO 19115 metadata as aPersoninstance. This method copies the data only if needed.- Parameters:
r- the ISO 19115 metadata, ornull.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 toRole.ORIGINATORorRole.AUTHOR.- Specified by:
getRolein interfaceorg.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 thename, but we have no way to know if the author is an individual or an organization.- Specified by:
getOrganisationNamein interfaceorg.opengis.metadata.citation.ResponsibleParty- Returns:
- name of the organization, or
nullif none.
-
getPositionName
public org.opengis.util.InternationalString getPositionName()ISO 19115 metadata property not specified by GPX.- Specified by:
getPositionNamein interfaceorg.opengis.metadata.citation.ResponsibleParty- Returns:
- position of the individual in the organization, or
nullif none.
-
getIndividualName
ISO 19115 metadata property determined by thenamefield.- Specified by:
getIndividualNamein interfaceorg.opengis.metadata.citation.ResponsibleParty- Returns:
- name of the party, or
nullif none.
-
getContactInfo
public org.opengis.metadata.citation.Contact getContactInfo()ISO 19115 metadata property determined by theemailandlinkfields. Invoking this method is one of the steps in the path from theResponsibilityroot to thegetElectronicMailAddresses()andgetOnlineResource()methods.- Specified by:
getContactInfoin interfaceorg.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:
getPhonein interfaceorg.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 theemailfield. Invoking this method is one of the steps in the path from theResponsibilityroot to thegetElectronicMailAddresses()method.- Specified by:
getAddressin interfaceorg.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 thelinkfield.- Specified by:
getOnlineResourcein interfaceorg.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:
getHoursOfServicein interfaceorg.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:
getContactInstructionsin interfaceorg.opengis.metadata.citation.Contact- Returns:
- supplemental instructions on how or when to contact the individual or organization.
-
getDeliveryPoints
ISO 19115 metadata property not specified by GPX.- Specified by:
getDeliveryPointsin interfaceorg.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:
getCityin interfaceorg.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:
getAdministrativeAreain interfaceorg.opengis.metadata.citation.Address- Returns:
- state, province of the location.
-
getPostalCode
ISO 19115 metadata property not specified by GPX.- Specified by:
getPostalCodein interfaceorg.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:
getCountryin interfaceorg.opengis.metadata.citation.Address- Returns:
- country of the physical address, or
null.
-
getElectronicMailAddresses
ISO 19115 metadata property determined by theemailfield.- Specified by:
getElectronicMailAddressesin interfaceorg.opengis.metadata.citation.Address- Returns:
- address of the electronic mailbox of the responsible organization or individual.
-
equals
Compares thisPersonwith the given object for equality. -
hashCode
public int hashCode()Returns a hash code value for thisPerson. -
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
-