abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r567888 [1/4] - in /incubator/abdera/java/trunk: ./ build/ extensions/ extensions/gdata/ extensions/gdata/src/ extensions/gdata/src/main/ extensions/gdata/src/main/java/ extensions/gdata/src/main/java/org/ extensions/gdata/src/main/java/org...
Date Tue, 21 Aug 2007 00:51:29 GMT
Author: jmsnell
Date: Mon Aug 20 17:51:20 2007
New Revision: 567888

URL: http://svn.apache.org/viewvc?rev=567888&view=rev
Log:
Separate extensions into separate individual components.  All extensions that are based on IETF I-D's 
or RFC's are grouped into the extensions/main, all others are separate.  The build will produce 
individual jars for each extension module.

Added:
    incubator/abdera/java/trunk/extensions/gdata/
    incubator/abdera/java/trunk/extensions/gdata/pom.xml
    incubator/abdera/java/trunk/extensions/gdata/src/
    incubator/abdera/java/trunk/extensions/gdata/src/main/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthCredentials.java
    incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthScheme.java
    incubator/abdera/java/trunk/extensions/gdata/src/main/resources/
    incubator/abdera/java/trunk/extensions/gdata/src/test/
    incubator/abdera/java/trunk/extensions/gdata/src/test/java/
    incubator/abdera/java/trunk/extensions/gdata/src/test/resources/
    incubator/abdera/java/trunk/extensions/geo/
    incubator/abdera/java/trunk/extensions/geo/pom.xml
    incubator/abdera/java/trunk/extensions/geo/src/
    incubator/abdera/java/trunk/extensions/geo/src/main/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Box.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinate.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinates.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/GeoHelper.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Line.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Multiple.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Point.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Polygon.java
    incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Position.java
    incubator/abdera/java/trunk/extensions/geo/src/main/resources/
    incubator/abdera/java/trunk/extensions/geo/src/test/
    incubator/abdera/java/trunk/extensions/geo/src/test/java/
    incubator/abdera/java/trunk/extensions/geo/src/test/resources/
    incubator/abdera/java/trunk/extensions/json/
    incubator/abdera/java/trunk/extensions/json/pom.xml
    incubator/abdera/java/trunk/extensions/json/src/
    incubator/abdera/java/trunk/extensions/json/src/main/
    incubator/abdera/java/trunk/extensions/json/src/main/java/
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONWriter.java
    incubator/abdera/java/trunk/extensions/json/src/main/resources/
    incubator/abdera/java/trunk/extensions/json/src/main/resources/META-INF/
    incubator/abdera/java/trunk/extensions/json/src/main/resources/META-INF/services/
    incubator/abdera/java/trunk/extensions/json/src/main/resources/META-INF/services/org.apache.abdera.writer.NamedWriter
    incubator/abdera/java/trunk/extensions/json/src/test/
    incubator/abdera/java/trunk/extensions/json/src/test/java/
    incubator/abdera/java/trunk/extensions/json/src/test/resources/
    incubator/abdera/java/trunk/extensions/main/
    incubator/abdera/java/trunk/extensions/main/pom.xml
    incubator/abdera/java/trunk/extensions/main/src/
    incubator/abdera/java/trunk/extensions/main/src/main/
    incubator/abdera/java/trunk/extensions/main/src/main/java/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/bidi/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/bidi/BidiHelper.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/AbstractSelector.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/AcceptSelector.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/Feature.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/FeatureSelector.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/FeaturesExtensionFactory.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/FeaturesHelper.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/Selector.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/features/XPathSelector.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/history/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/history/FeedPagingHelper.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/license/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/license/LicenseHelper.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/thread/
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/thread/ThreadConstants.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/thread/ThreadExtensionFactory.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/thread/ThreadHelper.java
    incubator/abdera/java/trunk/extensions/main/src/main/java/org/apache/abdera/ext/thread/Total.java
    incubator/abdera/java/trunk/extensions/main/src/main/resources/
    incubator/abdera/java/trunk/extensions/main/src/main/resources/META-INF/
    incubator/abdera/java/trunk/extensions/main/src/main/resources/META-INF/services/
    incubator/abdera/java/trunk/extensions/main/src/main/resources/META-INF/services/org.apache.abdera.factory.ExtensionFactory
    incubator/abdera/java/trunk/extensions/main/src/test/
    incubator/abdera/java/trunk/extensions/main/src/test/java/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/features/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/features/FeatureTest.java
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/LicenseTest.java
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/main/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/main/TestSuite.java
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/
    incubator/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
    incubator/abdera/java/trunk/extensions/main/src/test/resources/
    incubator/abdera/java/trunk/extensions/media/
    incubator/abdera/java/trunk/extensions/media/pom.xml
    incubator/abdera/java/trunk/extensions/media/src/
    incubator/abdera/java/trunk/extensions/media/src/main/
    incubator/abdera/java/trunk/extensions/media/src/main/java/
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaAdult.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaCategory.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaConstants.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaContent.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaCopyright.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaCredit.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaDescription.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaExtensionFactory.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaGroup.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaHash.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaKeywords.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaPlayer.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaRating.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaRestriction.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaText.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaThumbnail.java
    incubator/abdera/java/trunk/extensions/media/src/main/java/org/apache/abdera/ext/media/MediaTitle.java
    incubator/abdera/java/trunk/extensions/media/src/main/resources/
    incubator/abdera/java/trunk/extensions/media/src/main/resources/META-INF/
    incubator/abdera/java/trunk/extensions/media/src/main/resources/META-INF/services/
    incubator/abdera/java/trunk/extensions/media/src/main/resources/META-INF/services/org.apache.abdera.factory.ExtensionFactory
    incubator/abdera/java/trunk/extensions/media/src/test/
    incubator/abdera/java/trunk/extensions/media/src/test/java/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/MediaTest.java
    incubator/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/TestSuite.java
    incubator/abdera/java/trunk/extensions/media/src/test/resources/
    incubator/abdera/java/trunk/extensions/opensearch/
    incubator/abdera/java/trunk/extensions/opensearch/pom.xml
    incubator/abdera/java/trunk/extensions/opensearch/src/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/IntegerElement.java
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/OpenSearchConstants.java
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/OpenSearchExtensionFactory.java
    incubator/abdera/java/trunk/extensions/opensearch/src/main/java/org/apache/abdera/ext/opensearch/Query.java
    incubator/abdera/java/trunk/extensions/opensearch/src/main/resources/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/resources/META-INF/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/resources/META-INF/services/
    incubator/abdera/java/trunk/extensions/opensearch/src/main/resources/META-INF/services/org.apache.abdera.factory.ExtensionFactory
    incubator/abdera/java/trunk/extensions/opensearch/src/test/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/OpenSearchTest.java
    incubator/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/TestSuite.java
    incubator/abdera/java/trunk/extensions/opensearch/src/test/resources/
    incubator/abdera/java/trunk/extensions/opensearch/src/test/resources/opensearch.xml
    incubator/abdera/java/trunk/extensions/sharing/
    incubator/abdera/java/trunk/extensions/sharing/pom.xml
    incubator/abdera/java/trunk/extensions/sharing/src/
    incubator/abdera/java/trunk/extensions/sharing/src/main/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/Conflicts.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/History.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/Related.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/Sharing.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/SharingExtensionFactory.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/SharingHelper.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/Sync.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/java/org/apache/abdera/ext/sharing/Unpublished.java
    incubator/abdera/java/trunk/extensions/sharing/src/main/resources/
    incubator/abdera/java/trunk/extensions/sharing/src/main/resources/META-INF/
    incubator/abdera/java/trunk/extensions/sharing/src/main/resources/META-INF/services/
    incubator/abdera/java/trunk/extensions/sharing/src/main/resources/META-INF/services/org.apache.abdera.factory.ExtensionFactory
    incubator/abdera/java/trunk/extensions/sharing/src/test/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/SharingTest.java
    incubator/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/TestSuite.java
    incubator/abdera/java/trunk/extensions/sharing/src/test/resources/
    incubator/abdera/java/trunk/extensions/wsse/
    incubator/abdera/java/trunk/extensions/wsse/src/
    incubator/abdera/java/trunk/extensions/wsse/src/main/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/org/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/org/apache/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/org/apache/abdera/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/org/apache/abdera/ext/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/org/apache/abdera/ext/wsse/
    incubator/abdera/java/trunk/extensions/wsse/src/main/java/org/apache/abdera/ext/wsse/WSSEAuthScheme.java
    incubator/abdera/java/trunk/extensions/wsse/src/main/resources/
    incubator/abdera/java/trunk/extensions/wsse/src/test/
    incubator/abdera/java/trunk/extensions/wsse/src/test/java/
    incubator/abdera/java/trunk/extensions/wsse/src/test/resources/
