abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r451368 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/factory/ core/src/main/java/org/apache/abdera/model/ parser/src/main/java/org/apache/abdera/parser/stax/ parser/src/test/java/org/apache/abdera/test/parser/stax/
Date Fri, 29 Sep 2006 18:05:09 GMT
Author: jmsnell
Date: Fri Sep 29 11:05:08 2006
New Revision: 451368

URL: http://svn.apache.org/viewvc?view=rev&rev=451368
Log:
Rename model.IRI to model.IRIElement in preparation of integrating the new IRI impl code

Added:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRIElement.java
      - copied, changed from r448816, incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java
Removed:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java
Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/factory/Factory.java
Fri Sep 29 11:05:08 2006
@@ -33,7 +33,7 @@
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Service;
@@ -205,47 +205,47 @@
   /**
    * Create a new id element.
    */
-  IRI newID();
+  IRIElement newID();
 
   /**
    * Create a new id element as a child of the given Element.
    */
-  IRI newID(Element parent);
+  IRIElement newID(Element parent);
 
   /**
    * Create a new icon element.
    */
-  IRI newIcon();
+  IRIElement newIcon();
 
   /**
    * Create a new icon element as a child of the given Element.
    */
-  IRI newIcon(Element parent);
+  IRIElement newIcon(Element parent);
 
   /**
    * Create a new logo element.
    */
-  IRI newLogo();
+  IRIElement newLogo();
 
   /**
    * Create a new logo element as a child of the given Element.
    */
-  IRI newLogo(Element parent);
+  IRIElement newLogo(Element parent);
 
   /**
    * Create a new uri element.
    */
-  IRI newUri();
+  IRIElement newUri();
 
   /**
    * Create a new uri element as a child of the given Element.
    */
-  IRI newUri(Element parent);
+  IRIElement newUri(Element parent);
 
   /**
    * Create a new IRI element with the given QName as a child of the given Element.
    */
-  IRI newIRIElement(QName qname, Element parent);
+  IRIElement newIRIElement(QName qname, Element parent);
 
   /**
    * Create a new Link element.

Modified: 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?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java Fri
Sep 29 11:05:08 2006
@@ -271,12 +271,12 @@
   /**
    * Returns the universally unique identifier for this entry
    */
-  IRI getIdElement();
+  IRIElement getIdElement();
   
   /**
    * Sets the universally unique identifier for this entry
    */
-  void setIdElement(IRI id);
+  void setIdElement(IRIElement id);
   
   /**
    * Returns the universally unique identifier for this entry
@@ -288,13 +288,13 @@
    * Sets the universally unique identifier for this entry
    * @throws URISyntaxException 
    */
-  IRI setId(String id) throws URISyntaxException;
+  IRIElement setId(String id) throws URISyntaxException;
   
   /**
    * Sets the universally unique identifier for this entry
    * @throws URISyntaxException 
    */
-  IRI setId(String id, boolean normalize) throws URISyntaxException;
+  IRIElement setId(String id, boolean normalize) throws URISyntaxException;
   
   /**
    * Lists the complete set of links for this entry

Copied: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRIElement.java
(from r448816, 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/IRIElement.java?view=diff&rev=451368&p1=incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java&r1=448816&p2=incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRIElement.java&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRI.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/IRIElement.java
Fri Sep 29 11:05:08 2006
@@ -25,7 +25,7 @@
  * entry elements whose content value must be a valid IRI/URI reference.  
  * These include the elements atom:icon, atom:logo, and atom:id.</p>
  */
