
org.gedcomx.atom.Person Maven / Gradle / Ivy
/**
* Copyright Intellectual Reserve, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gedcomx.atom;
import com.webcohesion.enunciate.metadata.Facet;
import org.gedcomx.atom.rt.AtomModelVisitor;
import org.gedcomx.common.URI;
import org.gedcomx.rt.GedcomxConstants;
import javax.xml.XMLConstants;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
/**
* A Person construct is an element that describes a person, corporation, or similar entity
*
* @author Ryan Heaton
* @see The atom spec, section 3.2.
*/
@XmlType( name = "Person", propOrder = {"name", "uri", "email"} )
@Facet ( GedcomxConstants.FACET_GEDCOMX_RS )
public final class Person extends ExtensibleElement {
private String name;
private URI uri;
private String email;
/**
* Conveys a human-readable name for the person.
*
* @return a human-readable name for the person.
*/
public String getName() {
return name;
}
/**
* a human-readable name for the person.
*
* @param name a human-readable name for the person.
*/
public void setName(String name) {
this.name = name;
}
/**
* an IRI associated with the person.
*
* @return an IRI associated with the person.
*/
@XmlSchemaType (name = "anyURI", namespace = XMLConstants.W3C_XML_SCHEMA_NS_URI)
public URI getUri() {
return uri;
}
/**
* an IRI associated with the person.
*
* @param uri an IRI associated with the person.
*/
public void setUri(URI uri) {
this.uri = uri;
}
/**
* an e-mail address associated with the person.
*
* @return an e-mail address associated with the person.
*/
public String getEmail() {
return email;
}
/**
* an e-mail address associated with the person.
*
* @param email an e-mail address associated with the person.
*/
public void setEmail(String email) {
this.email = email;
}
/**
* Accept a visitor.
*
* @param visitor The visitor to accept.
*/
public void accept(AtomModelVisitor visitor) {
visitor.visitAtomPerson(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy