abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r529080 - in /incubator/abdera/java/trunk: client/src/test/java/org/apache/abdera/test/client/app/ core/src/main/java/org/apache/abdera/factory/ core/src/main/java/org/apache/abdera/model/ core/src/main/java/org/apache/abdera/util/ examples...
Date Sun, 15 Apr 2007 22:11:00 GMT
Author: jmsnell
Date: Sun Apr 15 15:10:59 2007
New Revision: 529080

URL: http://svn.apache.org/viewvc?view=rev&rev=529080
Log:
Move EntityTag into the core.
Get the Abdera instance from the factory

Added:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java
      - copied, changed from r521092, incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
Removed:
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
Modified:
    incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
    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/Document.java
    incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractResponseContext.java
    incubator/abdera/java/trunk/server/src/test/java/org/apache/abdera/test/server/UtilityTest.java

Modified: incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
(original)
+++ incubator/abdera/java/trunk/client/src/test/java/org/apache/abdera/test/client/app/AppTest.java
Sun Apr 15 15:10:59 2007
@@ -41,12 +41,12 @@
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.parser.Parser;
 import org.apache.abdera.parser.ParserOptions;
-import org.apache.abdera.protocol.EntityTag;
 import org.apache.abdera.protocol.client.Client;
 import org.apache.abdera.protocol.client.CommonsClient;
 import org.apache.abdera.protocol.client.RequestOptions;
 import org.apache.abdera.protocol.client.ClientResponse;
 import org.apache.abdera.test.client.JettyTest;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.abdera.i18n.iri.IRI;
 

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=529080&r1=529079&r2=529080
==============================================================================
--- 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
Sun Apr 15 15:10:59 2007
@@ -20,6 +20,7 @@
 import javax.activation.MimeType;
 import javax.xml.namespace.QName;
 
+import org.apache.abdera.Abdera;
 import org.apache.abdera.model.Base;
 import org.apache.abdera.model.Categories;
 import org.apache.abdera.model.Category;
@@ -639,4 +640,9 @@
    * Set an element wrapper
    */
   void setElementWrapper(Element element, Element wrapper);
+  
+  /**
+   * Get the Abdera instance for this factory
+   */
+  Abdera getAbdera();
 }

Modified: 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?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java Sun
Apr 15 15:10:59 2007
@@ -25,6 +25,7 @@
 
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.i18n.iri.IRISyntaxException;
+import org.apache.abdera.util.EntityTag;
 
 /**
  * <p>The top level artifact of the Feed Object Model.  The Parser component
@@ -115,4 +116,18 @@
    */
   void addStylesheet(String href, String media);
   
+  /**
+   * Return the entity tag for this document
+   */
+  EntityTag getEntityTag();
+  
+  /**
+   * Set the entity tag for this document
+   */
+  void setEntityTag(EntityTag tag);
+  
+  /**
+   * Set the entity tag for this document
+   */
+  void setEntityTag(String tag);
 }