Removed:
    incubator/abdera/java/trunk/extensions/pom.xml
    incubator/abdera/java/trunk/extensions/src/
Modified:
    incubator/abdera/java/trunk/build/build.xml
    incubator/abdera/java/trunk/pom.xml

Modified: incubator/abdera/java/trunk/build/build.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/build/build.xml?rev=567888&r1=567887&r2=567888&view=diff
==============================================================================
--- incubator/abdera/java/trunk/build/build.xml (original)
+++ incubator/abdera/java/trunk/build/build.xml Mon Aug 20 17:51:20 2007
@@ -56,13 +56,6 @@
   <property name="parser.test.resources" value="${parser}/src/test/resources" />
   <property name="parser.work" value="${work}/parser" />
   <property name="parser.jar" value="${dist}/${ant.project.name}.parser.${version}.jar" />
-  <property name="extensions" value="${basedir}/extensions" />
-  <property name="extensions.src" value="${extensions}/src/main/java" />
-  <property name="extensions.resources" value="${extensions}/src/main/resources" />
-  <property name="extensions.work" value="${work}/extensions" />
-  <property name="extensions.test.java" value="${extensions}/src/test/java" />
-  <property name="extensions.test.resources" value="${extensions}/src/test/resources" />
-  <property name="extensions.jar" value="${dist}/${ant.project.name}.extensions.${version}.jar" />
   <property name="server" value="${basedir}/server" />
   <property name="server.src" value="${server}/src/main/java" />
   <property name="server.work" value="${work}/server" />
@@ -85,6 +78,20 @@
   <property name="client.work" value="${work}/client" />
   <property name="client.test.java" value="${client}/src/test/java" />
   <property name="client.jar" value="${dist}/${ant.project.name}.client.${version}.jar" />
+  
+ 
+  <property name="extensions" value="${basedir}/extensions" />
+  <property name="extensions.work" value="${work}/extensions" />
+  <property name="extensions.jar.base" value="${dist}/ext/${ant.project.name}.extensions" />
+  
+  <!--
+  <property name="extensions.src" value="${extensions}/src/main/java" />
+  <property name="extensions.resources" value="${extensions}/src/main/resources" />
+  <property name="extensions.test.java" value="${extensions}/src/test/java" />
+  <property name="extensions.test.resources" value="${extensions}/src/test/resources" />
+  <property name="extensions.jar" value="${dist}/${ant.project.name}.extensions.${version}.jar" />
+  -->
+  
   <property name="examples" value="${basedir}/examples" />
   <property name="examples.work" value="${work}/examples" />
   <property name="examples.src" value="${examples}/src/main/java" />
@@ -273,25 +280,6 @@
     </copy>
   </target>
 
-  <target name="compile.extensions" depends="init, compile.core, compile.parser, compile.dependencies, compile.client">
-    <mkdir dir="${extensions.work}" />
-    <javac srcdir="${extensions.src}" destdir="${extensions.work}" classpathref="jar.dependencies" classpath="${core.work};${parser.work};${client.work};${protocol.work}" debug="${debug}" />
-    <javac srcdir="${extensions.test.java}" destdir="${test}" classpathref="jar.dependencies" classpath="${core.work};${parser.work};${extensions.work};${client.work};${protocol.work}" debug="${debug}" />
-    <mkdir dir="${extensions.work}/META-INF" />
-    <copy todir="${extensions.work}/META-INF">
-      <fileset dir="${basedir}">
-        <include name="LICENSE" />
-        <include name="NOTICE" />
-      </fileset>
-    </copy>
-    <copy todir="${extensions.work}">
-      <fileset dir="${extensions.resources}" includes="**/*" />
-    </copy>
-    <copy todir="${test}">
-      <fileset dir="${extensions.test.resources}" includes="**/*" />
-    </copy>
-  </target>
-
   <target name="compile.server" depends="init, compile.core, compile.protocol">
     <mkdir dir="${server.work}" />
     <javac srcdir="${server.src}" destdir="${server.work}" classpathref="jar.dependencies" classpath="${core.work};${protocol.work}" debug="${debug}" />
@@ -357,7 +345,8 @@
   <target name="compile.examples" depends="init,compile.core,compile.parser,compile.protocol,compile.server,compile.extensions,compile.security">
     <echo>Make sure the example code compiles...</echo>
     <mkdir dir="${examples.work}" />
-    <javac srcdir="${examples.src}" destdir="${examples.work}" classpathref="jar.dependencies" classpath="${core.work};${parser.work};${protocol.work};${client.work};${server.work};${extensions.work};${security.work}" debug="${debug}">
+    <javac srcdir="${examples.src}" destdir="${examples.work}" classpathref="jar.dependencies" 
+      classpath="${core.work};${parser.work};${protocol.work};${client.work};${server.work};${extensions.work}/gdata;${security.work}" debug="${debug}">
       <exclude unless="do.security" name="**/security/*.java" />
     </javac>
     <delete dir="${examples.work}" />
@@ -367,7 +356,16 @@
   </target>
 
   <target name="docs" depends="init">
-    <javadoc packagenames="org.apache.abdera.*" excludepackagenames="org.apache.abdera.util,org.apache.abdera.parser.**,org.apache.abdera.security.**" sourcepath="${core.src}:${extensions.src}:${security.src}:${server.src}:${parser.src}:${client.src}:${protocol.src}:${spring.src}" destdir="${javadocs}" windowtitle="Abdera" classpathref="jar.dependencies" />
+    <path id="ext.path">
+      <fileset dir="${extensions}" includes="**/src/main/java" />
+    </path>
+    <javadoc 
+      packagenames="org.apache.abdera.*" 
+      sourcepath="${core.src}:${security.src}:${server.src}:${client.src}:${protocol.src}:${spring.src}" 
+      sourcepathref="ext.path" 
+      destdir="${javadocs}" 
+      windowtitle="Abdera" 
+      classpathref="jar.dependencies" />
     <replaceregexp match="Generated by javadoc (.*) on (.*) --" replace="Generated by javadoc --" flags="g" byline="true">
       <fileset dir="${javadocs}" includes="**/*.html" />
     </replaceregexp>
@@ -386,9 +384,8 @@
     <echo>Running Client Tests...</echo>
     <java classpathref="jar.dependencies" classpath="${core.work}:${parser.work}:${server.work}:${client.work}:${protocol.work}:${test}" classname="org.apache.abdera.test.client.TestSuite" fork="yes" />
 