-public interface IRI 
+public interface IRIElement 
   extends  Element {
   
   /**

Modified: 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?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Person.java Fri
Sep 29 11:05:08 2006
@@ -107,7 +107,7 @@
    * NOT contain more than one.  The content of atom:uri in a Person
    * construct MUST be an IRI reference [RFC3987].
    */
-  IRI getUriElement();
+  IRIElement getUriElement();
   
   /**
    * The "atom:uri" element's content conveys an IRI associated with the
@@ -115,7 +115,7 @@
    * NOT contain more than one.  The content of atom:uri in a Person
    * construct MUST be an IRI reference [RFC3987].
    */
-  void setUriElement(IRI uri);
+  void setUriElement(IRIElement uri);
   
   /**
    * The "atom:uri" element's content conveys an IRI associated with the
@@ -124,7 +124,7 @@
    * construct MUST be an IRI reference [RFC3987].
    * @throws URISyntaxException 
    */
-  IRI setUri(String uri) throws URISyntaxException;
+  IRIElement setUri(String uri) throws URISyntaxException;
   
   /**
    * The "atom:uri" element's content conveys an IRI associated with the

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java Fri
Sep 29 11:05:08 2006
@@ -170,7 +170,7 @@
    *  of one (horizontal) to one (vertical) and SHOULD be suitable for 
    *  presentation at a small size.
    */
-  IRI getIconElement();
+  IRIElement getIconElement();
   
   /** 
    * RFC4287: The "atom:icon" element's content is an IRI reference 
@@ -179,7 +179,7 @@
    *  of one (horizontal) to one (vertical) and SHOULD be suitable for 
    *  presentation at a small size.
    */
-  void setIconElement(IRI iri);
+  void setIconElement(IRIElement iri);
   
   /** 
    * RFC4287: The "atom:icon" element's content is an IRI reference 
@@ -189,7 +189,7 @@
    *  presentation at a small size.
    * @throws URISyntaxException 
    */
-  IRI setIcon(String iri) throws URISyntaxException;
+  IRIElement setIcon(String iri) throws URISyntaxException;
 
   /** 
    * RFC4287: The "atom:icon" element's content is an IRI reference 
@@ -205,13 +205,13 @@
    * RFC4287: The "atom:id" element conveys a permanent, universally unique
    * identifier for an entry or feed.
    */
-  IRI getIdElement();
+  IRIElement getIdElement();
   
   /**
    * RFC4287: The "atom:id" element conveys a permanent, universally unique
    * identifier for an entry or feed.
    */
-  void setIdElement(IRI id);
+  void setIdElement(IRIElement id);
   
   /**
    * Returns the universally unique identifier for this feed
@@ -223,13 +223,13 @@
    * Sets the universally unique identifier for this feed
    * @throws URISyntaxException 
    */
-  IRI setId(String id) throws URISyntaxException;
+  IRIElement setId(String id) throws URISyntaxException;
   
   /**
    * Sets the universally unique identifier for this feed
    * @throws URISyntaxException 
    */
-  IRI setId(String id, boolean normalize) throws URISyntaxException;
+  IRIElement setId(String id, boolean normalize) throws URISyntaxException;
    
   /**
    * Lists the complete set of links for this entry
@@ -257,14 +257,14 @@
    * that identifies an image that provides visual identification for a feed.
    * The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).
    */
-  IRI getLogoElement();
+  IRIElement getLogoElement();
   
   /**
    * RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] 
    * that identifies an image that provides visual identification for a feed.
    * The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).
    */
-  void setLogoElement(IRI iri);
+  void setLogoElement(IRIElement iri);
   
   /**
    * RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] 
@@ -272,7 +272,7 @@
    * The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).
    * @throws URISyntaxException 
    */
-  IRI setLogo(String iri) throws URISyntaxException;
+  IRIElement setLogo(String iri) throws URISyntaxException;
 
   /**
    * RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
Fri Sep 29 11:05:08 2006
@@ -37,7 +37,7 @@
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Source;
@@ -310,11 +310,11 @@
     return person;
   }
   
-  public IRI getIdElement() {
-    return (IRI)getFirstChildWithName(ID);
+  public IRIElement getIdElement() {
+    return (IRIElement)getFirstChildWithName(ID);
   }
 
-  public void setIdElement(IRI id) {
+  public void setIdElement(IRIElement id) {
     if (id != null)
       _setChild(ID, (OMElement)id);
     else
@@ -322,27 +322,27 @@
   }
 
   public URI getId() throws URISyntaxException {
-    IRI id = getIdElement();
+    IRIElement id = getIdElement();
     return (id != null) ? id.getValue() : null;
   }
   
-  public IRI setId(String value) throws URISyntaxException {
+  public IRIElement setId(String value) throws URISyntaxException {
     return setId(value, false);
   }
   
-  public IRI setId(String value, boolean normalize) throws URISyntaxException {
+  public IRIElement setId(String value, boolean normalize) throws URISyntaxException {
     if (value == null) {
       _removeChildren(ID, false);
       return null;
     }
-    IRI id = getIdElement();
+    IRIElement id = getIdElement();
     if (id != null) {
       if (normalize) id.setNormalizedValue(value);
       else id.setValue(value);
       return id;
     } else {
       FOMFactory fomfactory = (FOMFactory) factory;
-      IRI iri = fomfactory.newID(this);
+      IRIElement iri = fomfactory.newID(this);
       iri.setValue((normalize) ? URIHelper.normalize(value) : value);
       return iri;
     }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Fri Sep 29 11:05:08 2006
@@ -45,7 +45,7 @@
 import org.apache.abdera.model.ExtensibleElement;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Service;
@@ -300,30 +300,30 @@
     return new FOMGenerator((OMContainer)parent,this);
   }
 
-  public IRI newID(
+  public IRIElement newID(
     QName qname,
     OMContainer parent, 
     OMXMLParserWrapper parserWrapper) {
       return new FOMIRI(qname,parent,this,parserWrapper);
   }
   
-  public IRI newID() {
+  public IRIElement newID() {
     return newID(null);
   }
   
-  public IRI newID(
+  public IRIElement newID(
     Element parent) {
       return new FOMIRI(Constants.ID, (OMContainer)parent, this);
   }
 
-  public IRI newURIElement(
+  public IRIElement newURIElement(
     QName qname,
     OMContainer parent,
     OMXMLParserWrapper parserWrapper) {
       return new FOMIRI(qname,parent,this,parserWrapper);
   }
   
-  public IRI newIRIElement(
+  public IRIElement newIRIElement(
     QName qname, 
     Element parent) {
       return new FOMIRI(qname, (OMContainer)parent, this);
@@ -494,27 +494,27 @@
     return newDateTime(Constants.MODIFIED, parent);
   }
 
-  public IRI newIcon() {
+  public IRIElement newIcon() {
     return newIcon(null);
   }
   
-  public IRI newIcon(Element parent) {
+  public IRIElement newIcon(Element parent) {
     return newIRIElement(Constants.ICON, parent);
   }
 
-  public IRI newLogo() {
+  public IRIElement newLogo() {
     return newLogo(null);
   }
   
-  public IRI newLogo(Element parent) {
+  public IRIElement newLogo(Element parent) {
     return newIRIElement(Constants.LOGO, parent);
   }
 
-  public IRI newUri() {
+  public IRIElement newUri() {
     return newUri(null);
   }
   
-  public IRI newUri(Element parent) {
+  public IRIElement newUri(Element parent) {
     return newIRIElement(Constants.URI, parent);
   }
 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
Fri Sep 29 11:05:08 2006
@@ -22,7 +22,7 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.util.URIHelper;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
@@ -32,7 +32,7 @@
 
 public class FOMIRI 
   extends FOMElement 
-  implements IRI {
+  implements IRIElement {
 
   private static final long serialVersionUID = -8434722753544181200L;
 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
Fri Sep 29 11:05:08 2006
@@ -23,7 +23,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.model.Element;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Person;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
@@ -147,21 +147,21 @@
     return (email != null) ? email.getText() : null;
   }
 
-  public IRI getUriElement() {
-    return (IRI)getFirstChildWithName(URI);
+  public IRIElement getUriElement() {
+    return (IRIElement)getFirstChildWithName(URI);
   }
 
-  public void setUriElement(IRI uri) {
+  public void setUriElement(IRIElement uri) {
     if (uri != null) 
       _setChild(URI, (OMElement)uri);
     else 
       _removeChildren(URI, false);
   }
 
-  public IRI setUri(String uri) throws URISyntaxException {
+  public IRIElement setUri(String uri) throws URISyntaxException {
     if (uri != null) {
       FOMFactory fomfactory = (FOMFactory) factory;
-      IRI el = fomfactory.newUri(null);
+      IRIElement el = fomfactory.newUri(null);
       el.setValue(uri);
       _setChild(URI, (OMElement)el);
       return el;
@@ -172,7 +172,7 @@
   }
   
   public URI getUri() throws URISyntaxException {
-    IRI iri = getUriElement();
+    IRIElement iri = getUriElement();
     return (iri != null) ? iri.getValue() : null;
   }
 }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
Fri Sep 29 11:05:08 2006
@@ -33,7 +33,7 @@
 import org.apache.abdera.model.Div;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Generator;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Source;
@@ -190,11 +190,11 @@
     return person;
   }
   
-  public IRI getIdElement() {
-    return (IRI)getFirstChildWithName(ID);
+  public IRIElement getIdElement() {
+    return (IRIElement)getFirstChildWithName(ID);
   }
 
-  public void setIdElement(IRI id) {
+  public void setIdElement(IRIElement id) {
     if (id != null)
       _setChild(ID, (OMElement)id);
     else 
@@ -202,27 +202,27 @@
   }
 
   public URI getId() throws URISyntaxException {
-    IRI id = getIdElement();
+    IRIElement id = getIdElement();
     return (id != null) ? id.getValue() : null;
   }
   
-  public IRI setId(String value) throws URISyntaxException {
+  public IRIElement setId(String value) throws URISyntaxException {
     return setId(value, false);
   }
     
-  public IRI setId(String value, boolean normalize) throws URISyntaxException {
+  public IRIElement setId(String value, boolean normalize) throws URISyntaxException {
     if (value == null) {
       _removeChildren(ID, false);
       return null;
     }
-    IRI id = getIdElement();
+    IRIElement id = getIdElement();
     if (id != null) {
       if (normalize) id.setNormalizedValue(value);
       else id.setValue(value);
       return id;
     } else {
       FOMFactory fomfactory = (FOMFactory) factory;
-      IRI iri = fomfactory.newID(this);
+      IRIElement iri = fomfactory.newID(this);
       iri.setValue((normalize) ? URIHelper.normalize(value) : value);
       return iri;
     }
@@ -464,59 +464,59 @@
     return generator;    
   }
   
-  public IRI getIconElement() {
-    return (IRI)getFirstChildWithName(ICON);
+  public IRIElement getIconElement() {
+    return (IRIElement)getFirstChildWithName(ICON);
   }
 
-  public void setIconElement(IRI iri) {
+  public void setIconElement(IRIElement iri) {
     if (iri != null)
       _setChild(ICON, (OMElement) iri);
     else 
       _removeChildren(ICON, false);
   }
 
-  public IRI setIcon(String value) throws URISyntaxException {
+  public IRIElement setIcon(String value) throws URISyntaxException {
     if (value == null) {
       _removeChildren(ICON, false);
       return null;
     }
     FOMFactory fomfactory = (FOMFactory) factory;
-    IRI iri = fomfactory.newIcon(this);
+    IRIElement iri = fomfactory.newIcon(this);
     iri.setValue(value);
     return iri;
   }
   
   public URI getIcon() throws URISyntaxException {
-    IRI iri = getIconElement();
+    IRIElement iri = getIconElement();
     URI uri = (iri != null) ? iri.getResolvedValue() : null;
     return (URIHelper.isJavascriptUri(uri) ||
         URIHelper.isMailtoUri(uri)) ? null : uri;
   }
 
-  public IRI getLogoElement() {
-    return (IRI)getFirstChildWithName(LOGO);
+  public IRIElement getLogoElement() {
+    return (IRIElement)getFirstChildWithName(LOGO);
   }
 
-  public void setLogoElement(IRI iri) {
+  public void setLogoElement(IRIElement iri) {
     if (iri != null)
       _setChild(LOGO, (OMElement)iri);
     else 
       _removeChildren(LOGO, false);
   }
 
-  public IRI setLogo(String value) throws URISyntaxException {
+  public IRIElement setLogo(String value) throws URISyntaxException {
     if (value == null) {
       _removeChildren(LOGO, false);
       return null;
     }
     FOMFactory fomfactory = (FOMFactory) factory;
-    IRI iri = fomfactory.newLogo(this);
+    IRIElement iri = fomfactory.newLogo(this);
     iri.setValue(value);
     return iri;
   }
   
   public URI getLogo() throws URISyntaxException {
-    IRI iri = getLogoElement();
+    IRIElement iri = getLogoElement();
     URI uri = (iri != null) ? iri.getResolvedValue() : null;
     return (URIHelper.isJavascriptUri(uri) ||
         URIHelper.isMailtoUri(uri)) ? null : uri;

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
(original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
Fri Sep 29 11:05:08 2006
@@ -49,7 +49,7 @@
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Service;
@@ -458,7 +458,7 @@
     text.setValue("a");
     assertEquals(text.getValue(), "a");
     assertEquals(text.getTextType(), Text.Type.HTML);
-    IRI iri = factory.newIcon();
+    IRIElement iri = factory.newIcon();
     assertNotNull(iri);
     iri = factory.newIcon();
     iri.setValue("http://example.org/foo");

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java?view=diff&rev=451368&r1=451367&r2=451368
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
(original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
Fri Sep 29 11:05:08 2006
@@ -39,7 +39,7 @@
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Generator;
-import org.apache.abdera.model.IRI;
+import org.apache.abdera.model.IRIElement;
 import org.apache.abdera.model.Link;
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Source;
@@ -108,7 +108,7 @@
     assertEquals(person.getName(), "John Doe");
     assertNull(person.getEmail());
     assertNull(person.getUri());
-    IRI id = feed.getIdElement();
+    IRIElement id = feed.getIdElement();
     assertNotNull(id);
     assertEquals(id.getValue(), new URI("urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6"));
     List<Entry> entries = feed.getEntries();
@@ -169,7 +169,7 @@
     assertNotNull(feed.getUpdatedElement().getValue());
     assertNotNull(feed.getUpdatedElement().getValue().getDate());
     assertNotNull(feed.getIdElement());
-    assertTrue(feed.getIdElement() instanceof IRI);
+    assertTrue(feed.getIdElement() instanceof IRIElement);
     assertEquals(feed.getIdElement().getValue(), new URI("tag:example.org,2003:3"));
     List<Link> links = feed.getLinks(Link.REL_ALTERNATE);
     assertEquals(links.size(), 1);
@@ -557,7 +557,7 @@
     List<Entry> entries = feed.getEntries();
     assertNotNull(entries);
     for (Entry entry : entries) {
-      IRI id = entry.getIdElement();
+      IRIElement id = entry.getIdElement();
       assertNotNull(id);
       try {
         id.getValue();



Mime
View raw message