Class Person

java.lang.Object
org.apache.juneau.bean.atom.Common
org.apache.juneau.bean.atom.Person

public class Person extends Common
Represents a person, corporation, or similar entity in an Atom document.

Person constructs are used to describe authors, contributors, and other people or entities associated with a feed or entry. Each person construct contains a name and optionally a URI and email address.

Person constructs appear in several places:

  • atom:author - Indicates the author(s) of a feed or entry
  • atom:contributor - Indicates those who contributed to a feed or entry
Schema

atomPersonConstruct = atomCommonAttributes, (element atom:name { text } & element atom:uri { atomUri }? & element atom:email { atomEmailAddress }? & extensionElement*)

Example:

// Create an author Person author = new Person("Jane Doe") .setEmail("jane@example.org") .setUri("http://example.org/~jane"); // Add to entry Entry entry = new Entry(...) .setAuthors(author);

Specification:

Represents an atomPersonConstruct in the RFC 4287 - Section 3.2 specification.

See Also:
  • Constructor Details

    • Person

      public Person(String name)
      Normal constructor.
      Parameters:
      name - The name of the person.
    • Person

      public Person()
      Bean constructor.
  • Method Details

    • getName

      public String getName()
      Bean property getter: name.

      Returns the human-readable name for the person (required).

      Returns:
      The property value, or null if it is not set.
    • setName

      public Person setName(String value)
      Bean property setter: name.

      Sets the human-readable name for the person (required).

      Example:

      Person person = new Person("Jane Doe");

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • getUri

      public URI getUri()
      Bean property getter: uri.

      Returns a URI associated with the person.

      Typically this is a personal website or profile page.

      Returns:
      The property value, or null if it is not set.
    • setUri

      public Person setUri(Object value)
      Bean property setter: uri.

      Sets a URI associated with the person (typically a website or profile page).

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      Example:

      Person person = new Person("Jane Doe") .setUri("http://example.org/~jane");

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • getEmail

      public String getEmail()
      Bean property getter: email.

      Returns the email address associated with the person.

      Returns:
      The property value, or null if it is not set.
    • setEmail

      public Person setEmail(String value)
      Bean property setter: email.

      Sets the email address associated with the person.

      Example:

      Person person = new Person("Jane Doe") .setEmail("jane@example.org");

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setBase

      public Person setBase(Object value)
      Description copied from class: Common
      Bean property setter: base.

      Sets the base URI for resolving relative URI references (xml:base attribute).

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      Example:

      Feed feed = new Feed(...) .setBase("http://example.org/");

      Overrides:
      setBase in class Common
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setLang

      public Person setLang(String value)
      Description copied from class: Common
      Bean property setter: lang.

      Sets the natural language of the element's content (xml:lang attribute).

      Example:

      Text title = new Text("text") .setText("Mon Blog") .setLang("fr");

      Overrides:
      setLang in class Common
      Parameters:
      value - The new value for this property (e.g., "en", "fr", "de", "en-US").
      Can be null to unset the property.
      Returns:
      This object.