-    <echo>Running Extension Tests...</echo>
-    <java classpathref="jar.dependencies" classpath="${core.work}:${parser.work}:${server.work}:${extensions.work}:${test}" classname="org.apache.abdera.test.ext.TestSuite" fork="yes" />
-
+    <antcall target="test.extensions" />
+    
     <antcall target="test.security" />
 
   </target>
@@ -420,8 +417,8 @@
     <jar destfile="${parser.jar}" basedir="${parser.work}" manifest="${work}/MANIFEST.MF" />
     <jar destfile="${protocol.jar}" basedir="${protocol.work}" manifest="${work}/MANIFEST.MF" />
     <jar destfile="${server.jar}" basedir="${server.work}" manifest="${work}/MANIFEST.MF" />
-    <jar destfile="${extensions.jar}" basedir="${extensions.work}" manifest="${work}/MANIFEST.MF" />
     <jar destfile="${client.jar}" basedir="${client.work}" manifest="${work}/MANIFEST.MF" />
+    <antcall target="dist.extensions" />
     <antcall target="dist.security" />
     <antcall target="dist.spring" />
     <copy todir="${dist_lib}">
@@ -647,5 +644,151 @@
     <exec failifexecutionfails="false" dir="${parser.test.resources}/feedvalidator.org" executable="svn">
       <arg line="co https://svn.sourceforge.net/svnroot/feedvalidator/trunk/feedvalidator/testcases/atom testcases/atom" />
     </exec>
+  </target>
+  
+  
+  <target name="compile.extensions" depends="init, compile.core, compile.parser, compile.dependencies, compile.client">
+    <mkdir dir="${extensions.work}" />
+    
+    <antcall target="compile.extension">
+      <param name="ext" value="main" />
+    </antcall>
+
+    <antcall target="compile.extension">
+      <param name="ext" value="gdata" />
+    </antcall>
+
+    <antcall target="compile.extension">
+      <param name="ext" value="geo" />
+    </antcall>
+
+    <antcall target="compile.extension">
+      <param name="ext" value="json" />
+    </antcall>
+
+    <antcall target="compile.extension">
+      <param name="ext" value="media" />
+    </antcall>
+
+    <antcall target="compile.extension">
+      <param name="ext" value="opensearch" />
+    </antcall>
+
+    <antcall target="compile.extension">
+      <param name="ext" value="sharing" />
+    </antcall>
+    
+    <antcall target="compile.extension">
+      <param name="ext" value="wsse" />
+    </antcall>
+
+  </target>
+  
+  <target name="compile.extension">
+    <echo>Compiling extension ${ext}...</echo>
+    <mkdir dir="${extensions.work}/${ext}" />
+    <mkdir dir="${extensions.work}/${ext}/META-INF" />
+    <javac srcdir="${extensions}/${ext}/src/main/java" destdir="${extensions.work}/${ext}" classpathref="jar.dependencies" classpath="${core.work};${parser.work};${client.work};${protocol.work}" debug="${debug}" />
+    <javac srcdir="${extensions}/${ext}/src/test/java" destdir="${test}" classpathref="jar.dependencies" classpath="${core.work};${parser.work};${extensions.work}/${ext};${client.work};${protocol.work}" debug="${debug}" />
+    <copy todir="${extensions.work}/${ext}/META-INF">
+      <fileset dir="${basedir}">
+        <include name="LICENSE" />
+        <include name="NOTICE" />
+      </fileset>
+    </copy>
+    <copy todir="${extensions.work}/${ext}">
+      <fileset dir="${extensions}/${ext}/src/main/resources" includes="**/*" />
+    </copy>
+    <copy todir="${test}">
+      <fileset dir="${extensions}/${ext}/src/test/resources" includes="**/*" />
+    </copy>
+  </target>
+  
+  <target name="dist.extensions">
+    <mkdir dir="${dist}/ext" />
+
+    <antcall target="dist.extension">
+      <param name="ext" value="main" />
+    </antcall>
+
+    <antcall target="dist.extension">
+      <param name="ext" value="gdata" />
+    </antcall>
+
+    <antcall target="dist.extension">
+      <param name="ext" value="geo" />
+    </antcall>
+
+    <antcall target="dist.extension">
+      <param name="ext" value="json" />
+    </antcall>
+
+    <antcall target="dist.extension">
+      <param name="ext" value="media" />
+    </antcall>
+
+    <antcall target="dist.extension">
+      <param name="ext" value="opensearch" />
+    </antcall>
+
+    <antcall target="dist.extension">
+      <param name="ext" value="sharing" />
+    </antcall>
+    
+    <antcall target="dist.extension">
+      <param name="ext" value="wsse" />
+    </antcall>
+    
+  </target>
+  
+  <target name="dist.extension">
+    <echo>Building jar for extension ${ext}...</echo>
+    <jar destfile="${extensions.jar.base}.${ext}.${version}.jar"
+         basedir="${extensions.work}/${ext}"
+         manifest="${work}/MANIFEST.MF" />
+  </target>
+  
+  <target name="test.extensions">
+    
+    <antcall target="test.extension">
+      <param name="ext" value="main" />
+    </antcall>
+
+    <antcall target="test.extension">
+      <param name="ext" value="gdata" />
+    </antcall>
+
+    <antcall target="test.extension">
+      <param name="ext" value="geo" />
+    </antcall>
+
+    <antcall target="test.extension">
+      <param name="ext" value="json" />
+    </antcall>
+
+    <antcall target="test.extension">
+      <param name="ext" value="media" />
+    </antcall>
+
+    <antcall target="test.extension">
+      <param name="ext" value="opensearch" />
+    </antcall>
+
+    <antcall target="test.extension">
+      <param name="ext" value="sharing" />
+    </antcall>
+    
+    <antcall target="test.extension">
+      <param name="ext" value="wsse" />
+    </antcall>
+    
+  </target>
+  
+  <target name="test.extension">
+    <echo>Running tests for extension ${ext}...</echo>
+    <java 
+      classpathref="jar.dependencies" 
+      classpath="${core.work}:${parser.work}:${server.work}:${extensions.work}/${ext}:${test}" 
+      classname="org.apache.abdera.test.ext.${ext}.TestSuite" fork="yes" failonerror="false"/>
   </target>
 </project>

Added: incubator/abdera/java/trunk/extensions/gdata/pom.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/gdata/pom.xml?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/gdata/pom.xml (added)
+++ incubator/abdera/java/trunk/extensions/gdata/pom.xml Mon Aug 20 17:51:20 2007
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. -->
+<project 
+  xmlns="http://maven.apache.org/POM/4.0.0" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.abdera</groupId>
+    <artifactId>abdera</artifactId>
+    <version>0.3.0-incubating-SNAPSHOT</version>
+  </parent>  
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>abdera-extensions-gdata</artifactId>
+  <packaging>jar</packaging>
+  <name>Abdera Extensions - GData</name>
+  <version>0.3.0-incubating-SNAPSHOT</version>
+  <description>Atom Specification Extensions - GData</description>
+  <inceptionYear>2006</inceptionYear>
+  <url>http://incubator.apache.org/abdera</url>
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/abdera/java/trunk/extensions/gdata</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/abdera/java/trunk/extensions/gdata</developerConnection>
+    <url>http://svn.apache.org/repos/asf/incubator/abdera/java/trunk/extensions/gdata</url>
+  </scm>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-core</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>    
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-parser</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>   
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-protocol</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-client</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>json</artifactId>
+      <version>1.0</version>
+      <scope>compile</scope>
+    </dependency>   
+    <dependency>
+      <groupId>org.apache.ws.commons.axiom</groupId>
+      <artifactId>axiom-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ws.commons.axiom</groupId>
+      <artifactId>axiom-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>stax</groupId>
+      <artifactId>stax-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.woodstox</groupId>
+      <artifactId>wstx-asl</artifactId>
+    </dependency> 
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+  </dependencies>
+</project>

