abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r414893 [2/11] - in /incubator/abdera/java/trunk: ./ build/ core/ core/src/ core/src/main/ core/src/main/java/ core/src/main/java/org/ core/src/main/java/org/apache/ core/src/main/java/org/apache/abdera/ core/src/main/java/org/apache/abdera...
Date Fri, 16 Jun 2006 20:10:56 GMT
Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Control.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,96 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+/**
+ * <p>Represents an Atom Publishing Protocol <code>control</code> element.</p>
+ * 
+ * <p>The purpose of the control extension is to provide a means for content
+ * publishers to embed various publishing-operation specific control parameters
+ * within the body of the entry.  For instance, the client may wish to mark the
+ * entry as a draft, or may wish to ask the publishing server to enable or 
+ * disable specific extended features for a given entry.</p> 
+ * 
+ * <p>Per APP Draft-08:</p>
+ * 
+ * <pre>
+ *   pubControl =
+ *      element pub:control {
+ *      atomCommonAttributes,
+ *      pubDraft?
+ *      &amp; extensionElement
+ *   }
+ *
+ *   pubDraft =
+ *     element pub:draft { "yes" | "no" }
+ *
+ *  The "pub:control" element MAY appear as a child of an "atom:entry"
+ *  which is being created or updated via the Atom Publishing Protocol.
+ *  The "pub:control" element, if it does appear in an entry, MUST only
+ *  appear at most one time.  The "pub:control" element is considered
+ *  foreign markup as defined in Section 6 of [RFC4287].
+ *
+ *  The "pub:control" element and its child elements MAY be included in
+ *  Atom Feed or Entry Documents.
+ *
+ *  The "pub:control" element MAY contain exactly one "pub:draft" element
+ *  as defined here, and MAY contain zero or more extension elements as
+ *  outlined in Section 6 of [RFC4287].  Both clients and servers MUST
+ *  ignore foreign markup present in the pub:control element.
+ * </pre>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Control 
+  extends ExtensionElement, 
+          ExtensibleElement {
+  
+  /**
+   * <p>Returns true if the entry should <i>not</i> be made publicly visible.</p>
+   * 
+   * <p>APP Draft-08: The number of "pub:draft" elements in "pub:control" 
+   * MUST be zero or one.  Its value MUST be one of "yes" or "no".  A 
+   * value of "no" means that the entry MAY be made publicly visible.  
+   * If the "pub:draft" element is missing then the value MUST be 
+   * understood to be "no".  The pub:draft element MAY be ignored.</p>
+   */
+  boolean isDraft();
+
+  /**
+   * <p>Set to "true" if the entry should <i>not</i> be made publicly visible.</p>
+   * 
+   * <p>APP Draft-08: The number of "pub:draft" elements in "pub:control" 
+   * MUST be zero or one.  Its value MUST be one of "yes" or "no".  A 
+   * value of "no" means that the entry MAY be made publicly visible.  
+   * If the "pub:draft" element is missing then the value MUST be 
+   * understood to be "no".  The pub:draft element MAY be ignored.</p>
+   */
+  void setDraft(boolean draft);
+  
+  /**
+   * <p>Removes the draft setting completely from the control element.</p>
+   * 
+   * <p>APP Draft-08: The number of "pub:draft" elements in "pub:control" 
+   * MUST be zero or one.  Its value MUST be one of "yes" or "no".  A 
+   * value of "no" means that the entry MAY be made publicly visible.  
+   * If the "pub:draft" element is missing then the value MUST be 
+   * understood to be "no".  The pub:draft element MAY be ignored.</p>
+   */
+  void unsetDraft();
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/DateTime.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,83 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * <p>An element conforming to the Atom Date Construct.  The data type 
+ * implementation for this element is provided by the AtomDate class.</p>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface DateTime 
+  extends  ExtensionElement {
+  
+  /**
+   * Returns the content value of the element as an AtomDate object 
+   */
+  AtomDate getValue();
+  
+  /**
+   * Returns the content value of the element as a java.util.Date object
+   */
+  Date getDate();
+
+  /**
+   * Returns the content value of the element as a java.util.Calendar object
+   */
+  Calendar getCalendar();
+  
+  /**
+   * Returns the content value of the element as a long (equivalent to 
+   * calling DateTimeElement().getDate().getTime()
+   */
+  long getTime();
+  
+  /**
+   * Returns the content value of the element as a string conforming to 
+   * RFC-3339
+   */
+  String getString();
+  
+  /**
+   * Sets the content value of the element
+   */
+  void setValue(AtomDate dateTime);
+  
+  /**
+   * Sets the content value of the element
+   */
+  void setDate(Date date);
+  
+  /**
+   * Sets the content value of the element
+   */
+  void setCalendar(Calendar date);
+  
+  /**
+   * Sets the content value of the element
+   */
+  void setTime(long date);
+  
+  /**
+   * Sets the content value of the element
+   */
+  void setString(String date);
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Div.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+/**
+ * <p>Represents an XHTML div tag.</p>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Div 
+  extends ExtensibleElement, 
+          StringElement {
+
+  /**
+   * Returns the array of class attribute values on the div
+   */
+  String[] getXhtmlClass();
+  
+  /**
+   * Returns the value of the div element's id attribute
+   */
+  String getId();
+  
+  /**
+   * Returns the value of the div element's title attribute
+   */
+  String getTitle();
+  
+  /** 
+   * Sets the value of the div element's id attribute
+   */
+  void setId(String id);
+  
+  /**
+   * Set the value of the div element's title attribute
+   */
+  void setTitle(String title);
+  
+  /**
+   * Sets the array of class attribute values on the div
+   */
+  void setXhtmlClass(String[] classes);
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,98 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Date;
+
+import javax.activation.MimeType;
+
+/**
+ * <p>The top level artifact of the Feed Object Model.  The Parser component
+ * processes data from an InputStream and returns a Document instance.  The 
+ * type of Document returned depends on the XML format being parsed.  The 
+ * Feed Object Model supports four basic types of documents: FeedDocument,
+ * EntryDocument, ServiceDocument (Atom Publishing Protocol Introspection
+ * Documents) and XmlDocument (any arbitrary XML).</p>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Document<T extends Element>  
+  extends Base, Serializable {  
+  
+  /**
+   * Returns the root element of the document (equivalent to DOM's getDocumentElement)
+   */
+  T getRoot();
+  
+  /**
+   * Sets the root element of the document
+   */
+  void setRoot(T root);
+  
+  /**
+   * Returns the Base URI of the document.  All relative URI's contained in the
+   * document will be resolved according to this base.
+   */
+  URI getBaseUri();
+  
+  /**
+   * Sets the Base URI of the document.  All relative URI's contained in the 
+   * document will be resolved according to this base.
+   */
+  void setBaseUri(URI base);
+
+  /**
+   * Sets the Base URI of the document.  All relative URI's contained in the 
+   * document will be resolved according to this base.
+   * @throws URISyntaxException 
+   */
+  void setBaseUri(String base) throws URISyntaxException;
+  
+  /**
+   * Returns the content type of this document
+   */
+  MimeType getContentType();
+  
+  /**
+   * Sets the content type for this document
+   */
+  void setContentType(MimeType contentType);
+  
+  /**
+   * Returns the last modified date for this document
+   */
+  Date getLastModified();
+  
+  /**
+   * Sets the last modified date for this document
+   */
+  void setLastModified(Date lastModified);
+  
+  /**
+   * Gets the charset used for this document
+   */
+  String getCharset();
+  
+  /**
+   * Sets the charset used for this document
+   */
+  void setCharset(String charset);
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Element.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,124 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Root interface for all elements in the Feed Object Model
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Element 
+  extends Base, Serializable {
+  
+  <T extends Base>T getParentElement();
+  
+  void setParentElement(Element parent);
+  
+  <T extends Element>T getPreviousSibling();
+  
+  <T extends Element>T getNextSibling();
+  
+  <T extends Element>T getFirstChild();
+  
+  <T extends Element>T getPreviousSibling(QName qname);
+  
+  <T extends Element>T getNextSibling(QName qname);
+  
+  <T extends Element>T getFirstChild(QName qname);  
+  
+  /**
+   * Returns the value of this elements <code>xml:lang</code> attribute or 
+   * null if <code>xml:lang</code> is undefined.
+   */
+  String getLanguage();
+  
+  /**
+   * Sets the value of this elements <code>xml:lang</code> attribute.
+   */
+  void setLanguage(String language);
+  
+  /**
+   * Returns the value of this element's <code>xml:base</code> attribute or
+   * null if <code>xml:base</code> is undefined.
+   */
+  URI getBaseUri() throws URISyntaxException;
+  
+  /**
+   * Returns the current in-scope, fully qualified Base URI for this element.
+   */
+  URI getResolvedBaseUri() throws URISyntaxException;
+  
+  /**
+   * Sets the value of this element's <code>xml:base</code> attribute.
+   */
+  void setBaseUri(URI base);
+  
+  /**
+   * Sets the value of this element's <code>xml:base</code> attribute.
+   * @throws URISyntaxException 
+   */
+  void setBaseUri(String base) throws URISyntaxException;
+  
+  /**
+   * Returns the document to which this element belongs
+   */
+  <T extends Element>Document<T> getDocument();
+
+  /**
+   * Returns the value of the named attribute
+   */
+  String getAttributeValue(String name);
+
+  /**
+   * Returns the value of the named attribute
+   */
+
+  String getAttributeValue(QName qname);
+
+  /**
+   * Returns the value of the named attribute
+   */
+  String getAttributeValue(String namespace, String localPart);
+    
+  /**
+   * Sets the value of the named attribute
+   */
+  void setAttributeValue(String name, String value);
+
+  /**
+   * Sets the value of the named attribute
+   */
+  void setAttributeValue(QName qname, String value);
+  
+  /**
+   * Sets the value of the named attribute
+   */
+  void setAttributeValue(String namespace, String localPart, String prefix, String value);
+  
+  /**
+   * Removes this element from its current document
+   */
+  void discard();
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,931 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import javax.activation.DataHandler;
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+
+/**
+ * <p>Represents an Atom Entry element.</p>
+ * 
+ * <p>Per RFC4287:</p>
+ * 
+ * <pre>
+  * 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*
+  *        &amp; atomCategory*
+  *        &amp; atomContent?
+  *        &amp; atomContributor*
+  *        &amp; atomId
+  *        &amp; atomLink*
+  *        &amp; atomPublished?
+  *        &amp; atomRights?
+  *        &amp; atomSource?
+  *        &amp; atomSummary?
+  *        &amp; atomTitle
+  *        &amp; atomUpdated
+  *        &amp; 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.
+ * </pre>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Entry 
+  extends ExtensibleElement, ExtensionElement {
+
+  /**
+   * Returns the first author listed for the entry
+   */
+  Person getAuthor();
+  
+  /**
+   * Returns the complete set of authors listed for the entry 
+   */
+  List<Person> getAuthors();
+  
+  /**
+   * Sets the complete set of authors for the entry
+   */
+  void setAuthors(List<Person> people);
+  
+  /**
+   * Adds an individual author to the entry
+   */
+  void addAuthor(Person person);
+
+  /**
+   * Adds an author
+   * @throws URISyntaxException 
+   */
+  Person addAuthor(String name);
+
+  /**
+   * Adds an author
+   * @throws URISyntaxException 
+   */
+  Person addAuthor(String name, String email, String uri) throws URISyntaxException;
+  
+  /**
+   * Adds an author
+   * @throws URISyntaxException 
+   */
+  Person addAuthor(String name, String email, URI uri) throws URISyntaxException;
+  
+  /**
+   * Lists the complete set of categories listed for the entry
+   */
+  List<Category> getCategories();
+  
+  /**
+   * Lists the complete set of categories using the specified scheme
+   * @throws URISyntaxException 
+   */
+  List<Category> getCategories(String scheme) throws URISyntaxException;
+
+  /**
+   * Lists the complete set of categories using the specified scheme
+   */
+  List<Category> getCategories(URI scheme);
+  
+  /**
+   * Sets the complete set of categories
+   */
+  void setCategories(List<Category> categories);
+  
+  /**
+   * Adds an individual category to the entry
+   */
+  void addCategory(Category category);
+  
+  /**
+   * Adds a category to the entry
+   */
+  Category addCategory(String term);
+
+  /**
+   * Adds a category to the entry
+   */
+  Category addCategory(URI scheme, String term, String label);
+  
+  /**
+   * Adds a category to the entry
+   * @throws URISyntaxException 
+   */
+  Category addCategory(String scheme, String term, String label) throws URISyntaxException;
+  
+  /**
+   * Returns the content for this entry
+   */
+  Content getContentElement();
+  
+  /**
+   * Sets the content for this entry
+   */
+  void setContentElement(Content content);
+  
+  /**
+   * Sets the content for this entry as @type="text"
+   */
+  Content setContentAsText(String value);
+  
+  /**
+   * Sets the content for this entry as @type="html".
+   * @param value The unescaped HTML string to set as the content
+   * @param baseUri The value of the content element's xml:base. Null if none. 
+   */
+  Content setContentAsHtml(String value, URI baseUri);
+
+  /**
+   * Sets the content for this entry as @type="html".
+   * @param value The unescaped HTML string to set as the content
+   * @param baseUri The value of the content element's xml:base. Null if none. 
+   */
+  Content setContentAsHtml(String value);
+  
+  /**
+   * Sets the content for this entry as @type="html".
+   * @param value The unescaped HTML string to set as the content
+   * @param baseUri The value of the content element's xml:base. Null if none. 
+   * @throws URISyntaxException 
+   */
+  Content setContentAsHtml(String value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the content for this entry as @type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value A string containing the XHTML.
+   * @param baseUri The value of the content element's xml:base. Null if none.
+   */
+  Content setContentAsXhtml(String value);
+  
+  /**
+   * Sets the content for this entry as @type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value A string containing the XHTML.
+   * @param baseUri The value of the content element's xml:base. Null if none.
+   */
+  Content setContentAsXhtml(String value, URI baseUri);
+  
+  /**
+   * Sets the content for this entry as @type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value A string containing the XHTML.
+   * @param baseUri The value of the content element's xml:base. Null if none.
+   */
+  Content setContentAsXhtml(String value, String baseUri) throws URISyntaxException;
+
+  /**
+   * Sets the content for this entry as @type="xhtml". The value is passed 
+   * in as a parsed org.apache.abdera.model.Div
+   * @param value A Div containing the XHTML
+   * @param baseUri The value of the content element's xml:base. Null if none
+   */
+  Content setContentAsXhtml(Div value);
+  
+  /**
+   * Sets the content for this entry as @type="xhtml". The value is passed 
+   * in as a parsed org.apache.abdera.model.Div
+   * @param value A Div containing the XHTML
+   * @param baseUri The value of the content element's xml:base. Null if none
+   */
+  Content setContentAsXhtml(Div value, URI baseUri);
+
+  /**
+   * Sets the content for this entry as @type="xhtml". The value is passed 
+   * in as a parsed org.apache.abdera.model.Div
+   * @param value A Div containing the XHTML
+   * @param baseUri The value of the content element's xml:base. Null if none
+   */
+  Content setContentAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Returns the text of the content element
+   */
+  String getContent();
+  
+  /**
+   * Returns the content type
+   */
+  Content.Type getContentType();
+
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(String value, MimeType type);
+  
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(String value, String type) throws MimeTypeParseException;
+  
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(String value, MimeType type, URI baseUri);
+
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(String value, MimeType type, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the content for this entry
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsXml(String value, String type, URI baseUri) throws MimeTypeParseException;  
+
+  /**
+   * Sets the content for this entry
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsXml(String value, String type, String baseUri) throws MimeTypeParseException, URISyntaxException;  
+
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(ExtensionElement value, MimeType type);
+
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(ExtensionElement value, String type) throws MimeTypeParseException;
+  
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(ExtensionElement value, MimeType type, URI baseUri);
+
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsXml(ExtensionElement value, MimeType type, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the content for this entry
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsXml(ExtensionElement value, String type, URI baseUri) throws MimeTypeParseException;
+
+  /**
+   * Sets the content for this entry
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsXml(ExtensionElement value, String type, String baseUri) throws MimeTypeParseException, URISyntaxException;  
+  
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsMedia(MimeType type, URI src, DataHandler dataHandler);
+
+  /**
+   * Sets the content for this entry
+   * @throws URISyntaxException 
+   */
+  Content setContentAsMedia(MimeType type, String src, DataHandler dataHandler) throws URISyntaxException;
+  
+  /**
+   * Sets the content for this entry
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsMedia(String type, URI src, DataHandler dataHandler) throws MimeTypeParseException;
+
+  /**
+   * Sets the content for this entry
+   * @throws URISyntaxException 
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsMedia(String type, String src, DataHandler dataHandler) throws MimeTypeParseException, URISyntaxException;
+  
+  /**
+   * Sets the content for this entry
+   */
+  Content setContentAsMedia(MimeType type, URI src, String value);
+
+  /**
+   * Sets the content for this entry
+   * @throws URISyntaxException 
+   */
+  Content setContentAsMedia(MimeType type, String src, String value) throws URISyntaxException;
+  
+  /**
+   * Sets the content for this entry
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsMedia(String type, URI src, String value) throws MimeTypeParseException;
+
+  /**
+   * Sets the content for this entry
+   * @throws URISyntaxException 
+   * @throws MimeTypeParseException 
+   */
+  Content setContentAsMedia(String type, String src, String value) throws MimeTypeParseException, URISyntaxException;
+
+  
+  /**
+   * Lists the complete set of contributors for this entry
+   */
+  List<Person> getContributors();
+  
+  /**
+   * Sets the complete list of contributors for this entry
+   */
+  void setContributors(List<Person> people);
+  
+  /**
+   * Adds an individual contributor to this entry
+   */
+  void addContributor(Person person);
+  
+  /**
+   * Adds an author
+   * @throws URISyntaxException 
+   */
+  Person addContributor(String name);
+
+  /**
+   * Adds an author
+   * @throws URISyntaxException 
+   */
+  Person addContributor(String name, String email, String uri) throws URISyntaxException;
+  
+  /**
+   * Adds an author
+   * @throws URISyntaxException 
+   */
+  Person addContributor(String name, String email, URI uri) throws URISyntaxException;
+
+  
+  /**
+   * Returns the universally unique identifier for this entry
+   */
+  IRI getIdElement();
+  
+  /**
+   * Sets the universally unique identifier for this entry
+   */
+  void setIdElement(IRI id);
+  
+  /**
+   * Returns the universally unique identifier for this entry
+   * @throws URISyntaxException 
+   */
+  URI getId() throws URISyntaxException;
+
+  /**
+   * Sets the universally unique identifier for this entry
+   * @throws URISyntaxException 
+   */
+  IRI setId(URI id) throws URISyntaxException;
+
+  /**
+   * Sets the universally unique identifier for this entry
+   * @throws URISyntaxException 
+   */
+  IRI setId(String id) throws URISyntaxException;
+  
+  /**
+   * Sets the universally unique identifier for this entry
+   * @throws URISyntaxException 
+   */
+  IRI setId(URI id, boolean normalize) throws URISyntaxException;
+
+  /**
+   * Sets the universally unique identifier for this entry
+   * @throws URISyntaxException 
+   */
+  IRI setId(String id, boolean normalize) throws URISyntaxException;
+  
+  /**
+   * Lists the complete set of links for this entry
+   */
+  List<Link> getLinks();
+  
+  /**
+   * Lists the complete set of links using the specified rel attribute value
+   */
+  List<Link> getLinks(String rel);
+  
+  /**
+   * Sets the complete set of links for the entry
+   */
+  void setLinks(List<Link> links);
+  
+  /**
+   * Adds an individual link to the entry
+   */
+  void addLink(Link link);
+  
+  Link addLink(String href) throws URISyntaxException;
+  
+  Link addLink(String href, String rel) throws URISyntaxException;
+  
+  Link addLink(URI href);
+  
+  Link addLink(URI href, String rel);
+  
+  Link addLink(URI href, String rel, MimeType type, String title, String hreflang, long length);
+  
+  Link addLink(String href, String rel, MimeType type, String title, String hreflang, long length) throws URISyntaxException;
+  
+  Link addLink(URI href, String rel, String type, String title, String hreflang, long length) throws MimeTypeParseException;
+  
+  Link addLink(String href, String rel, String type, String title, String hreflang, long length) throws URISyntaxException, MimeTypeParseException;
+  
+  /**
+   * RFC4287: The "atom:published" element is a Date construct indicating an
+   * instant in time associated with an event early in the life cycle of
+   * the entry... Typically, atom:published will be associated with the initial
+   * creation or first availability of the resource.
+   */
+  DateTime getPublishedElement();
+  
+  /**
+   * RFC4287: The "atom:published" element is a Date construct indicating an
+   * instant in time associated with an event early in the life cycle of
+   * the entry... Typically, atom:published will be associated with the initial
+   * creation or first availability of the resource.
+   */
+  void setPublishedElement(DateTime dateTime);
+  
+  String getPublishedString();
+  
+  Date getPublished();
+  
+  DateTime setPublished(Date value);
+  
+  DateTime setPublished(Calendar value);
+  
+  DateTime setPublished(long value);
+  
+  DateTime setPublished(String value);
+  
+  /**
+   * <p>The rights element is typically used to convey a human readable 
+   * copyright (e.g. "&lt;atom:rights>Copyright (c), 2006&lt;/atom:rights>).</p>
+   * 
+   * <p>RFC4287: The "atom:rights" element is a Text construct that conveys 
+   * information about rights held in and over an entry or feed.</p>
+   */
+  Text getRightsElement();
+
+  /**
+   * <p>The rights element is typically used to convey a human readable 
+   * copyright (e.g. "&lt;atom:rights>Copyright (c), 2006&lt;/atom:rights>).</p>
+   * 
+   * <p>RFC4287: The "atom:rights" element is a Text construct that conveys 
+   * information about rights held in and over an entry or feed.</p>
+   */
+  void setRightsElement(Text text);
+  
+  /**
+   * Sets the value of the rights element as type="text"
+   */
+  Text setRightsAsText(String value);
+  
+  /**
+   * Sets the value of the rights element as type="html"
+   * @param value The string containing the unescaped HTML
+   * @param baseUri The content element's xml:base. Null if none
+   */
+  Text setRightsAsHtml(String value);
+
+  /**
+   * Sets the rights for this entry as @type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The right element's xml:base. Null if none
+   */
+  Text setRightsAsXhtml(String value);
+  
+  /**
+   * Sets the value of the rights element as type="xhtml"
+   * @param value The XHTML Div
+   * @param baseUri The right element's xml:base. Null if none
+   */
+  Text setRightsAsXhtml(Div value);
+
+  
+  /**
+   * Sets the value of the rights element as type="html"
+   * @param value The string containing the unescaped HTML
+   * @param baseUri The content element's xml:base. Null if none
+   */
+  Text setRightsAsHtml(String value, URI baseUri);
+
+  /**
+   * Sets the rights for this entry as @type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The right element's xml:base. Null if none
+   */
+  Text setRightsAsXhtml(String value, URI baseUri);
+  
+  /**
+   * Sets the value of the rights element as type="xhtml"
+   * @param value The XHTML Div
+   * @param baseUri The right element's xml:base. Null if none
+   */
+  Text setRightsAsXhtml(Div value, URI baseUri);
+  
+  /**
+   * Sets the value of the rights element as type="html"
+   * @param value The string containing the unescaped HTML
+   * @param baseUri The content element's xml:base. Null if none
+   * @throws URISyntaxException 
+   */
+  Text setRightsAsHtml(String value, String baseUri) throws URISyntaxException;
+
+  /**
+   * Sets the rights for this entry as @type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The right element's xml:base. Null if none
+   */
+  Text setRightsAsXhtml(String value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the value of the rights element as type="xhtml"
+   * @param value The XHTML Div
+   * @param baseUri The right element's xml:base. Null if none
+   */
+  Text setRightsAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Return the String value of the atom:rights element
+   */
+  String getRights();
+  
+  /**
+   * Return the @type of the atom:rights element
+   */
+  Text.Type getRightsType();
+  
+  /**
+   * <p>Returns the source element for this entry.</p>
+   * 
+   * <p>RFC4287: If an atom:entry is copied from one feed into another feed, 
+   * then the source atom:feed's metadata (all child elements of atom:feed 
+   * other than the atom:entry elements) MAY be preserved within the copied
+   * entry by adding an atom:source child element, if it is not already
+   * present in the entry, and including some or all of the source feed's
+   * Metadata elements as the atom:source element's children.  Such
+   * metadata SHOULD be preserved if the source atom:feed contains any of
+   * the child elements atom:author, atom:contributor, atom:rights, or
+   * atom:category and those child elements are not present in the source
+   * atom:entry.</p>
+   */
+  Source getSource();
+
+  /**
+   * <p>Returns the source element for this entry.</p>
+   * 
+   * <p>RFC4287: If an atom:entry is copied from one feed into another feed, 
+   * then the source atom:feed's metadata (all child elements of atom:feed 
+   * other than the atom:entry elements) MAY be preserved within the copied
+   * entry by adding an atom:source child element, if it is not already
+   * present in the entry, and including some or all of the source feed's
+   * Metadata elements as the atom:source element's children.  Such
+   * metadata SHOULD be preserved if the source atom:feed contains any of
+   * the child elements atom:author, atom:contributor, atom:rights, or
+   * atom:category and those child elements are not present in the source
+   * atom:entry.</p>
+   */
+  void setSource(Source source);
+  
+  /**
+   * RFC4287: The "atom:summary" element is a Text construct that conveys 
+   * a short summary, abstract, or excerpt of an entry... It is not advisable 
+   * for the atom:summary element to duplicate atom:title or atom:content 
+   * because Atom Processors might assume there is a useful summary when there 
+   * is none.
+   */
+  Text getSummaryElement();
+
+  /**
+   * RFC4287: The "atom:summary" element is a Text construct that conveys 
+   * a short summary, abstract, or excerpt of an entry... It is not advisable 
+   * for the atom:summary element to duplicate atom:title or atom:content 
+   * because Atom Processors might assume there is a useful summary when there 
+   * is none.
+   */
+  void setSummaryElement(Text text);
+  
+  /**
+   * Sets the summary of this entry as type="text"
+   */
+  Text setSummaryAsText(String value);
+  
+  /**
+   * Sets the summary of this entry as type="html"
+   */
+  Text setSummaryAsHtml(String value);
+  
+  /**
+   * Sets the summary for this entry as type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The summary element's xml:base. Null if none
+   */
+  Text setSummaryAsXhtml(String value);
+  
+  /**
+   * Sets the summary for this entr as type="xhtml"
+   */
+  Text setSummaryAsXhtml(Div value);
+  
+  /**
+   * Sets the summary of this entry as type="html"
+   */
+  Text setSummaryAsHtml(String value, URI baseUri);
+  
+  /**
+   * Sets the summary for this entry as type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The summary element's xml:base. Null if none
+   */
+  Text setSummaryAsXhtml(String value, URI baseUri);
+  
+  /**
+   * Sets the summary for this entr as type="xhtml"
+   */
+  Text setSummaryAsXhtml(Div value, URI baseUri);
+    
+  /**
+   * Sets the summary of this entry as type="html"
+   */
+  Text setSummaryAsHtml(String value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the summary for this entry as type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The summary element's xml:base. Null if none
+   */
+  Text setSummaryAsXhtml(String value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the summary for this entr as type="xhtml"
+   */
+  Text setSummaryAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Returns the text string value of this summary
+   */
+  String getSummary();
+  
+  /**
+   * Returns the summary type
+   */
+  Text.Type getSummaryType();
+  
+  /**
+   * RFC4287: The "atom:title" element is a Text construct that conveys a 
+   * human-readable title for an entry or feed.
+   */
+  Text getTitleElement();
+
+  /**
+   * RFC4287: The "atom:title" element is a Text construct that conveys a 
+   * human-readable title for an entry or feed.
+   */
+  void setTitleElement(Text title);
+  
+  /**
+   * Sets the value of atom:title as type="text"
+   */
+  Text setTitleAsText(String value);
+  
+  /**
+   * Sets the value of atom:title as type="html"
+   */
+  Text setTitleAsHtml(String value);
+  
+  /**
+   * Sets the title for this entry as type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The title element's xml:base. Null if none
+   */
+  Text setTitleAsXhtml(String value);
+  
+  /**
+   * Sets the title for this entry as type="xhtml".
+   * @param value The parsed XHTML Div
+   * @param baseUri The title element's xml:base. Null if none
+   */
+  Text setTitleAsXhtml(Div value);
+  
+  /**
+   * Sets the value of atom:title as type="html"
+   */
+  Text setTitleAsHtml(String value, URI baseUri);
+  
+  /**
+   * Sets the title for this entry as type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The title element's xml:base. Null if none
+   */
+  Text setTitleAsXhtml(String value, URI baseUri);
+  
+  /**
+   * Sets the title for this entry as type="xhtml".
+   * @param value The parsed XHTML Div
+   * @param baseUri The title element's xml:base. Null if none
+   */
+  Text setTitleAsXhtml(Div value, URI baseUri);
+  
+  /**
+   * Sets the value of atom:title as type="html"
+   */
+  Text setTitleAsHtml(String value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the title for this entry as type="xhtml".  The value is passed in
+   * as a string containing unparsed XHTML with a &lt;div&lt; as the root.
+   * For example, "&lt;div xmlns="http://www.w3.org/1999/xhtml">foo&lt;/div>"
+   * @param value The string containing an unparsed XHTML div
+   * @param baseUri The title element's xml:base. Null if none
+   */
+  Text setTitleAsXhtml(String value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Sets the title for this entry as type="xhtml".
+   * @param value The parsed XHTML Div
+   * @param baseUri The title element's xml:base. Null if none
+   */
+  Text setTitleAsXhtml(Div value, String baseUri) throws URISyntaxException;
+  
+  /**
+   * Returns the text string value of the title element
+   */
+  String getTitle();
+  
+  /**
+   * Returns the @type of this entries title
+   */
+  Text.Type getTitleType();
+  
+  /**
+   * RFC4287: The "atom:updated" element is a Date construct indicating 
+   * the most recent instant in time when an entry or feed was modified 
+   * in a way the publisher considers significant.  Therefore, not all
+   * modifications necessarily result in a changed atom:updated value.
+   */
+  DateTime getUpdatedElement();
+
+  /**
+   * RFC4287: The "atom:updated" element is a Date construct indicating 
+   * the most recent instant in time when an entry or feed was modified 
+   * in a way the publisher considers significant.  Therefore, not all
+   * modifications necessarily result in a changed atom:updated value.
+   */
+  void setUpdatedElement(DateTime updated);
+  
+  String getUpdatedString();
+  
+  Date getUpdated();
+  
+  DateTime setUpdated(Date value);
+  
+  DateTime setUpdated(Calendar value);
+  
+  DateTime setUpdated(long value);
+  
+  DateTime setUpdated(String value);
+  
+  /**
+   * Returns this entries Atom Publishing Protocol control element
+   */
+  Control getControl();
+  
+  /**
+   * Sets this entries Atom Publishing Protocol control element
+   */
+  void setControl(Control control);
+  
+  /**
+   * Returns the first link with the specified rel attribute value
+   */
+  Link getLink(String rel);
+  
+  /**
+   * Returns this entries first alternate link
+   */
+  Link getAlternateLink();
+  
+  /**
+   * Returns this entries first enclosure link
+   */
+  Link getEnclosureLink();
+  
+  /**
+   * Returns this entries first edit link
+   */
+  Link getEditLink();
+  
+  void addInReplyTo(InReplyTo replyTo);
+  
+  InReplyTo addInReplyTo();
+  
+  InReplyTo addInReplyTo(Entry ref);
+  
+  InReplyTo addInReplyTo(URI ref);
+  
+  InReplyTo addInReplyTo(String ref) throws URISyntaxException;
+  
+  InReplyTo addInReplyTo(URI ref, URI source, URI href, MimeType type);
+  
+  InReplyTo addInReplyTo(String ref, String source, String href, String type) throws URISyntaxException, MimeTypeParseException;
+  
+  InReplyTo getInReplyTo();
+  
+  List<InReplyTo> getInReplyTos();
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensibleElement.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,94 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/**   
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface ExtensibleElement extends Element {
+
+  /**
+   * Returns the complete set of extension elements
+   */
+  List<ExtensionElement> getExtensions();
+  
+  /**
+   * Returns the complete set of extension elements using the specified 
+   * XML Namespace URI
+   */
+  List<ExtensionElement> getExtensions(String uri);
+  
+  /**
+   * Returns the complete set of extension elements using the specified
+   * XML qualified name
+   */
+  List<ExtensionElement> getExtensions(QName qname);
+  
+  /**
+   * Returns the first extension element with the XML qualified name
+   */
+  ExtensionElement getExtension(QName qname);
+  
+  /**
+   * Adds an individual extension element
+   */
+  void addExtension(ExtensionElement extension);
+
+  /**
+   * Adds an individual extension element
+   */
+  ExtensionElement addExtension(QName qname);
+  
+  /**
+   * Adds an individual extension element
+   */
+  ExtensionElement addExtension(
+    String namespace, 
+    String localPart,
+    String prefix);
+  
+  /**
+   * Adds a simple extension (text content only)
+   */
+  StringElement addSimpleExtension(
+    QName qname, 
+    String value);
+  
+  /**
+   * Adds a simple extension (text content only)
+   */
+  StringElement addSimpleExtension(
+    String namespace, 
+    String localPart, 
+    String prefix, 
+    String value);
+  
+  /**
+   * Adds a list of extensions
+   */
+  void addExtensions(List<ExtensionElement> extensions);
+  
+  /**
+   * Find an extension by Class rather than QName
+   */
+  <T extends ExtensionElement> T getExtension(Class<T> _class);
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensionElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensionElement.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensionElement.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/ExtensionElement.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,30 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface ExtensionElement 
+  extends Element {
+
+  QName getQName();
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Feed.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Feed.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Feed.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Feed.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,135 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.util.List;
+
+/**
+ * <p>Represents an Atom Feed Element</p>
+ * 
+ * <p>Per RFC4287:</p>
+ * 
+ * <pre>
+  * The "atom:feed" element is the document (i.e., top-level) element of
+  * an Atom Feed Document, acting as a container for metadata and data
+  * associated with the feed.  Its element children consist of metadata
+  * elements followed by zero or more atom:entry child elements.
+  *
+  * atomFeed =
+  *   element atom:feed {
+  *       atomCommonAttributes,
+  *       (atomAuthor*
+  *        &amp; atomCategory*
+  *        &amp; atomContributor*
+  *        &amp; atomGenerator?
+  *        &amp; atomIcon?
+  *        &amp; atomId
+  *        &amp; atomLink*
+  *        &amp; atomLogo?
+  *        &amp; atomRights?
+  *        &amp; atomSubtitle?
+  *        &amp; atomTitle
+  *        &amp; atomUpdated
+  *        &amp; extensionElement*),
+  *       atomEntry*
+  *   }
+  *
+  * This specification assigns no significance to the order of atom:entry
+  * elements within the feed.
+  *
+  * The following child elements are defined by this specification (note
+  * that the presence of some of these elements is required):
+  *
+  * o  atom:feed elements MUST contain one or more atom:author elements,
+  *    unless all of the atom:feed element's child atom:entry elements
+  *    contain at least one atom:author element.
+  * o  atom:feed elements MAY contain any number of atom:category
+  *    elements.
+  * o  atom:feed elements MAY contain any number of atom:contributor
+  *    elements.
+  * o  atom:feed elements MUST NOT contain more than one atom:generator
+  *    element.
+  * o  atom:feed elements MUST NOT contain more than one atom:icon
+  *    element.
+  * o  atom:feed elements MUST NOT contain more than one atom:logo
+  *    element.
+  * o  atom:feed elements MUST contain exactly one atom:id element.
+  * o  atom:feed elements SHOULD contain one atom:link element with a rel
+  *    attribute value of "self".  This is the preferred URI for
+  *    retrieving Atom Feed Documents representing this Atom feed.
+  * o  atom:feed 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:feed elements MAY contain additional atom:link elements
+  *    beyond those described above.
+  * o  atom:feed elements MUST NOT contain more than one atom:rights
+  *    element.
+  * o  atom:feed elements MUST NOT contain more than one atom:subtitle
+  *    element.
+  * o  atom:feed elements MUST contain exactly one atom:title element.
+  * o  atom:feed elements MUST contain exactly one atom:updated element.
+  *
+  * If multiple atom:entry elements with the same atom:id value appear in
+  * an Atom Feed Document, they represent the same entry.  Their
+  * atom:updated timestamps SHOULD be different.  If an Atom Feed
+  * Document contains multiple entries with the same atom:id, Atom
+  * Processors MAY choose to display all of them or some subset of them.
+  * One typical behavior would be to display only the entry with the
+  * latest atom:updated timestamp.
+ * </pre>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Feed 
+  extends Source {
+
+  /**
+   * Returns the complete set of entries contained in this feed
+   */
+  List<Entry> getEntries();
+  
+  /**
+   * Sets the complete set of entries for this feed
+   */
+  void setEntries(List<Entry> entries);
+  
+  /**
+   * Adds a new Entry to the <i>end</i> of the Feeds collection of entries
+   */
+  void addEntry(Entry entry);
+
+  /**
+   * Adds a new Entry to the <i>end</i> of the Feeds collection of entries
+   */
+  Entry addEntry();
+  
+  /**
+   * Adds a new Entry to the <i>start</i> of the Feeds collection of entries
+   */
+  void insertEntry(Entry entry);
+
+  /**
+   * Adds a new Entry to the <i>start</i> of the Feeds collection of entries
+   */
+  Entry insertEntry();
+  
+  /**
+   * Creates a Source element from this Feed
+   */
+  Source getAsSource();
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Generator.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,94 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * <p>Identifies the software implementation that produced the Atom feed.</p>
+ * 
+ * <p>Per RFC4287:</p>
+ * 
+ * <pre>
+ * The "atom:generator" element's content identifies the agent used to
+ *  generate a feed, for debugging and other purposes.
+ *  The content of this element, when present, MUST be a string that is a
+ *  human-readable name for the generating agent.  Entities such as
+ *  "&amp;amp;" and "&amp;lt;" represent their corresponding characters 
+ *  ("&amp;" and "&lt;" respectively), not markup.
+ *
+ *  The atom:generator element MAY have a "uri" attribute whose value
+ *  MUST be an IRI reference [RFC3987].  When dereferenced, the resulting
+ *  URI (mapped from an IRI, if necessary) SHOULD produce a
+ *  representation that is relevant to that agent.
+ *
+ *  The atom:generator element MAY have a "version" attribute that
+ *  indicates the version of the generating agent.
+ * </pre>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Generator 
+  extends StringElement {
+
+  /**
+   *  The atom:generator element MAY have a "uri" attribute whose value
+   *  MUST be an IRI reference [RFC3987].  When dereferenced, the resulting
+   *  URI (mapped from an IRI, if necessary) SHOULD produce a
+   *  representation that is relevant to that agent.
+   * @throws URISyntaxException 
+   */
+  URI getUri() throws URISyntaxException;
+  
+  /**
+   * Returns the fully qualified form of the generator element's uri attribute
+   * (resolved against the in-scope Base URI)
+   */
+  URI getResolvedUri() throws URISyntaxException;
+  
+  /**
+   *  The atom:generator element MAY have a "uri" attribute whose value
+   *  MUST be an IRI reference [RFC3987].  When dereferenced, the resulting
+   *  URI (mapped from an IRI, if necessary) SHOULD produce a
+   *  representation that is relevant to that agent.
+   */
+  void setUri(URI uri);
+  
+  /**
+   *  The atom:generator element MAY have a "uri" attribute whose value
+   *  MUST be an IRI reference [RFC3987].  When dereferenced, the resulting
+   *  URI (mapped from an IRI, if necessary) SHOULD produce a
+   *  representation that is relevant to that agent.
+   * @throws URISyntaxException 
+   */
+  void setUri(String uri) throws URISyntaxException;
+  
+  /**
+   * The atom:generator element MAY have a "version" attribute that
+   * indicates the version of the generating agent.
+   */
+  String getVersion();
+
+  /**
+   * The atom:generator element MAY have a "version" attribute that
+   * indicates the version of the generating agent.
+   */
+  void setVersion(String version);
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,58 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * <p>The IRIElement interface provides a common base for a set of feed and 
+ * entry elements whose content value must be a valid IRI/URI reference.  
+ * These include the elements atom:icon, atom:logo, and atom:id.</p>
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface IRI 
+  extends  ExtensionElement {
+  
+  /**
+   * Returns the value of the element as a java.net.URI 
+   */
+  URI getValue() throws URISyntaxException;
+  
+  /**
+   * Sets the value of the element
+   */
+  void setValue(URI iri);
+  
+  /**
+   * Sets the value of the element
+   * @throws URISyntaxException 
+   */
+  void setValue(String iri) throws URISyntaxException;
+  
+  void setNormalizedValue(URI id) throws URISyntaxException;
+  
+  void setNormalizedValue(String id) throws URISyntaxException;
+  
+  /**
+   * Returns the value of the element resolved against the current
+   * in-scope Base URI
+   */
+  URI getResolvedValue() throws URISyntaxException;
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/InReplyTo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/InReplyTo.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/InReplyTo.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/InReplyTo.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,111 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+
+/**
+ * Provides an interface for the Atom Threading Extension in-reply-to
+ * element.  The in-reply-to element allows an entry to be marked as 
+ * a response to another resource.
+ */
+public interface InReplyTo 
+  extends ExtensionElement {
+  
+  /**
+   * Returns the persistent and universally unique identifier of the 
+   * resource the entry is a response to.
+   */
+  URI getRef() throws URISyntaxException;
+  
+  /**
+   * Sets the persistent and universally unique identifier of the 
+   * resource that this entry is a response to
+   */
+  void setRef(URI ref);
+
+  /**
+   * Sets the persistent and universally unique identifier of the 
+   * resource that this entry is a response to
+   */
+  void setRef(String ref) throws URISyntaxException;
+  
+  /**
+   * Returns the resolved value of the href attribute
+   */
+  URI getResolvedHref() throws URISyntaxException;
+  
+  /**
+   * Returns a dereferenceable URI indicating where a representation of the 
+   * resource being responded to may be retrieved
+   */
+  URI getHref() throws URISyntaxException;
+  
+  /**
+   * Sets a dereferenceable URI indicating where a representation of the 
+   * resource being responded to may be retrieved
+   */
+  void setHref(URI ref);
+  
+  /**
+   * Sets a dereferenceable URI indicating where a representation of the 
+   * resource being responded to may be retrieved
+   */
+  void setHref(String ref) throws URISyntaxException;
+  
+  /**
+   * Returns the media type of the resource referenced by the href attribute
+   */
+  MimeType getMimeType() throws MimeTypeParseException;
+
+  /**
+   * Sets the media type of the resource referenced by the href attribute
+   */
+  void setMimeType(MimeType mimeType);
+  
+  /**
+   * Sets the media type of the resource referenced by the href attribute
+   */
+  void setMimeType(String mimeType) throws MimeTypeParseException;
+  
+  /**
+   * Returns a dereferenceable URI of an Atom Feed or Entry Document resolved
+   * against the in-scope Base URI
+   */
+  URI getResolvedSource() throws URISyntaxException;
+  
+  /**
+   * Returns a dereferenceable URI of an Atom Feed or Entry Document
+   */
+  URI getSource() throws URISyntaxException;
+  
+  /**
+   * Sets a dereferenceable URI of an Atom Feed or Entry Document
+   */
+  void setSource(URI source);
+  
+  /**
+   * Sets a dereferenceable URI of an Atom Feed or Entry Document
+   */
+  void setSource(String source) throws URISyntaxException;
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,243 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+
+/**
+ * <p>Represents an Atom Link element.</p>
+ * 
+ * <p>Per RFC4287:</p>
+ * 
+ * <pre>
+ *  The "atom:link" element defines a reference from an entry or feed to
+ *  a Web resource.  This specification assigns no meaning to the content
+ *  (if any) of this element.
+ *
+ *  atomLink =
+ *     element atom:link {
+ *        atomCommonAttributes,
+ *        attribute href { atomUri },
+ *        attribute rel { atomNCName | atomUri }?,
+ *        attribute type { atomMediaType }?,
+ *        attribute hreflang { atomLanguageTag }?,
+ *        attribute title { text }?,
+ *        attribute length { text }?,
+ *        undefinedContent
+ *     }
+ * </pre>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Link 
+  extends ExtensibleElement, StringElement {
+
+  public static final String REL_ALTERNATE = "alternate";
+  public static final String REL_CURRENT = "current";
+  public static final String REL_ENCLOSURE = "enclosure";
+  public static final String REL_FIRST = "first";
+  public static final String REL_LAST = "last";
+  public static final String REL_NEXT = "next";
+  public static final String REL_PAYMENT = "payment";
+  public static final String REL_PREVIOUS = "previous";
+  public static final String REL_RELATED = "related";
+  public static final String REL_SELF = "self";
+  public static final String REL_VIA = "via";
+  public static final String REL_REPLIES = "replies";
+  public static final String REL_LICENSE = "license";
+  public static final String REL_EDIT = "edit";
+  public static final String REL_EDIT_MEDIA = "edit-media";
+  
+  public static final String IANA_BASE = "http://www.iana.org/assignments/relation/";
+  
+  public static final String REL_ALTERNATE_IANA = IANA_BASE + REL_ALTERNATE;
+  public static final String REL_CURRENT_IANA = IANA_BASE + REL_CURRENT;
+  public static final String REL_ENCLOSURE_IANA = IANA_BASE + REL_ENCLOSURE;
+  public static final String REL_FIRST_IANA = IANA_BASE + REL_FIRST;
+  public static final String REL_LAST_IANA = IANA_BASE + REL_LAST;
+  public static final String REL_NEXT_IANA = IANA_BASE + REL_NEXT;
+  public static final String REL_PAYMENT_IANA = IANA_BASE + REL_PAYMENT;
+  public static final String REL_PREVIOUS_IANA = IANA_BASE + REL_PREVIOUS;
+  public static final String REL_RELATED_IANA = IANA_BASE + REL_RELATED;
+  public static final String REL_SELF_IANA = IANA_BASE + REL_SELF;
+  public static final String REL_VIA_IANA = IANA_BASE + REL_VIA;
+  public static final String REL_REPLIES_IANA = IANA_BASE + REL_REPLIES;
+  public static final String REL_LICENSE_IANA = IANA_BASE + REL_LICENSE;
+  public static final String REL_EDIT_IANA = IANA_BASE + REL_EDIT;
+  public static final String REL_EDIT_MEDIA_IANA = IANA_BASE + REL_EDIT_MEDIA;
+  
+  /**
+   * RFC4287: The "href" attribute contains the link's IRI. atom:link 
+   * elements MUST have an href attribute, whose value MUST be a IRI 
+   * reference [RFC3987].
+   */
+  URI getHref() throws URISyntaxException;
+  
+  /**
+   * Returns the value of the link's href attribute resolved against the 
+   * in-scope Base URI
+   */
+  URI getResolvedHref() throws URISyntaxException;
+  
+  /**
+   * RFC4287: The "href" attribute contains the link's IRI. atom:link 
+   * elements MUST have an href attribute, whose value MUST be a IRI 
+   * reference [RFC3987].
+   */
+  void setHref(URI href);
+  
+  /**
+   * RFC4287: The "href" attribute contains the link's IRI. atom:link 
+   * elements MUST have an href attribute, whose value MUST be a IRI 
+   * reference [RFC3987].
+   * @throws URISyntaxException 
+   */
+  void setHref(String href) throws URISyntaxException;
+  
+  /**
+   * <p>RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link
+   * relation type.  If the "rel" attribute is not present, the link
+   * element MUST be interpreted as if the link relation type is
+   * "alternate"... The value of "rel" MUST be a string that is non-empty 
+   * and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987].
+   * Note that use of a relative reference other than a simple name is not
+   * allowed.  If a name is given, implementations MUST consider the link
+   * relation type equivalent to the same name registered within the IANA 
+   * Registry of Link Relations (Section 7), and thus to the IRI that
+   * would be obtained by appending the value of the rel attribute to the
+   * string "http://www.iana.org/assignments/relation/".  The value of
+   * "rel" describes the meaning of the link, but does not impose any
+   * behavioral requirements on Atom Processors.</p>
+   */
+  String getRel();
+  
+  /**
+   * <p>RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link
+   * relation type.  If the "rel" attribute is not present, the link
+   * element MUST be interpreted as if the link relation type is
+   * "alternate"... The value of "rel" MUST be a string that is non-empty 
+   * and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987].
+   * Note that use of a relative reference other than a simple name is not
+   * allowed.  If a name is given, implementations MUST consider the link
+   * relation type equivalent to the same name registered within the IANA 
+   * Registry of Link Relations (Section 7), and thus to the IRI that
+   * would be obtained by appending the value of the rel attribute to the
+   * string "http://www.iana.org/assignments/relation/".  The value of
+   * "rel" describes the meaning of the link, but does not impose any
+   * behavioral requirements on Atom Processors.</p>
+   */
+  void setRel(String rel);
+  
+  /**
+   * RFC4287: On the link element, the "type" attribute's value is an advisory
+   * media type: it is a hint about the type of the representation that is
+   * expected to be returned when the value of the href attribute is
+   * dereferenced.  Note that the type attribute does not override the
+   * actual media type returned with the representation.  Link elements
+   * MAY have a type attribute, whose value MUST conform to the syntax of
+   * a MIME media type [MIMEREG].
+   * @throws MimeTypeParseException 
+   */
+  MimeType getMimeType() throws MimeTypeParseException;
+
+  /**
+   * RFC4287: On the link element, the "type" attribute's value is an advisory
+   * media type: it is a hint about the type of the representation that is
+   * expected to be returned when the value of the href attribute is
+   * dereferenced.  Note that the type attribute does not override the
+   * actual media type returned with the representation.  Link elements
+   * MAY have a type attribute, whose value MUST conform to the syntax of
+   * a MIME media type [MIMEREG].
+   */
+  void setMimeType(MimeType type);
+  
+  /**
+   * RFC4287: On the link element, the "type" attribute's value is an advisory
+   * media type: it is a hint about the type of the representation that is
+   * expected to be returned when the value of the href attribute is
+   * dereferenced.  Note that the type attribute does not override the
+   * actual media type returned with the representation.  Link elements
+   * MAY have a type attribute, whose value MUST conform to the syntax of
+   * a MIME media type [MIMEREG].
+   * @throws MimeTypeParseException 
+   */
+  void setMimeType(String type) throws MimeTypeParseException;
+  
+  /**
+   * RFC4287: The "hreflang" attribute's content describes the language of the
+   * resource pointed to by the href attribute.  When used together with
+   * the rel="alternate", it implies a translated version of the entry.
+   * Link elements MAY have an hreflang attribute, whose value MUST be a
+   * language tag [RFC3066].
+   */
+  String getHrefLang();
+  
+  /**
+   * RFC4287: The "hreflang" attribute's content describes the language of the
+   * resource pointed to by the href attribute.  When used together with
+   * the rel="alternate", it implies a translated version of the entry.
+   * Link elements MAY have an hreflang attribute, whose value MUST be a
+   * language tag [RFC3066].
+   */
+  void setHrefLang(String lang);
+  
+  /**
+   * RFC4287: The "title" attribute conveys human-readable information about the
+   * link.  The content of the "title" attribute is Language-Sensitive.
+   * Entities such as "&amp;amp;" and "&amp;lt;" represent their corresponding
+   * characters ("&amp;" and "&lt;", respectively), not markup.  Link elements
+   * MAY have a title attribute.
+   */
+  String getTitle();
+  
+  /**
+   * RFC4287: The "title" attribute conveys human-readable information about the
+   * link.  The content of the "title" attribute is Language-Sensitive.
+   * Entities such as "&amp;amp;" and "&amp;lt;" represent their corresponding
+   * characters ("&amp;" and "&lt;", respectively), not markup.  Link elements
+   * MAY have a title attribute.
+   */
+  void setTitle(String title);
+  
+  /**
+   * RFC4287: The "length" attribute indicates an advisory length of the linked
+   * content in octets; it is a hint about the content length of the
+   * representation returned when the IRI in the href attribute is mapped
+   * to a URI and dereferenced.  Note that the length attribute does not
+   * override the actual content length of the representation as reported
+   * by the underlying protocol.  Link elements MAY have a length
+   * attribute.
+   */
+  long getLength();
+  
+  /**
+   * RFC4287: The "length" attribute indicates an advisory length of the linked
+   * content in octets; it is a hint about the content length of the
+   * representation returned when the IRI in the href attribute is mapped
+   * to a URI and dereferenced.  Note that the length attribute does not
+   * override the actual content length of the representation as reported
+   * by the underlying protocol.  Link elements MAY have a length
+   * attribute.
+   */
+  void setLength(long length);
+  
+}

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java?rev=414893&view=auto
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java Fri Jun 16 13:10:47 2006
@@ -0,0 +1,147 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  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.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.model;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * <p>An Atom Person Construct</p>
+ * 
+ * <p>Per RFC4287:</p>
+ * 
+ * <pre>
+ *   A Person construct is an element that describes a person,
+ *   corporation, or similar entity (hereafter, 'person').
+ *
+ *   atomPersonConstruct =
+ *     atomCommonAttributes,
+ *     (element atom:name { text }
+ *      &amp; element atom:uri { atomUri }?
+ *      &amp; element atom:email { atomEmailAddress }?
+ *      &amp; extensionElement*)
+ *
+ * </pre>
+ * 
+ * @author James M Snell (jasnell@us.ibm.com)
+ */
+public interface Person 
+  extends ExtensibleElement, ExtensionElement {
+
+  /**
+   * 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.
+   */
+  StringElement getNameElement();
+  
+  /**
+   * 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.
+   */
+  void setNameElement(StringElement 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.
+   */
+  StringElement setName(String name);
+  
+  /**
+   * 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.
+   */
+  String getName();
+  
+  /**
+   * 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].
+   */
+  StringElement getEmailElement();
+  
+  /**
+   * 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].
+   */
+  void setEmailElement(StringElement 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].
+   */
+  StringElement setEmail(String email);
+  
+  /**
+   * 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].
+   */
+  String getEmail();  
+  
+  /**
+   * 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].
+   */
+  IRI getUriElement();
+  
+  /**
+   * 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].
+   */
+  void setUriElement(IRI uri);
+  
+  /**
+   * 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].
+   */
+  IRI setUri(URI uri);
+
+  /**
+   * 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].
+   * @throws URISyntaxException 
+   */
+  IRI setUri(String uri) throws URISyntaxException;
+  
+  /**
+   * 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].
+   * @throws URISyntaxException 
+   */
+  URI getUri() throws URISyntaxException;
+}



Mime
View raw message