abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1374732 - /abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/
Date Sun, 19 Aug 2012 11:24:27 GMT
Author: veithen
Date: Sun Aug 19 11:24:26 2012
New Revision: 1374732

URL: http://svn.apache.org/viewvc?rev=1374732&view=rev
Log:
When creating an element from the builder, only initialize the local name. The namespace will
be set by StAXOMBuilder#processNamespaceData. This should avoid unnecessary creation of OMNamespace
objects.

Modified:
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java Sun
Aug 19 11:24:26 2012
@@ -126,7 +126,7 @@ public class FOMBuilder extends StAXOMBu
         QName qname = parser.getName();
         element = fomfactory.createElement(qname, parent, this);
         if (element == null) {
-            element = new FOMElement(qname, parent, fomfactory, this);
+            element = new FOMElement(qname.getLocalPart(), parent, fomfactory, this);
         }
         return element;
     }

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
Sun Aug 19 11:24:26 2012
@@ -53,8 +53,8 @@ public class FOMCategories extends FOMEx
         init();
     }
 
-    protected FOMCategories(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMCategories(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMCategories(OMContainer parent, OMFactory factory) throws OMException {
@@ -62,10 +62,6 @@ public class FOMCategories extends FOMEx
         init();
     }
 
-    protected FOMCategories(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(CATEGORIES, parent, factory, builder);
-    }
-
     private void init() {
         this.declareNamespace(ATOM_NS, "atom");
     }

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
Sun Aug 19 11:24:26 2012
@@ -22,7 +22,6 @@ import javax.xml.namespace.QName;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Category;
 import org.apache.abdera.model.Element;
-import org.apache.abdera.util.Constants;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
@@ -41,18 +40,14 @@ public class FOMCategory extends FOMExte
         super(qname, parent, factory);
     }
 
-    protected FOMCategory(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMCategory(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMCategory(OMContainer parent, OMFactory factory) {
         super(CATEGORY, parent, factory);
     }
 
-    protected FOMCategory(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
{
-        super(CATEGORY, parent, factory, builder);
-    }
-
     public String getTerm() {
         return getAttributeValue(TERM);
     }

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
Sun Aug 19 11:24:26 2012
@@ -30,7 +30,6 @@ import org.apache.abdera.model.Category;
 import org.apache.abdera.model.Collection;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Text;
-import org.apache.abdera.util.Constants;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
@@ -56,18 +55,14 @@ public class FOMCollection extends FOMEx
         super(qname, parent, factory);
     }
 
-    protected FOMCollection(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMCollection(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMCollection(OMContainer parent, OMFactory factory) {
         super(COLLECTION, parent, factory);
     }
 
-    protected FOMCollection(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
{
-        super(COLLECTION, parent, factory, builder);
-    }
-
     public String getTitle() {
         Text title = this.getFirstChild(TITLE);
         return (title != null) ? title.getValue() : null;

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java Sun
Aug 19 11:24:26 2012
@@ -55,8 +55,8 @@ public class FOMContent extends FOMExten
         init(type);
     }
 
-    protected FOMContent(QName qname, Type type, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMContent(String localName, Type type, OMContainer parent, OMFactory factory,
OMXMLParserWrapper builder) {
+        super(localName, parent, factory, builder);
         init(type);
     }
 
@@ -65,11 +65,6 @@ public class FOMContent extends FOMExten
         init(type);
     }
 
-    protected FOMContent(Type type, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(CONTENT, parent, factory, builder);
-        init(type);
-    }
-
     private void init(Type type) {
         this.type = type;
         if (Type.TEXT.equals(type))

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMControl.java Sun
Aug 19 11:24:26 2012
@@ -39,12 +39,8 @@ public class FOMControl extends FOMExten
         super(qname, parent, factory);
     }
 
-    protected FOMControl(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
-    }
-
-    protected FOMControl(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(CONTROL, parent, factory, builder);
+    protected FOMControl(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMControl(OMContainer parent, OMFactory factory) throws OMException {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
Sun Aug 19 11:24:26 2012
@@ -44,9 +44,9 @@ public class FOMDateTime extends FOMElem
         super(qname, parent, factory);
     }
 
-    protected FOMDateTime(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMDateTime(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
         throws OMException {
-        super(qname, parent, factory, builder);
+        super(localName, parent, factory, builder);
     }
 
     public AtomDate getValue() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java Sun Aug
19 11:24:26 2012
@@ -46,8 +46,8 @@ public class FOMDiv extends FOMExtensibl
         super(qname, parent, factory);
     }
 
-    protected FOMDiv(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) throws OMException {
-        super(qname, parent, factory, builder);
+    protected FOMDiv(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) throws OMException {
+        super(localName, parent, factory, builder);
     }
 
     public String[] getXhtmlClass() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java Sun
Aug 19 11:24:26 2012
@@ -84,9 +84,8 @@ public class FOMElement extends OMElemen
         super(qname.getLocalPart(), getOrCreateNamespace(qname, parent, factory), parent,
factory);
     }
 
-    protected FOMElement(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname.getLocalPart(), factory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix()),
parent,
-              builder, factory);
+    protected FOMElement(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, null, parent, builder, factory);
     }
 
     private static OMNamespace getOrCreateNamespace(QName qname, OMContainer parent, OMFactory
factory) {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java Sun
Aug 19 11:24:26 2012
@@ -73,18 +73,14 @@ public class FOMEntry extends FOMExtensi
         super(qname, parent, factory);
     }
 
-    protected FOMEntry(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMEntry(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMEntry(OMContainer parent, OMFactory factory) throws OMException {
         super(ENTRY, parent, factory);
     }
 
-    protected FOMEntry(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(ENTRY, parent, factory, builder);
-    }
-
     public Person getAuthor() {
         return (Person)getFirstChildWithName(AUTHOR);
     }

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
Sun Aug 19 11:24:26 2012
@@ -48,9 +48,9 @@ public class FOMExtensibleElement extend
         super(qname, parent, factory);
     }
 
-    protected FOMExtensibleElement(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMExtensibleElement(String localName, OMContainer parent, OMFactory factory,
OMXMLParserWrapper builder)
         throws OMException {
-        super(qname, parent, factory, builder);
+        super(localName, parent, factory, builder);
     }
 
     public List<Element> getExtensions() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java Sun
Aug 19 11:24:26 2012
@@ -105,18 +105,10 @@ public class FOMFactory extends OMLinked
         return doc;
     }
 
-    public Service newService(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMService(qname, parent, this, parserWrapper);
-    }
-
     public Service newService(Base parent) {
         return new FOMService((OMContainer)parent, this);
     }
 
-    public Workspace newWorkspace(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMWorkspace(qname, parent, this, parserWrapper);
-    }
-
     public Workspace newWorkspace() {
         return newWorkspace(null);
     }
@@ -125,10 +117,6 @@ public class FOMFactory extends OMLinked
         return new FOMWorkspace((OMContainer)parent, this);
     }
 
-    public Collection newCollection(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMCollection(qname, parent, this, parserWrapper);
-    }
-
     public Collection newCollection() {
         return newCollection(null);
     }
@@ -156,26 +144,14 @@ public class FOMFactory extends OMLinked
         return newService(doc);
     }
 
-    public Feed newFeed(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMFeed(qname, parent, this, parserWrapper);
-    }
-
     public Feed newFeed(Base parent) {
         return new FOMFeed((OMContainer)parent, this);
     }
 
-    public Entry newEntry(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMEntry(qname, parent, this, parserWrapper);
-    }
-
     public Entry newEntry(Base parent) {
         return new FOMEntry((OMContainer)parent, this);
     }
 
-    public Category newCategory(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMCategory(qname, parent, this, parserWrapper);
-    }
-
     public Category newCategory() {
         return newCategory(null);
     }
@@ -184,12 +160,6 @@ public class FOMFactory extends OMLinked
         return new FOMCategory((OMContainer)parent, this);
     }
 
-    public Content newContent(QName qname, Type type, OMContainer parent, OMXMLParserWrapper
parserWrapper) {
-        if (type == null)
-            type = Content.Type.TEXT;
-        return new FOMContent(qname, type, parent, this, parserWrapper);
-    }
-
     public Content newContent() {
         return newContent(Content.Type.TEXT);
     }
@@ -220,18 +190,10 @@ public class FOMFactory extends OMLinked
         return content;
     }
 
-    public DateTime newDateTimeElement(QName qname, OMContainer parent, OMXMLParserWrapper
parserWrapper) {
-        return new FOMDateTime(qname, parent, this, parserWrapper);
-    }
-
     public DateTime newDateTime(QName qname, Element parent) {
         return new FOMDateTime(qname, (OMContainer)parent, this);
     }
 
-    public Generator newGenerator(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMGenerator(qname, parent, this, parserWrapper);
-    }
-
     public Generator newDefaultGenerator() {
         return newDefaultGenerator(null);
     }
@@ -252,10 +214,6 @@ public class FOMFactory extends OMLinked
         return new FOMGenerator((OMContainer)parent, this);
     }
 
-    public IRIElement newID(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMIRI(qname, parent, this, parserWrapper);
-    }
-
     public IRIElement newID() {
         return newID(null);
     }
@@ -264,18 +222,10 @@ public class FOMFactory extends OMLinked
         return new FOMIRI(Constants.ID, (OMContainer)parent, this);
     }
 
-    public IRIElement newURIElement(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMIRI(qname, parent, this, parserWrapper);
-    }
-
     public IRIElement newIRIElement(QName qname, Element parent) {
         return new FOMIRI(qname, (OMContainer)parent, this);
     }
 
-    public Link newLink(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMLink(qname, parent, this, parserWrapper);
-    }
-
     public Link newLink() {
         return newLink(null);
     }
@@ -284,18 +234,10 @@ public class FOMFactory extends OMLinked
         return new FOMLink((OMContainer)parent, this);
     }
 
-    public Person newPerson(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMPerson(qname, parent, this, parserWrapper);
-    }
-
     public Person newPerson(QName qname, Element parent) {
         return new FOMPerson(qname, (OMContainer)parent, this);
     }
 
-    public Source newSource(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMSource(qname, parent, this, parserWrapper);
-    }
-
     public Source newSource() {
         return newSource(null);
     }
@@ -304,12 +246,6 @@ public class FOMFactory extends OMLinked
         return new FOMSource((OMContainer)parent, this);
     }
 
