org.apache.wink.common.model.atom.AtomPerson Maven / Gradle / Ivy
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.1-b02-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2008.05.27 at 11:24:25 AM IDT
//
package org.apache.wink.common.model.atom;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.wink.common.model.synd.SyndPerson;
import org.w3c.dom.Element;
/**
* The Person construct Per RFC4287
*
*
* A Person construct is an element that describes a person, corporation, or similar entity
* (hereafter, 'person').
*
* atomPersonConstruct =
* atomCommonAttributes,
* (element atom:name { text }
* & element atom:uri { atomUri }?
* & element atom:email { atomEmailAddress }?
* & extensionElement*)
*
* This specification assigns no significance to the order of appearance of the child elements in a
* Person construct. Person constructs allow extension Metadata elements (see Section 6.4). 3.2.1
* The "atom:name" Element
*
* The "atom:name" element's content conveys a human-readable name for the person. The content of
* atom:name is Language-Sensitive. Person constructs MUST contain exactly one "atom:name" element.
* 3.2.2 The "atom:uri" Element
*
* The "atom:uri" element's content conveys an IRI associated with the person. Person constructs MAY
* contain an atom:uri element, but MUST NOT contain more than one. The content of atom:uri in a
* Person construct MUST be an IRI reference [RFC3987]. 3.2.3 The "atom:email" Element
*
* The "atom:email" element's content conveys an e-mail address associated with the person. Person
* constructs MAY contain an atom:email element, but MUST NOT contain more than one.
* Its content MUST conform to the "addr-spec" production in [RFC2822].
*
*
* - The "atom:name" Element
*
*
* The "atom:name" element's content conveys a human-readable name for the person.
* The content of atom:name is Language-Sensitive.
* Person constructs MUST contain exactly one "atom:name" element.
*
*
*
* - The "atom:uri" Element
*
*
* The "atom:uri" element's content conveys an IRI associated with the person.
* Person constructs MAY contain an atom:uri element, but MUST NOT contain more than one.
* The content of atom:uri in a Person construct MUST be an IRI reference [RFC3987].
*
*
*
* - The "atom:email" Element
*
*
* The "atom:email" element's content conveys an e-mail address associated with the person.
* Person constructs MAY contain an atom:email element, but MUST NOT contain more than one.
* Its content MUST conform to the "addr-spec" production in [RFC2822].
*
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "atomPerson", propOrder = {"email", "any", "name", "uri"})
public class AtomPerson {
protected String email;
@XmlAnyElement
protected List any;
protected String name;
protected String uri;
public AtomPerson() {
}
public AtomPerson(SyndPerson value) {
if (value == null) {
return;
}
setEmail(value.getEmail());
setName(value.getName());
setUri(value.getUri());
}
public SyndPerson toSynd(SyndPerson value) {
if (value == null) {
return value;
}
value.setEmail(getEmail());
value.setName(getName());
value.setUri(getUri());
return value;
}
/**
* Gets the value of email.
*/
public String getEmail() {
return email;
}
/**
* Sets the value of email.
*/
public void setEmail(String value) {
this.email = value;
}
/**
* Gets extension elements
*
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* set
method for the any.
*
* For example, to add a new item, do as follows:
*
*
* getAny().add(newItem);
*
*
* Objects of the following type(s) are allowed in the list {@link Element }
*/
public List getAny() {
if (any == null) {
any = new ArrayList();
}
return this.any;
}
/**
* Gets the value of name.
*/
public String getName() {
return name;
}
/**
* Sets the value of name.
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of uri.
*/
public String getUri() {
return uri;
}
/**
* Sets the value of uri.
*/
public void setUri(String value) {
this.uri = value;
}
}