/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2011, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.sml.xml.v101; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.geotoolkit.sml.xml.AbstractPerson; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="surname" type="{http://www.w3.org/2001/XMLSchema}token"/> * <element name="name" type="{http://www.w3.org/2001/XMLSchema}token"/> * <element name="userID" type="{http://www.w3.org/2001/XMLSchema}token"/> * <element name="affiliation" type="{http://www.w3.org/2001/XMLSchema}token"/> * <element name="phoneNumber" type="{http://www.w3.org/2001/XMLSchema}token"/> * <element name="email" type="{http://www.w3.org/2001/XMLSchema}token"/> * </sequence> * <attribute ref="{http://www.opengis.net/gml}id"/> * </restriction> * </complexContent> * </complexType> * </pre> * * * @module */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "surname", "name", "userID", "affiliation", "phoneNumber", "email" }) @XmlRootElement(name = "Person") public class Person extends SensorObject implements AbstractPerson { @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") private String surname; @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") private String name; @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") private String userID; @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") private String affiliation; @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") private String phoneNumber; @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") private String email; @XmlAttribute(namespace = "http://www.opengis.net/gml") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") private String id; public Person() { } public Person(final AbstractPerson person) { if (person != null) { this.affiliation = person.getAffiliation(); this.email = person.getEmail(); this.id = person.getId(); this.name = person.getName(); this.phoneNumber = person.getPhoneNumber(); this.surname = person.getSurname(); this.userID = person.getUserID(); } } /** * Gets the value of the surname property. * * @return * possible object is * {@link String } * */ public String getSurname() { return surname; } /** * Sets the value of the surname property. * * @param value * allowed object is * {@link String } * */ public void setSurname(final String value) { this.surname = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(final String value) { this.name = value; } /** * Gets the value of the userID property. * * @return * possible object is * {@link String } * */ public String getUserID() { return userID; } /** * Sets the value of the userID property. * * @param value * allowed object is * {@link String } * */ public void setUserID(final String value) { this.userID = value; } /** * Gets the value of the affiliation property. * * @return * possible object is * {@link String } * */ public String getAffiliation() { return affiliation; } /** * Sets the value of the affiliation property. * * @param value * allowed object is * {@link String } * */ public void setAffiliation(final String value) { this.affiliation = value; } /** * Gets the value of the phoneNumber property. * * @return * possible object is * {@link String } * */ public String getPhoneNumber() { return phoneNumber; } /** * Sets the value of the phoneNumber property. * * @param value * allowed object is * {@link String } * */ public void setPhoneNumber(final String value) { this.phoneNumber = value; } /** * Gets the value of the email property. * * @return * possible object is * {@link String } * */ public String getEmail() { return email; } /** * Sets the value of the email property. * * @param value * allowed object is * {@link String } * */ public void setEmail(final String value) { this.email = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(final String value) { this.id = value; } }