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 Person
castOrCopy
(org.opengis.metadata.citation.ResponsibleParty r, Locale locale) Returns the given ISO 19115 metadata as aPerson
instance.boolean
Compares thisPerson
with the given object for equality.org.opengis.metadata.citation.Address
ISO 19115 metadata property determined by theemail
field.org.opengis.util.InternationalString
ISO 19115 metadata property not specified by GPX.org.opengis.util.InternationalString
getCity()
ISO 19115 metadata property not specified by GPX.org.opengis.metadata.citation.Contact
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 theemail
field.org.opengis.util.InternationalString
ISO 19115 metadata property not specified by GPX.ISO 19115 metadata property determined by thename
field.org.opengis.metadata.citation.OnlineResource
ISO 19115 metadata property determined by thelink
field.org.opengis.util.InternationalString
ISO 19115 metadata property not specified by GPX.org.opengis.metadata.citation.Telephone
getPhone()
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
getRole()
ISO 19115 metadata property fixed toRole.ORIGINATOR
orRole.AUTHOR
.int
hashCode()
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 isCreatortrue
if this name is the creator,false
if 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 aPerson
instance. 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.ORIGINATOR
orRole.AUTHOR
.- Specified by:
getRole
in 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:
getOrganisationName
in interfaceorg.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 interfaceorg.opengis.metadata.citation.ResponsibleParty
- Returns:
- position of the individual in the organization, or
null
if none.
-
getIndividualName
ISO 19115 metadata property determined by thename
field.- Specified by:
getIndividualName
in interfaceorg.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 theemail
andlink
fields. Invoking this method is one of the steps in the path from theResponsibility
root to thegetElectronicMailAddresses()
andgetOnlineResource()
methods.- Specified by:
getContactInfo
in 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:
getPhone
in 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 theemail
field. Invoking this method is one of the steps in the path from theResponsibility
root to thegetElectronicMailAddresses()
method.- Specified by:
getAddress
in 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 thelink
field.- Specified by:
getOnlineResource
in 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:
getHoursOfService
in 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:
getContactInstructions
in 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:
getDeliveryPoints
in 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:
getCity
in 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:
getAdministrativeArea
in interfaceorg.opengis.metadata.citation.Address
- Returns:
- state, province of the location.
-
getPostalCode
ISO 19115 metadata property not specified by GPX.- Specified by:
getPostalCode
in 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:
getCountry
in interfaceorg.opengis.metadata.citation.Address
- Returns:
- country of the physical address, or
null
.
-
getElectronicMailAddresses
ISO 19115 metadata property determined by theemail
field.- Specified by:
getElectronicMailAddresses
in interfaceorg.opengis.metadata.citation.Address
- Returns:
- address of the electronic mailbox of the responsible organization or individual.
-
equals
Compares thisPerson
with 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
-