-    public Text newText(QName qname, Text.Type type, OMContainer parent, OMXMLParserWrapper
parserWrapper) {
-        if (type == null)
-            type = Text.Type.TEXT;
-        return new FOMText(type, qname, parent, this, parserWrapper);
-    }
-
     public Text newText(QName qname, Text.Type type) {
         return newText(qname, type, null);
     }
@@ -346,10 +282,6 @@ public class FOMFactory extends OMLinked
         return new FOMControl((OMContainer)parent, this);
     }
 
-    public Control newControl(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMControl(qname, parent, this, parserWrapper);
-    }
-
     public DateTime newPublished() {
         return newPublished(null);
     }
@@ -502,14 +434,6 @@ public class FOMFactory extends OMLinked
         return new FOMDiv(DIV, (OMContainer)parent, this);
     }
 
-    public Div newDiv(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMDiv(qname, parent, this, parserWrapper);
-    }
-
-    public Element newElement(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMExtensibleElement(qname, parent, this, parserWrapper);
-    }
-
     protected OMElement createElement(QName qname, OMContainer parent, OMFactory factory,
Object objecttype) {
         OMElement element = null;
         OMNamespace namespace = this.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
@@ -585,68 +509,78 @@ public class FOMFactory extends OMLinked
     protected OMElement createElement(QName qname, OMContainer parent, FOMBuilder builder)
{
         OMElement element = null;
         if (FEED.equals(qname)) {
-            element = (OMElement)newFeed(qname, parent, builder);
+            element = new FOMFeed(qname.getLocalPart(), parent, this, builder);
         } else if (SERVICE.equals(qname) || PRE_RFC_SERVICE.equals(qname)) {
-            element = (OMElement)newService(qname, parent, builder);
+            element = new FOMService(qname.getLocalPart(), parent, this, builder);
         } else if (ENTRY.equals(qname)) {
-            element = (OMElement)newEntry(qname, parent, builder);
+            element = new FOMEntry(qname.getLocalPart(), parent, this, builder);
         } else if (AUTHOR.equals(qname)) {
-            element = (OMElement)newPerson(qname, parent, builder);
+            element = new FOMPerson(qname.getLocalPart(), parent, this, builder);
         } else if (CATEGORY.equals(qname)) {
-            element = (OMElement)newCategory(qname, parent, builder);
+            element = new FOMCategory(qname.getLocalPart(), parent, this, builder);
         } else if (CONTENT.equals(qname)) {
             Content.Type type = builder.getContentType();
-            element = (OMElement)newContent(qname, type, parent, builder);
+            if (type == null)
+                type = Content.Type.TEXT;
+            element = new FOMContent(qname.getLocalPart(), type, parent, this, builder);
         } else if (CONTRIBUTOR.equals(qname)) {
-            element = (OMElement)newPerson(qname, parent, builder);
+            element = new FOMPerson(qname.getLocalPart(), parent, this, builder);
         } else if (GENERATOR.equals(qname)) {
-            element = (OMElement)newGenerator(qname, parent, builder);
+            element = new FOMGenerator(qname.getLocalPart(), parent, this, builder);
         } else if (ICON.equals(qname)) {
-            element = (OMElement)newURIElement(qname, parent, builder);
+            element = new FOMIRI(qname.getLocalPart(), parent, this, builder);
         } else if (ID.equals(qname)) {
-            element = (OMElement)newID(qname, parent, builder);
+            element = new FOMIRI(qname.getLocalPart(), parent, this, builder);
         } else if (LOGO.equals(qname)) {
-            element = (OMElement)newURIElement(qname, parent, builder);
+            element = new FOMIRI(qname.getLocalPart(), parent, this, builder);
         } else if (LINK.equals(qname)) {
-            element = (OMElement)newLink(qname, parent, builder);
+            element = new FOMLink(qname.getLocalPart(), parent, this, builder);
         } else if (PUBLISHED.equals(qname)) {
-            element = (OMElement)newDateTimeElement(qname, parent, builder);
+            element = new FOMDateTime(qname.getLocalPart(), parent, this, builder);
         } else if (RIGHTS.equals(qname)) {
             Text.Type type = builder.getTextType();
-            element = (OMElement)newText(qname, type, parent, builder);
+            if (type == null)
+                type = Text.Type.TEXT;
+            element = new FOMText(type, qname.getLocalPart(), parent, this, builder);
         } else if (SOURCE.equals(qname)) {
-            element = (OMElement)newSource(qname, parent, builder);
+            element = new FOMSource(qname.getLocalPart(), parent, this, builder);
         } else if (SUBTITLE.equals(qname)) {
             Text.Type type = builder.getTextType();
-            element = (OMElement)newText(qname, type, parent, builder);
+            if (type == null)
+                type = Text.Type.TEXT;
+            element = new FOMText(type, qname.getLocalPart(), parent, this, builder);
         } else if (SUMMARY.equals(qname)) {
             Text.Type type = builder.getTextType();
-            element = (OMElement)newText(qname, type, parent, builder);
+            if (type == null)
+                type = Text.Type.TEXT;
+            element = new FOMText(type, qname.getLocalPart(), parent, this, builder);
         } else if (TITLE.equals(qname)) {
             Text.Type type = builder.getTextType();
-            element = (OMElement)newText(qname, type, parent, builder);
+            if (type == null)
+                type = Text.Type.TEXT;
+            element = new FOMText(type, qname.getLocalPart(), parent, this, builder);
         } else if (UPDATED.equals(qname)) {
-            element = (OMElement)newDateTimeElement(qname, parent, builder);
+            element = new FOMDateTime(qname.getLocalPart(), parent, this, builder);
         } else if (WORKSPACE.equals(qname) || PRE_RFC_WORKSPACE.equals(qname)) {
-            element = (OMElement)newWorkspace(qname, parent, builder);
+            element = new FOMWorkspace(qname.getLocalPart(), parent, this, builder);
         } else if (COLLECTION.equals(qname) || PRE_RFC_COLLECTION.equals(qname)) {
-            element = (OMElement)newCollection(qname, parent, builder);
+            element = new FOMCollection(qname.getLocalPart(), parent, this, builder);
         } else if (NAME.equals(qname)) {
-            element = (OMElement)new FOMElement(qname, parent, this, builder);
+            element = new FOMElement(qname.getLocalPart(), parent, this, builder);
         } else if (EMAIL.equals(qname)) {
-            element = (OMElement)new FOMElement(qname, parent, this, builder);
+            element = new FOMElement(qname.getLocalPart(), parent, this, builder);
         } else if (URI.equals(qname)) {
-            element = (OMElement)newURIElement(qname, parent, builder);
+            element = new FOMIRI(qname.getLocalPart(), parent, this, builder);
         } else if (CONTROL.equals(qname) || PRE_RFC_CONTROL.equals(qname)) {
-            element = (OMElement)newControl(qname, parent, builder);
+            element = new FOMControl(qname.getLocalPart(), parent, this, builder);
         } else if (DIV.equals(qname)) {
-            element = (OMElement)newDiv(qname, parent, builder);
+            element = new FOMDiv(qname.getLocalPart(), parent, this, builder);
         } else if (CATEGORIES.equals(qname) || PRE_RFC_CATEGORIES.equals(qname)) {
-            element = (OMElement)newCategories(qname, parent, builder);
+            element = new FOMCategories(qname.getLocalPart(), parent, this, builder);
         } else if (EDITED.equals(qname) || PRE_RFC_EDITED.equals(qname)) {
-            element = (OMElement)newDateTimeElement(qname, parent, builder);
+            element = new FOMDateTime(qname.getLocalPart(), parent, this, builder);
         } else if (parent instanceof ExtensibleElement || parent instanceof Document) {
-            element = (OMElement)new FOMExtensibleElement(qname, parent, this, builder);
+            element = new FOMExtensibleElement(qname.getLocalPart(), parent, this, builder);
         }
         return element;
     }
@@ -665,10 +599,6 @@ public class FOMFactory extends OMLinked
         return new FOMCategories((OMContainer)parent, this);
     }
 
