Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.jboss.resteasy.plugins.providers.atom;
  
  import java.net.URI;
 import java.util.Date;
 import java.util.List;

Per RFC4287:

 The "atom:entry" element represents an individual entry, acting as a
 container for metadata and data associated with the entry.  This
 element can appear as a child of the atom:feed element, or it can
 appear as the document (i.e., top-level) element of a stand-alone
 Atom Entry Document.
 

atomEntry = element atom:entry { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContent? & atomContributor* & atomId & atomLink* & atomPublished? & atomRights? & atomSource? & atomSummary? & atomTitle & atomUpdated & extensionElement*) }

This specification assigns no significance to the order of appearance of the child elements of atom:entry.

The following child elements are defined by this specification (note that it requires the presence of some of these elements):

o atom:entry elements MUST contain one or more atom:author elements, unless the atom:entry contains an atom:source element that contains an atom:author element or, in an Atom Feed Document, the atom:feed element contains an atom:author element itself. o atom:entry elements MAY contain any number of atom:category elements. o atom:entry elements MUST NOT contain more than one atom:content element. o atom:entry elements MAY contain any number of atom:contributor elements. o atom:entry elements MUST contain exactly one atom:id element. o atom:entry elements that contain no child atom:content element MUST contain at least one atom:link element with a rel attribute value of "alternate". o atom:entry elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. o atom:entry elements MAY contain additional atom:link elements beyond those described above. o atom:entry elements MUST NOT contain more than one atom:published element. o atom:entry elements MUST NOT contain more than one atom:rights element. o atom:entry elements MUST NOT contain more than one atom:source element. o atom:entry elements MUST contain an atom:summary element in either of the following cases: * the atom:entry contains an atom:content that has a "src" attribute (and is thus empty). * the atom:entry contains content that is encoded in Base64; i.e., the "type" attribute of atom:content is a MIME media type [MIMEREG], but is not an XML media type [RFC3023], does not begin with "text/", and does not end with "/xml" or "+xml". o atom:entry elements MUST NOT contain more than one atom:summary element. o atom:entry elements MUST contain exactly one atom:title element. o atom:entry elements MUST contain exactly one atom:updated element.

Author(s):
Bill Burke
Version:
$Revision: 1 $
 
 @XmlRootElement(name = "entry")
 @XmlType(propOrder = {"title""links""categories""updated""id""published""authors""contributors""source",
         "rights""content""summary"})
 public class Entry extends CommonAttributes
 {
    private List<Personauthors = new ArrayList<Person>();
 
    private List<Categorycategories = new ArrayList<Category>();
 
    private Content content;
   private List<Personcontributors = new ArrayList<Person>();
   private URI id;
   private List<Linklinks = new ArrayList<Link>();
   private Date published;
   private String title;
   private Date updated;
   private String rights;
   private Source source;
   private String summary;
   public URI getId()
   {
      return ;
   }
   public void setId(URI id)
   {
      this. = id;
   }
   public String getTitle()
   {
      return ;
   }
   public void setTitle(String title)
   {
      this. = title;
   }
   public Date getUpdated()
   {
      return ;
   }
   public void setUpdated(Date updated)
   {
      this. = updated;
   }
   public Link getLinkByRel(String name)
   {
      for (Link link : if (link.getRel().equals(name)) return link;
      return null;
   }
   public List<LinkgetLinks()
   {
      return ;
   }
   public Content getContent()
   {
      return ;
   }
   public void setContent(Content content)
   {
      this. = content;
   }
   @XmlElement(name = "author")
   public List<PersongetAuthors()
   {
      return ;
   }
   public List<CategorygetCategories()
   {
      return ;
   }
   @XmlElement(name = "contributor")
   public List<PersongetContributors()
   {
      return ;
   }
   public Date getPublished()
   {
      return ;
   }
   public void setPublished(Date published)
   {
      this. = published;
   }
   public String getRights()
   {
      return ;
   }
   public void setRights(String rights)
   {
      this. = rights;
   }
   public Source getSource()
   {
      return ;
   }
   public void setSource(Source source)
   {
      this. = source;
   }
   public String getSummary()
   {
      return ;
   }
   public void setSummary(String summary)
   {
      this. = summary;
   }
New to GrepCode? Check out our FAQ X