Added: incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthCredentials.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthCredentials.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthCredentials.java (added)
+++ incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthCredentials.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,67 @@
+/*
+* 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.ext.gdata;
+
+import org.apache.commons.httpclient.Credentials;
+
+/**
+ * <p>When using the GoogleLoginAuthScheme with the typical Commons AbderaClient
+ * UsernamePasswordCredentials, the AuthScheme implementation will request
+ * a new auth token from the Google server for every request.  To make it 
+ * a more efficient, clients can use GoogleLoginAuthCredentials which will
+ * perform the Google Auth once to get the auth token which will be reused
+ * for every request.</p>
+ * 
+ * <pre>
+ *    GoogleLoginAuthScheme.register();
+ *   
+ *   AbderaClient client = new CommonsClient();
+ *   
+ *   GoogleLoginAuthCredentials credentials = 
+ *     new GoogleLoginAuthCredentials(
+ *       "email", "password", "blogger");
+ *   client.addCredentials(
+ *     "http://beta.blogger.com",
+ *     null, null,
+ *     credentials);
+ *  </pre>
+ */
+public final class GoogleLoginAuthCredentials 
+  implements Credentials {
+
+  private final String auth;
+  private final String service;
+  
+  public GoogleLoginAuthCredentials(String auth) {
+    this.auth = auth;
+    this.service = null;
+  }
+  
+  public GoogleLoginAuthCredentials(String id, String pwd, String service) {
+    this.auth = (new GoogleLoginAuthScheme()).getAuth(id, pwd, service);
+    this.service = service;
+  }
+  
+  public String getAuth() {
+    return auth;
+  }
+  
+  public String getService() {
+    return service;
+  }
+}

Added: incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthScheme.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthScheme.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthScheme.java (added)
+++ incubator/abdera/java/trunk/extensions/gdata/src/main/java/org/apache/abdera/ext/gdata/GoogleLoginAuthScheme.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,159 @@
+/*
+* 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.ext.gdata;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.Formatter;
+
+import org.apache.abdera.protocol.client.AbderaClient;
+import org.apache.abdera.protocol.client.ClientResponse;
+import org.apache.abdera.protocol.client.RequestOptions;
+import org.apache.abdera.util.Version;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScheme;
+import org.apache.commons.httpclient.auth.AuthenticationException;
+import org.apache.commons.httpclient.auth.MalformedChallengeException;
+import org.apache.commons.httpclient.auth.RFC2617Scheme;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+
+/**
+ * <p>Implements the GoogleLogin auth scheme used by gdata (Blogger, Google Calendar, etc).
+ * Warning: this scheme is slow!</p>
+ * 
+ * <pre>
+ *   GoogleLoginAuthScheme.register();
+ *   
+ *   AbderaClient client = new CommonsClient();
+ *   client.addCredentials(
+ *     "http://beta.blogger.com", 
+ *     null, "GoogleLogin", 
+ *     new UsernamePasswordCredentials(
+ *       "email","password"));
+ * </pre>
+ */
+public class GoogleLoginAuthScheme
+  extends RFC2617Scheme
+  implements AuthScheme {
+  
+  public static void register(AbderaClient abderaClient, boolean exclusive) {
+    AbderaClient.registerScheme("GoogleLogin", GoogleLoginAuthScheme.class);
+    if (exclusive)
+      ((AbderaClient)abderaClient).setAuthenticationSchemePriority("GoogleLogin");
+    else
+      ((AbderaClient)abderaClient).setAuthenticationSchemeDefaults();
+  }
+  
+  private String service = null;
+  
+  @Override
+  public void processChallenge(
+    String challenge) 
+      throws MalformedChallengeException {
+    super.processChallenge(challenge);
+    service = getParameter("service");
+  }
+  
+  public String authenticate(
+    Credentials credentials, 
+    HttpMethod method) 
+      throws AuthenticationException {
+    String auth = null;
+    if (credentials instanceof UsernamePasswordCredentials) {
+      UsernamePasswordCredentials usercreds = 
+        (UsernamePasswordCredentials) credentials;
+      String id = usercreds.getUserName();
+      String pwd = usercreds.getPassword();
+      auth = getAuth(id, pwd);
+    } else if (credentials instanceof GoogleLoginAuthCredentials) {
+      GoogleLoginAuthCredentials gcreds =
+        (GoogleLoginAuthCredentials) credentials;
+      service = gcreds.getService();
+      auth = gcreds.getAuth();
+    } else {
+      throw new AuthenticationException(
+      "Cannot use credentials for GoogleLogin authentication");
+    }
+    StringBuffer buf = new StringBuffer("GoogleLogin ");
+    buf.append(auth);
+    return buf.toString();
+  }
+  
+  public String authenticate(
+    Credentials credentials, 
+    String method, 
+    String uri) 
+      throws AuthenticationException {
+    return authenticate(credentials, null);
+  }
+  
+  public String getSchemeName() {
+    return "GoogleLogin";
+  }
+  
+  public boolean isComplete() {
+    return true;
+  }
+  
+  public boolean isConnectionBased() {
+    return false;
+  }
+  
+  
+  protected String getAuth(String id, String pwd) {
+    return getAuth(id, pwd, service);
+  }
+  
+  protected String getAuth(String id, String pwd, String service) {
+    try {
+      AbderaClient abderaClient = new AbderaClient();
+      Formatter f = new Formatter();
+      f.format(
+        "Email=%s&Passwd=%s&service=%s&source=%s",
+        URLEncoder.encode(id, "utf-8"),
+        URLEncoder.encode(pwd, "utf-8"),
+        (service != null) ? URLEncoder.encode(service, "utf-8") : "",
+        URLEncoder.encode(Version.APP_NAME, "utf-8"));
+      StringRequestEntity stringreq = new StringRequestEntity(
+        f.toString(),"application/x-www-form-urlencoded","utf-8");
+      String uri = "https://www.google.com/accounts/ClientLogin";
+      RequestOptions options = abderaClient.getDefaultRequestOptions();
+      options.setContentType("application/x-www-form-urlencoded");
+      ClientResponse response = abderaClient.post(uri, stringreq, options);
+      InputStream in = response.getInputStream();
+      ByteArrayOutputStream out = new ByteArrayOutputStream();
+      int n = -1;
+      while ((n = in.read()) != -1) { out.write(n); }
+      out.flush();
+      response.release();
+      String auth = new String(out.toByteArray());
+      return auth.split("\n")[2].replaceAll("Auth=", "auth=");
+    } catch (Exception e) {}
+    return null;
+  }
+
+  public static String getGoogleLogin(String id, String pwd, String service) {
+    String auth = (new GoogleLoginAuthScheme()).getAuth(id, pwd, service);
+    StringBuffer buf = new StringBuffer("GoogleLogin ");
+    buf.append(auth);
+    return buf.toString();
+  }
+}
\ No newline at end of file