Copied: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java
(from r521092, incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java)
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java?view=diff&rev=529080&p1=incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java&r1=521092&p2=incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java Sun
Apr 15 15:10:59 2007
@@ -15,7 +15,7 @@
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */
-package org.apache.abdera.protocol;
+package org.apache.abdera.util;
 
 import java.io.Serializable;
 import java.util.ArrayList;

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
(original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/appserver/SimpleProvider.java
Sun Apr 15 15:10:59 2007
@@ -33,7 +33,6 @@
 import org.apache.abdera.model.Workspace;
 import org.apache.abdera.parser.ParseException;
 import org.apache.abdera.parser.Parser;
-import org.apache.abdera.protocol.EntityTag;
 import org.apache.abdera.protocol.server.provider.AbstractResponseContext;
 import org.apache.abdera.protocol.server.provider.BaseResponseContext;
 import org.apache.abdera.protocol.server.provider.EmptyResponseContext;
@@ -41,6 +40,7 @@
 import org.apache.abdera.protocol.server.provider.RequestContext;
 import org.apache.abdera.protocol.server.provider.ResponseContext;
 import org.apache.abdera.protocol.server.provider.TargetType;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.axiom.om.util.Base64;

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
Sun Apr 15 15:10:59 2007
@@ -31,6 +31,7 @@
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.ElementWrapper;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.i18n.iri.IRISyntaxException;
 import org.apache.axiom.om.OMComment;
@@ -55,6 +56,7 @@
   protected IRI base = null;
   protected MimeType contentType = null;
   protected Date lastModified = null;
+  protected EntityTag etag = null;
 
   public FOMDocument() {
     super();
@@ -219,6 +221,18 @@
     } else {
       this.addChild(comment);
     }
+  }
+
+  public EntityTag getEntityTag() {
+    return etag;
+  }
+
+  public void setEntityTag(EntityTag tag) {
+    this.etag = tag;
+  }
+
+  public void setEntityTag(String tag) {
+    this.etag = new EntityTag(tag);
   }
   
 }

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=529080&r1=529079&r2=529080
==============================================================================
--- 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
Sun Apr 15 15:10:59 2007
@@ -68,6 +68,7 @@
   implements Factory, Constants, ExtensionFactory {
 
   private final ExtensionFactoryMap factoriesMap;
+  private final Abdera abdera;
   
   public FOMFactory() {
     this(new Abdera());
@@ -80,6 +81,7 @@
       (f != null) ? 
         new ArrayList<ExtensionFactory>(f) :
         new ArrayList<ExtensionFactory>());
+    this.abdera = abdera;
   }
   
   public Parser newParser() {
@@ -822,4 +824,7 @@
     return factoriesMap.handlesNamespace(namespace);
   }
 
+  public Abdera getAbdera() {
+    return abdera;
+  }
 }

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
Sun Apr 15 15:10:59 2007
@@ -25,6 +25,7 @@
 import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.protocol.util.ProtocolConstants;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.i18n.iri.IRISyntaxException;
 

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
Sun Apr 15 15:10:59 2007
@@ -22,8 +22,8 @@
 import javax.activation.MimeType;
 import javax.activation.MimeTypeParseException;
 
-import org.apache.abdera.protocol.EntityTag;
 import org.apache.abdera.protocol.Response;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.i18n.iri.IRISyntaxException;
 

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractResponseContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractResponseContext.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractResponseContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractResponseContext.java
Sun Apr 15 15:10:59 2007
@@ -23,10 +23,10 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.abdera.protocol.EntityTag;
 import org.apache.abdera.protocol.server.provider.ResponseContext;
 import org.apache.abdera.protocol.util.AbstractResponse;
 import org.apache.abdera.protocol.util.EncodingUtil;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.writer.Writer;
 
 public abstract class AbstractResponseContext

Modified: incubator/abdera/java/trunk/server/src/test/java/org/apache/abdera/test/server/UtilityTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/test/java/org/apache/abdera/test/server/UtilityTest.java?view=diff&rev=529080&r1=529079&r2=529080
==============================================================================
--- incubator/abdera/java/trunk/server/src/test/java/org/apache/abdera/test/server/UtilityTest.java
(original)
+++ incubator/abdera/java/trunk/server/src/test/java/org/apache/abdera/test/server/UtilityTest.java
Sun Apr 15 15:10:59 2007
@@ -25,7 +25,6 @@
 import java.util.HashMap;
 import java.util.List;
 
-import org.apache.abdera.protocol.EntityTag;
 import org.apache.abdera.protocol.server.ServiceManager;
 import org.apache.abdera.protocol.server.provider.AbstractRequestContext;
 import org.apache.abdera.protocol.server.provider.Target;
@@ -33,6 +32,7 @@
 import org.apache.abdera.protocol.server.util.RegexTargetResolver;
 import org.apache.abdera.protocol.server.util.SimpleSubjectResolver;
 import org.apache.abdera.protocol.util.EncodingUtil;
+import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.i18n.iri.IRI;
 
 import junit.framework.TestCase;



Mime
View raw message