-    public Categories newCategories(QName qname, OMContainer parent, OMXMLParserWrapper parserWrapper)
{
-        return new FOMCategories(qname, parent, this, parserWrapper);
-    }
-
     public String newUuidUri() {
         return FOMHelper.generateUuid();
     }

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java Sun
Aug 19 11:24:26 2012
@@ -54,18 +54,14 @@ public class FOMFeed extends FOMSource i
         super(qname, parent, factory);
     }
 
-    protected FOMFeed(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMFeed(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMFeed(OMContainer parent, OMFactory factory) throws OMException {
         super(FEED, parent, factory);
     }
 
-    protected FOMFeed(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(FEED, parent, factory, builder);
-    }
-
     public List<Entry> getEntries() {
         return _getChildrenAsSet(ENTRY);
     }

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
Sun Aug 19 11:24:26 2012
@@ -20,9 +20,7 @@ package org.apache.abdera.parser.stax;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.i18n.iri.IRI;
-import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Generator;
-import org.apache.abdera.util.Constants;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
@@ -42,18 +40,14 @@ public class FOMGenerator extends FOMEle
         super(qname, parent, factory);
     }
 
-    protected FOMGenerator(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMGenerator(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMGenerator(OMContainer parent, OMFactory factory) throws OMException {
         super(GENERATOR, parent, factory);
     }
 
-    protected FOMGenerator(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(GENERATOR, parent, factory, builder);
-    }
-
     public IRI getUri() {
         String value = getAttributeValue(AURI);
         return (value != null) ? new IRI(value) : null;

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java Sun Aug
19 11:24:26 2012
@@ -40,8 +40,8 @@ public class FOMIRI extends FOMElement i
         super(qname, parent, factory);
     }
 
-    protected FOMIRI(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) throws OMException {
-        super(qname, parent, factory, builder);
+    protected FOMIRI(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) throws OMException {
+        super(localName, parent, factory, builder);
     }
 
     public IRI getValue() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java Sun
Aug 19 11:24:26 2012
@@ -48,13 +48,9 @@ public class FOMLink extends FOMExtensib
         super(qname, parent, factory);
     }
 
-    protected FOMLink(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(LINK, parent, factory, builder);
-    }
-
-    protected FOMLink(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMLink(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
         throws OMException {
-        super(qname, parent, factory, builder);
+        super(localName, parent, factory, builder);
     }
 
     public IRI getHref() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java
Sun Aug 19 11:24:26 2012
@@ -21,18 +21,14 @@ public class FOMMultipartCollection exte
         super(qname, parent, factory);
     }
 
-    protected FOMMultipartCollection(QName qname, OMContainer parent, OMFactory factory,
OMXMLParserWrapper builder) {
-        super(qname, parent, factory, builder);
+    protected FOMMultipartCollection(String localName, OMContainer parent, OMFactory factory,
OMXMLParserWrapper builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMMultipartCollection(OMContainer parent, OMFactory factory) {
         super(COLLECTION, parent, factory);
     }
 
-    protected FOMMultipartCollection(OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(COLLECTION, parent, factory, builder);
-    }
-
     public boolean acceptsMultipart(String mediaType) {
         Map<String, String> accept = getAcceptMultiparted();
         if (accept.size() == 0)

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java Sun
Aug 19 11:24:26 2012
@@ -42,11 +42,9 @@ public class FOMPerson extends FOMExtens
         super(qname, parent, factory);
     }
 
-    protected FOMPerson(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMPerson(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
         throws OMException {
-        super(qname, parent, factory, builder);
-        setBuilder(builder);
-        done = false;
+        super(localName, parent, factory, builder);
     }
 
     public Element getNameElement() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMService.java Sun
Aug 19 11:24:26 2012
@@ -54,8 +54,8 @@ public class FOMService extends FOMExten
         declareAtomNs();
     }
 
-    protected FOMService(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
-        super(qname, parent, factory, builder);
+    protected FOMService(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder) {
+        super(localName, parent, factory, builder);
     }
 
     protected FOMService(OMContainer parent, OMFactory factory) throws OMException {
@@ -63,10 +63,6 @@ public class FOMService extends FOMExten
         declareAtomNs();
     }
 
-    protected FOMService(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(SERVICE, parent, factory, builder);
-    }
-
     private void declareAtomNs() {
         declareDefaultNamespace(APP_NS);
         declareNamespace(ATOM_NS, "atom");

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java Sun
Aug 19 11:24:26 2012
@@ -61,17 +61,13 @@ public class FOMSource extends FOMExtens
         super(SOURCE, parent, factory);
     }
 
-    protected FOMSource(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(SOURCE, parent, factory, builder);
-    }
-
     protected FOMSource(QName qname, OMContainer parent, OMFactory factory) throws OMException
{
         super(qname, parent, factory);
     }
 
-    protected FOMSource(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMSource(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
         throws OMException {
-        super(qname, parent, factory, builder);
+        super(localName, parent, factory, builder);
     }
 
     public Person getAuthor() {

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java Sun
Aug 19 11:24:26 2012
@@ -49,9 +49,9 @@ public class FOMText extends FOMElement 
         init(type);
     }
 
-    protected FOMText(Type type, QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMText(Type type, String localName, OMContainer parent, OMFactory factory,
OMXMLParserWrapper builder)
         throws OMException {
-        super(qname, parent, factory, builder);
+        super(localName, parent, factory, builder);
         init(type);
     }
 

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java?rev=1374732&r1=1374731&r2=1374732&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
Sun Aug 19 11:24:26 2012
@@ -47,19 +47,15 @@ public class FOMWorkspace extends FOMExt
         super(qname, parent, factory);
     }
 
-    protected FOMWorkspace(QName qname, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
+    protected FOMWorkspace(String localName, OMContainer parent, OMFactory factory, OMXMLParserWrapper
builder)
         throws OMException {
-        super(qname, parent, factory, builder);
+        super(localName, parent, factory, builder);
     }
 
     protected FOMWorkspace(OMContainer parent, OMFactory factory) throws OMException {
         super(WORKSPACE, parent, factory);
     }
 
-    protected FOMWorkspace(OMContainer parent, OMFactory factory, OMXMLParserWrapper builder)
throws OMException {
-        super(WORKSPACE, parent, factory, builder);
-    }
-
     public String getTitle() {
         Text title = this.getFirstChild(TITLE);
         return (title != null) ? title.getValue() : null;



Mime
View raw message