Added: incubator/abdera/java/trunk/extensions/geo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/pom.xml?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/pom.xml (added)
+++ incubator/abdera/java/trunk/extensions/geo/pom.xml Mon Aug 20 17:51:20 2007
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. -->
+<project 
+  xmlns="http://maven.apache.org/POM/4.0.0" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.abdera</groupId>
+    <artifactId>abdera</artifactId>
+    <version>0.3.0-incubating-SNAPSHOT</version>
+  </parent>  
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>abdera-extensions-geo</artifactId>
+  <packaging>jar</packaging>
+  <name>Abdera Extensions - Geo</name>
+  <version>0.3.0-incubating-SNAPSHOT</version>
+  <description>Atom Specification Extensions - Geo</description>
+  <inceptionYear>2006</inceptionYear>
+  <url>http://incubator.apache.org/abdera</url>
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/abdera/java/trunk/extensions/geo</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/abdera/java/trunk/extensions/geo</developerConnection>
+    <url>http://svn.apache.org/repos/asf/incubator/abdera/java/trunk/extensions/geo</url>
+  </scm>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-core</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>    
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-parser</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>   
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-protocol</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-client</artifactId>
+      <version>0.3.0-incubating-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>json</artifactId>
+      <version>1.0</version>
+      <scope>compile</scope>
+    </dependency>   
+    <dependency>
+      <groupId>org.apache.ws.commons.axiom</groupId>
+      <artifactId>axiom-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ws.commons.axiom</groupId>
+      <artifactId>axiom-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>stax</groupId>
+      <artifactId>stax-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.woodstox</groupId>
+      <artifactId>wstx-asl</artifactId>
+    </dependency> 
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+  </dependencies>
+</project>

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Box.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Box.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Box.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Box.java Mon Aug 20 17:51:20 2007
@@ -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.ext.geo;
+
+public class Box 
+  extends Multiple {
+
+  private static final String TWO_COORDINATES = "A box must have two coordinates";
+  private static final long serialVersionUID = 3994252648307511152L;
+
+  public Box() {
+    super();
+  }
+ 
+  public Box(Multiple multiple) {
+    super(multiple);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+  
+  public Box(Point lowerCorner, Point upperCorner) {
+    super(lowerCorner,upperCorner);
+  }
+  
+  public Box(Coordinate... coordinates) {
+    super(coordinates);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+
+  public Box(Coordinates coordinates) {
+    super(coordinates);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+
+  public Box(String value) {
+    super(value);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+
+  public Box(Multiple... multiples) {
+    super(multiples);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+
+  public Box(Point... points) {
+    super(points);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+
+  public Box(double... values) {
+    super(values);
+    if (this.coordinates.size() != 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }  
+  
+  @Override
+  public void setCoordinates(Coordinates coordinates) {
+    super.setCoordinates(coordinates);
+    if (this.coordinates.size() > 2)
+      throw new IllegalArgumentException(
+        TWO_COORDINATES);
+  }
+
+  public Coordinate getUpperCorner() {
+    return coordinates.size() > 1 ? coordinates.get(1) : null;
+  }
+  
+  public Coordinate getLowerCorner() {
+    return coordinates.size() > 0 ? coordinates.get(0) : null;
+  }
+}

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinate.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinate.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinate.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinate.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,130 @@
+/*
+* 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.ext.geo;
+
+import java.io.Serializable;
+
+public class Coordinate 
+  implements Serializable, 
+             Cloneable,
+             Comparable<Coordinate> {
+
+  private static final long serialVersionUID = -916272885213668761L;
+  
+  private double latitude = 0.0f;
+  private double longitude = 0.0f;
+  
+  public Coordinate() {}
+  
+  public Coordinate(double latitude, double longitude) {
+    setLatitude(latitude);
+    setLongitude(longitude);
+  }
+  
+  public Coordinate(String value) {
+    Coordinate c = parse(value);
+    setLatitude(c.latitude);
+    setLongitude(c.longitude);
+  }
+  
+  public double getLatitude() {
+    return latitude;
+  }
+  
+  public void setLatitude(double latitude) {
+    if (Double.compare(longitude, 90.0d) > 0)
+      throw new IllegalArgumentException("Latitude > 90.0 degrees");
+    if (Double.compare(longitude, -90.0d) < 0)
+      throw new IllegalArgumentException("Latitude < 90.0 degrees");
+    this.latitude = latitude;
+  }
+  
+  public double getLongitude() {
+    return longitude;
+  }
+  
+  public void setLongitude(double longitude) {
+    if (Double.compare(longitude, 180.0d) > 0)
+      throw new IllegalArgumentException("Longitude > 180.0 degrees");
+    if (Double.compare(longitude, -180.0d) < 0)
+      throw new IllegalArgumentException("Longitude < 180.0 degrees");
+    this.longitude = longitude;
+  }
+  
+  public String toString() {
+    return Double.toString(latitude) + " " + Double.toString(longitude);
+  }
+
+  public Coordinate clone() {
+    try {
+      return (Coordinate) super.clone();
+    } catch (CloneNotSupportedException e) {
+      return new Coordinate(latitude,longitude);  // not going to happen
+    }
+  }
+
+  @Override
+  public int hashCode() {
+    final int PRIME = 31;
+    int result = 1;
+    long temp;
+    temp = Double.doubleToLongBits(latitude);
+    result = PRIME * result + (int) (temp ^ (temp >>> 32));
+    temp = Double.doubleToLongBits(longitude);
+    result = PRIME * result + (int) (temp ^ (temp >>> 32));
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj)
+      return true;
+    if (obj == null)
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    final Coordinate other = (Coordinate) obj;
+    if (Double.doubleToLongBits(latitude) != Double.doubleToLongBits(other.latitude))
+      return false;
+    if (Double.doubleToLongBits(longitude) != Double.doubleToLongBits(other.longitude))
+      return false;
+    return true;
+  }
+
+  public static Coordinate parse(String value) {
+    try {
+      String[] points = value.trim().split("\\s+", 2);
+      double latitude = Double.parseDouble(points[0].trim());
+      double longitude = Double.parseDouble(points[1].trim());
+      return new Coordinate(latitude,longitude);
+    } catch (Throwable t) {
+      throw new RuntimeException("Error parsing coordinate pair",t);
+    }
+  }
+
+  public int compareTo(Coordinate o) {
+    if (o == null || equals(o)) return 0;
+    int l1 = Double.compare(latitude, o.latitude);
+    int l2 = Double.compare(longitude, o.longitude);
+    if (l1 < 0) return -1;
+    if (l1 == 0 && l2 < -1) return -1;
+    if (l1 == 0 && l2 == 0) return  0;
+    return 1;
+  }
+  
+}

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinates.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinates.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinates.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Coordinates.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,202 @@
+/*
+* 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.ext.geo;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+public class Coordinates 
+  implements Iterable<Coordinate>, 
+             Serializable, 
+             Cloneable,
+             Comparable<Coordinates>{
+
+  private static final long serialVersionUID = 1640788106113796699L;
+  protected List<Coordinate> coords = new ArrayList<Coordinate>();
+  
+  public Coordinates() {}
+  
+  public Coordinates(Coordinate... coordinates) {
+    for (Coordinate coord : coordinates) add(coord);
+  }
+  
+  public Coordinates(Coordinates coordinates) {
+    coords.addAll(coordinates.coords);
+  }
+  
+  public Coordinates(String value) {
+    Coordinates cs = parse(value);
+    this.coords = cs.coords;
+  }
+  
+  public synchronized Coordinate get(int n) {
+    return coords.get(n);
+  }
+  
+  public synchronized void add(Coordinates coordinates) {
+    coords.addAll(coordinates.coords);
+  }
+  
+  public synchronized void add(Coordinate coordinate) {
+    coords.add(coordinate);
+  }
+  
+  public synchronized void add(Coordinate... coordinates) {
+    for (Coordinate c : coordinates) add(c);
+  }
+  
+  public synchronized void add(double latitude, double longitude) {
+    coords.add(new Coordinate(latitude,longitude));
+  }
+  
+  public synchronized void add(String value) {
+    coords.add(new Coordinate(value));
+  }
+  
+  public synchronized void remove(Coordinate coordinate) {
+    if (coords.contains(coordinate)) coords.remove(coordinate);
+  }
+  
+  public synchronized void remove(Coordinate... coordinates) {
+    for (Coordinate c : coordinates) remove(c);
+  }
+  
+  public synchronized void remove(double latitude, double longitude) {
+    remove(new Coordinate(latitude,longitude));
+  }
+  
+  public synchronized void remove(String value) {
+    remove(new Coordinate(value));
+  }
+  
+  public synchronized boolean contains(double latitude, double longitude) {
+    return contains(new Coordinate(latitude,longitude));
+  }
+  
+  public synchronized boolean contains(String value) {
+    return contains(new Coordinate(value));
+  }
+  
+  public synchronized boolean contains(Coordinate coordinate) {
+    return coords.contains(coordinate);
+  }
+  
+  public synchronized boolean contains(Coordinate... coordinates) {
+    for (Coordinate c : coordinates) 
+      if (!coords.contains(c)) return false;
+    return true;
+  }
+  
+  public Iterator<Coordinate> iterator() {
+    return coords.iterator();
+  }
+
+  public String toString() {
+    StringBuffer buf = new StringBuffer();
+    for (Coordinate coord : coords) {
+      if (buf.length() > 0) buf.append(" ");
+      buf.append(coord);
+    }
+    return buf.toString();
+  }
+
+  @Override
+  public int hashCode() {
+    final int PRIME = 31;
+    int result = 1;
+    result = PRIME * result + ((coords == null) ? 0 : coords.hashCode());
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj)
+      return true;
+    if (obj == null)
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    final Coordinates other = (Coordinates) obj;
+    if (coords == null) {
+      if (other.coords != null)
+        return false;
+    } else if (!coords.equals(other.coords))
+      return false;
+    return true;
+  }
+  
+  public static Coordinates parse(String value) {
+    Coordinates cs = new Coordinates();
+    try {
+      String[] points = value.trim().split("\\s+");
+      for (int n = 0; n < points.length; n = n + 2) {
+        double lat = Double.parseDouble(points[n]);
+        double lon = Double.parseDouble(points[n+1]);
+        Coordinate c = new Coordinate(lat,lon);
+        cs.add(c);
+      }
+      return cs;
+    } catch (Throwable t) {
+      throw new RuntimeException("Error parsing coordinate pairs",t);
+    }
+  }
+  
+  public int size() {
+    return coords.size();
+  }
+  
+  public void clear() {
+    coords.clear();
+  }
+  
+  public Coordinates clone() {
+    try {
+      return (Coordinates) super.clone();
+    } catch (CloneNotSupportedException e) {
+      return new Coordinates(this);  // Not going to happen
+    }
+  }
+  
+  public Coordinates sort() {
+    return sort(false);
+  }
+  
+  public Coordinates sort(boolean reverse) {
+    Coordinates c = clone();
+    if (reverse) Collections.sort(c.coords,Collections.reverseOrder());
+    else Collections.sort(c.coords);
+    return c;
+  }
+
+  public int compareTo(Coordinates o) {
+    if (o == null || equals(o)) return 0;
+    if (size() < o.size()) return -1;
+    if (o.size() < size()) return 1;
+    for (int n = 0; n < size(); n++) {
+      Coordinate c1 = coords.get(n);
+      Coordinate c2 = o.coords.get(n);
+      int c = c1.compareTo(c2);
+      if (c != 0) return c;
+    }
+    return 0;
+  }
+  
+}

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/GeoHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/GeoHelper.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/GeoHelper.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/GeoHelper.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,319 @@
+/*
+* 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.ext.geo;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.abdera.model.Element;
+import org.apache.abdera.model.Entry;
+import org.apache.abdera.model.ExtensibleElement;
+
+/**
+ * Basic support for the GeoRSS extensions to Atom: http://georss.org/1
+ */
+public class GeoHelper {
+
+  public static final String W3C_GEO_NS = "http://www.w3.org/2003/01/geo/wgs84_pos#";
+  public static final String SIMPLE_GEO_NS = "http://www.georss.org/georss/10";
+  public static final String GML_NS = "http://www.opengis.net/gml";
+  
+  public static final QName QNAME_W3C_POINT = new QName(W3C_GEO_NS, "Point", "geo");
+  public static final QName QNAME_W3C_LAT = new QName(W3C_GEO_NS, "lat", "geo");
+  public static final QName QNAME_W3C_LONG = new QName(W3C_GEO_NS, "long", "geo");
+  
+  public static final QName QNAME_SIMPLE_POINT = new QName(SIMPLE_GEO_NS, "point", "georss");
+  public static final QName QNAME_SIMPLE_LINE = new QName(SIMPLE_GEO_NS, "line", "georss");
+  public static final QName QNAME_SIMPLE_POLYGON = new QName(SIMPLE_GEO_NS, "polygon", "georss");
+  public static final QName QNAME_SIMPLE_BOX = new QName(SIMPLE_GEO_NS, "box", "georss");
+  public static final QName QNAME_WHERE = new QName(SIMPLE_GEO_NS, "where", "georss");
+  
+  public static final QName QNAME_GML_POINT = new QName(GML_NS, "Point", "gml");
+  public static final QName QNAME_GML_POS = new QName(GML_NS, "pos", "gml");
+  public static final QName QNAME_GML_LINESTRING  = new QName(GML_NS, "LineString", "gml");
+  public static final QName QNAME_GML_POSLIST = new QName(GML_NS, "posList", "gml");
+  public static final QName QNAME_GML_POLYGON = new QName(GML_NS, "Polygon", "gml");
+  public static final QName QNAME_GML_EXTERIOR = new QName(GML_NS, "exterior", "gml");
+  public static final QName QNAME_GML_LINEARRING = new QName(GML_NS, "LinearRing", "gml");
+  public static final QName QNAME_GML_ENVELOPE = new QName(GML_NS, "Envelope", "gml");
+  public static final QName QNAME_GML_LOWERCORNER = new QName(GML_NS, "lowerCorner", "gml");
+  public static final QName QNAME_GML_UPPERCORNER = new QName(GML_NS, "upperCorner", "gml");
+  
+  public enum Encoding {
+    SIMPLE, W3C, GML
+  }
+  
+  public static void addPosition(
+    Entry entry, 
+    Position position) {
+      addPosition(entry,position,Encoding.SIMPLE);
+  }
+  
+  public static void addPosition(
+    Entry entry, 
+    Position position, 
+    Encoding encoding) {
+      switch(encoding) {
+        case SIMPLE:
+          addSimplePosition(entry, position);
+          break;
+        case GML:
+          addGmlPosition(entry, position);
+          break;
+        case W3C: {
+          addW3CPosition(entry, position); 
+          break;
+        }
+      }
+  }
+  
+  private static void setPositionAttributes(Element pos, Position position) {
+    if (pos != null) {
+      if (position.getFeatureTypeTag() != null)
+        pos.setAttributeValue("featuretypetag", position.getFeatureTypeTag());
+      if (position.getRelationshipTag() != null)
+        pos.setAttributeValue("relationshiptag", position.getRelationshipTag());
+      if (position.getElevation() != null)
+        pos.setAttributeValue("elev", position.getElevation().toString());
+      if (position.getFloor() != null)
+        pos.setAttributeValue("floor", position.getFloor().toString());
+      if (position.getRadius() != null)
+        pos.setAttributeValue("radius", position.getRadius().toString());
+    }
+  }
+  
+  private static void addGmlPosition(Entry entry, Position position) {
+    ExtensibleElement pos = entry.addExtension(QNAME_WHERE);
+    if (position instanceof Point) {
+      Point point = (Point) position;
+      ExtensibleElement p = pos.addExtension(QNAME_GML_POINT);
+      p.addSimpleExtension(QNAME_GML_POS, point.getCoordinate().toString());
+    } else if (position instanceof Line) {
+      Multiple m = (Multiple) position;
+      ExtensibleElement p = pos.addExtension(QNAME_GML_LINESTRING);
+      p.addSimpleExtension(QNAME_GML_POSLIST, m.getCoordinates().toString());
+    } else if (position instanceof Polygon) {
+      Multiple m = (Multiple) position;
+      ExtensibleElement p = pos.addExtension(QNAME_GML_POLYGON);
+      p = p.addExtension(QNAME_GML_EXTERIOR);
+      p = p.addExtension(QNAME_GML_LINEARRING);
+      p.addSimpleExtension(QNAME_GML_POSLIST, m.getCoordinates().toString());
+    } else if (position instanceof Box) {
+      Box m = (Box) position;
+      ExtensibleElement p = pos.addExtension(QNAME_GML_ENVELOPE);
+      if (m.getLowerCorner() != null)
+        p.addSimpleExtension(QNAME_GML_LOWERCORNER,m.getLowerCorner().toString());
+      if (m.getUpperCorner() != null)
+        p.addSimpleExtension(QNAME_GML_UPPERCORNER, m.getUpperCorner().toString());
+    }
+    setPositionAttributes(pos,position);
+  }
+  
+  private static void addSimplePosition(Entry entry, Position position) {
+    Element pos = null;
+    if (position instanceof Point) {
+      Point point = (Point) position;
+      pos = 
+        entry.addSimpleExtension(
+          QNAME_SIMPLE_POINT, 
+          point.getCoordinate().toString());
+    } else if (position instanceof Multiple) {
+      Multiple line = (Multiple) position;
+      QName qname = position instanceof Line ? QNAME_SIMPLE_LINE :
+                    position instanceof Box  ? QNAME_SIMPLE_BOX :
+                    position instanceof Polygon ? QNAME_SIMPLE_POLYGON : null;
+      if (qname != null) {
+        pos = 
+          entry.addSimpleExtension(
+            qname, 
+            line.getCoordinates().toString());
+      }
+    }
+    setPositionAttributes(pos, position);
+  }
+  
+  private static void addW3CPosition(Entry entry, Position position) {
+    if (!(position instanceof Point)) 
+      throw new IllegalArgumentException("The W3C Encoding only supports Points");
+    Element el = entry.getExtension(QNAME_W3C_LAT);
+    if (el != null) el.discard();
+    el = entry.getExtension(QNAME_W3C_LONG);
+    if (el != null) el.discard();    
+    Point point = (Point) position;
+    
+    ExtensibleElement p = entry.addExtension(QNAME_W3C_POINT);
+    p.addSimpleExtension(QNAME_W3C_LAT, Double.toString(point.getCoordinate().getLatitude()));
+    p.addSimpleExtension(QNAME_W3C_LONG, Double.toString(point.getCoordinate().getLongitude()));
+    
+  }
+  
+  private static List<Position> _getPositions(Entry entry) {
+    List<Position> list = new ArrayList<Position>();
+    getW3CPosition(entry,list);
+    getSimplePosition(entry,list);
+    getGMLPosition(entry, list);
+    return list;
+  }
+  
+  public static boolean isGeotagged(Entry entry) {
+    if (entry.getExtensions(QNAME_SIMPLE_POINT).size() > 0) return true;
+    if (entry.getExtensions(QNAME_SIMPLE_LINE).size() > 0) return true;
+    if (entry.getExtensions(QNAME_SIMPLE_BOX).size() > 0) return true;
+    if (entry.getExtensions(QNAME_SIMPLE_POLYGON).size() > 0) return true;
+    if (entry.getExtensions(QNAME_WHERE).size() > 0) return true;
+    if (entry.getExtensions(QNAME_W3C_POINT).size() > 0) return true;
+    if (entry.getExtensions(QNAME_W3C_LAT).size() > 0 && 
+        entry.getExtensions(QNAME_W3C_LONG).size() > 0) return true;
+    return false;
+  }
+  
+  public static Iterator<Position> listPositions(Entry entry) {
+    return _getPositions(entry).iterator();
+  }
+  
+  public static Position[] getPositions(Entry entry) {
+    List<Position> positions = _getPositions(entry);
+    return positions.toArray(new Position[positions.size()]);
+  }
+  
+  private static void getSimplePosition(Entry entry, List<Position> list) {
+    List<Element> elements = entry.getExtensions(SIMPLE_GEO_NS);
+    for (Element element : elements) {
+      Position pos = null;
+      QName qname = element.getQName();
+      String text = element.getText();
+      if (text != null) {
+        if (qname.equals(QNAME_SIMPLE_POINT)) {
+          pos = new Point(text.trim());
+        } else if (qname.equals(QNAME_SIMPLE_LINE)) {
+          pos = new Line(text.trim());
+        } else if (qname.equals(QNAME_SIMPLE_BOX)) {
+          pos = new Box(text.trim());
+        } else if (qname.equals(QNAME_SIMPLE_POLYGON)) {
+          pos = new Polygon(text.trim());
+        }
+      }
+      if (pos != null) {
+        getPositionAttributes(element, pos);
+        list.add(pos);
+      }
+    }
+  }
+  
+  private static void getGMLPosition(Entry entry, List<Position> list) {
+    List<ExtensibleElement> elements = entry.getExtensions(QNAME_WHERE);
+    for (ExtensibleElement where : elements) {
+      Position pos = null;
+      List<ExtensibleElement> children = where.getElements();
+      for (ExtensibleElement element : children) {
+        QName qname = element.getQName();
+        if (qname.equals(QNAME_GML_POINT)) {
+          element = traverse(
+            element, 
+            QNAME_GML_POS);
+          if (element != null) {
+            String text = element.getText();
+            if (text != null) {
+              pos = new Point(text.trim());
+            }
+          }
+        } else if (qname.equals(QNAME_GML_LINESTRING)) {
+          element = traverse(
+            element,
+            QNAME_GML_POSLIST);
+          if (element != null) {
+            String text = element.getText();
+            if (text != null) {
+              pos = new Line(text.trim());
+            }
+          }
+        } else if (qname.equals(QNAME_GML_POLYGON)) {
+          element = traverse(
+            element, 
+            QNAME_GML_EXTERIOR, 
+            QNAME_GML_LINEARRING, 
+            QNAME_GML_POSLIST);
+          if (element != null) {
+            String text = element.getText();
+            if (text != null) {
+              pos = new Polygon(text.trim());
+            }
+          }
+        } else if (qname.equals(QNAME_GML_ENVELOPE)) {
+          String lc = element.getSimpleExtension(QNAME_GML_LOWERCORNER);
+          String uc = element.getSimpleExtension(QNAME_GML_UPPERCORNER);
+          if (lc != null && uc != null) {
+            Coordinate c1 = new Coordinate(lc);
+            Coordinate c2 = new Coordinate(uc);
+            pos = new Box(c1,c2);
+          }
+        }
+        if (pos != null) {
+          getPositionAttributes(element, pos);
+          list.add(pos);
+        }
+      }
+    }
+  }
+  
+  private static ExtensibleElement traverse(ExtensibleElement element, QName... qnames) {
+    for (QName qname : qnames) {
+      element = element.getExtension(qname);
+      if (element == null) break;
+    }
+    return element;
+  }
+  
+  private static void getPositionAttributes(Element pos, Position position) {
+    if (position != null) {
+      String featuretypetag = pos.getAttributeValue("featuretypetag");
+      String relationshiptag = pos.getAttributeValue("relationshiptag");
+      String elevation = pos.getAttributeValue("elev");
+      String floor = pos.getAttributeValue("floor");
+      String radius = pos.getAttributeValue("radius");
+      if (featuretypetag != null)
+        position.setFeatureTypeTag(featuretypetag);
+      if (featuretypetag != null)
+        position.setRelationshipTag(relationshiptag);
+      if (elevation != null)
+        position.setElevation(Double.valueOf(elevation));
+      if (floor != null)
+        position.setFloor(Double.valueOf(floor));
+      if (radius != null)
+        position.setRadius(Double.valueOf(radius));
+    }
+  }
+  
+  private static void getW3CPosition(Entry entry, List<Position> list) {
+    getW3CPosition((ExtensibleElement)entry, list);
+    List<ExtensibleElement> points = entry.getExtensions(QNAME_W3C_POINT);
+    for (ExtensibleElement point : points) getW3CPosition(point, list);
+  }
+  
+  private static void getW3CPosition(ExtensibleElement el, List<Position> list) {
+    String slat = el.getSimpleExtension(QNAME_W3C_LAT);
+    String slong = el.getSimpleExtension(QNAME_W3C_LONG);
+    if (slat != null && slong != null) {
+      Point point = new Point(slat.trim() + " " + slong.trim());
+      list.add(point);
+    }
+  }
+}
\ No newline at end of file

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Line.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Line.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Line.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Line.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,77 @@
+/*
+* 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.ext.geo;
+
+public class Line 
+  extends Multiple {
+  
+  private static final long serialVersionUID = 2852975001208906285L;
+
+  public Line() {
+  }
+
+  public Line(Multiple multiple) {
+    super(multiple);
+    verify();
+  }
+  
+  public Line(Point point) {
+    super(point);
+    verify();
+  }
+  
+  public Line(Coordinate... coordinates) {
+    super(coordinates);
+    verify();
+  }
+
+  public Line(Coordinates coordinates) {
+    super(coordinates);
+    verify();
+  }
+
+  public Line(String value) {
+    super(value);
+    verify();
+  }
+
+  public Line(Multiple... multiples) {
+    super(multiples);
+    verify();
+  }
+
+  public Line(Point... points) {
+    super(points);
+    verify();
+  }
+
+  public Line(double... values) {
+    super(values);
+    verify();
+  }
+
+  @Override
+  public void setCoordinates(Coordinates coordinates) {
+    super.setCoordinates(coordinates);
+    verify();
+  }
+  
+  public void verify() {
+    super.verify179Rule();
+  }
+}

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Multiple.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Multiple.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Multiple.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Multiple.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,125 @@
+/*
+* 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.ext.geo;
+
+import java.util.Iterator;
+
+public abstract class Multiple 
+  extends Position 
+  implements Iterable<Coordinate> {
+
+  protected Coordinates coordinates;
+  
+  public Multiple() {}
+  
+  public Multiple(Multiple... multiples) {
+    this.coordinates = new Coordinates();
+    for (Multiple m : multiples) 
+      coordinates.add(m.getCoordinates());
+  }
+
+  public Multiple(Multiple multiple) {
+    this(multiple.getCoordinates().clone());
+  }
+  
+  public Multiple(Point point) {
+    this(point.getCoordinate().clone());
+  }
+  
+  public Multiple(Point... points) {
+    this.coordinates = new Coordinates();
+    for (Point p : points) 
+      coordinates.add(p.getCoordinate());
+  }
+  
+  public Multiple(Coordinates coordinates) {
+    this.coordinates = coordinates;
+  }
+
+  public Multiple(Coordinate... coordinates) {
+    this.coordinates = new Coordinates(coordinates);
+  }
+  
+  public Multiple(String value) {
+    this.coordinates = new Coordinates(value);
+  }
+  
+  public Multiple(double... values) {
+    this.coordinates = new Coordinates();
+    for (int n = 0; n < values.length; n = n + 2) {
+      Coordinate c = new Coordinate(values[n],values[n+1]);
+      this.coordinates.add(c);
+    }
+  }
+  
+  public Coordinates getCoordinates() {
+    return coordinates;
+  }
+
+  public void setCoordinates(Coordinates coordinates) {
+    this.coordinates = coordinates;
+  }
+
+  public Iterator<Coordinate> iterator() {
+    return coordinates.iterator();
+  }
+
+  @Override
+  public int hashCode() {
+    final int PRIME = 31;
+    int result = super.hashCode();
+    result = PRIME * result + ((coordinates == null) ? 0 : coordinates.hashCode());
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj)
+      return true;
+    if (!super.equals(obj))
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    final Multiple other = (Multiple) obj;
+    if (coordinates == null) {
+      if (other.coordinates != null)
+        return false;
+    } else if (!coordinates.equals(other.coordinates))
+      return false;
+    return true;
+  }
+  
+  public int compareTo(Position o) {
+    if (o == null || !this.getClass().isInstance(o) || equals(o)) return 0;
+    return coordinates.compareTo(((Multiple)o).coordinates);
+  }
+
+  protected void verify179Rule() {
+    for (Coordinate c1 : getCoordinates()) {
+      for (Coordinate c2 : getCoordinates()) {
+        check179(c1.getLatitude(),c2.getLatitude());
+        check179(c1.getLongitude(),c2.getLongitude());
+      }
+    }
+  }
+  
+  private void check179(double d1, double d2) {
+    if (Math.max(d1, d2)-Math.min(d1,d2) > 179) 
+      throw new RuntimeException("Values are greater than 179 degrees");
+  }
+}

Added: incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Point.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Point.java?rev=567888&view=auto
==============================================================================
--- incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Point.java (added)
+++ incubator/abdera/java/trunk/extensions/geo/src/main/java/org/apache/abdera/ext/geo/Point.java Mon Aug 20 17:51:20 2007
@@ -0,0 +1,91 @@
+/*
+* 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.ext.geo;
+
+public class Point 
+  extends Position {
+
+  private static final long serialVersionUID = 7540202474168797239L;
+  
+  private Coordinate coordinate;
+
+  public Point() {}
+  
+  public Point(Point point) {
+    this.coordinate = point.getCoordinate().clone();
+  }
+  
+  public Point(Coordinate coordinate) {
+    this.coordinate = coordinate;
+  }
+  
+  public Point(double latitude, double longitude) {
+    this.coordinate = new Coordinate(latitude,longitude);
+  }
+
+  public Point(String value) {
+    this.coordinate = new Coordinate(value);
+  }
+
+  public Coordinate getCoordinate() {
+    return coordinate;
+  }
+
+  public void setCoordinate(Coordinate coordinate) {
+    this.coordinate = coordinate;
+  }
+  
+  public void setCoordinate(double latitude, double longitude) {
+    this.coordinate = new Coordinate(latitude,longitude);
+  }
+  
+  public void setCoordinate(String value) {
+    this.coordinate = new Coordinate(value);
+  }
+
+  @Override
+  public int hashCode() {
+    final int PRIME = 31;
+    int result = super.hashCode();
+    result = PRIME * result + ((coordinate == null) ? 0 : coordinate.hashCode());
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj)
+      return true;
+    if (!super.equals(obj))
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    final Point other = (Point) obj;
+    if (coordinate == null) {
+      if (other.coordinate != null)
+        return false;
+    } else if (!coordinate.equals(other.coordinate))
+      return false;
+    return true;
+  }
+
+  public int compareTo(Position o) {
+    if (o == null || !(o instanceof Point) || equals(o)) return 0;
+    return coordinate.compareTo(((Point)o).coordinate);
+  }
+  
+}



Mime
View raw message