abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1186541 [1/8] - in /abdera/abdera2: ./ .settings/ activities/ activities/.settings/ activities/src/main/java/org/apache/abdera2/activities/client/ activities/src/main/java/org/apache/abdera2/activities/extra/ activities/src/main/java/org/a...
Date Wed, 19 Oct 2011 22:33:52 GMT
Author: jmsnell
Date: Wed Oct 19 22:33:04 2011
New Revision: 1186541

URL: http://svn.apache.org/viewvc?rev=1186541&view=rev
Log:
Ok.. time for the next major installment of the Abdera2 rework.

This batch of changes introduces two major new dependencies and a whole slew of related changes. Primarily, the two new dependencies are the Google Guava Library (com.google.common.*) and the Joda-Time library (org.joda.time.*). Joda-Time replaces the old DateTime class that was there. This is a major change that affects the backwards compatibility of the FOM APIs. The reason this was done is simple: Joda-Time is a whole hell of a lot better than the implementation that was there and offers significant functionality beyond anything we could have implemented. When Abdera first emerged, there were no first-rate ISO 8601 DateTime implementations available in open source, now there are. 

The other new dependency (Guava) provides for significantly more powerful applications than what we had. I'll go into detail on this in a separate email. Expect the tight integration with Guava to continue.

Further, there is a significant amount of attention given to integrating Guava and Joda-Time in very interesting ways. Again, I'll go into this in a separate email.

Another significant change that has been made is an emphasis on the use of Builder classes to generate Immutable Thread-safe instances of commonly used objects. Many existing objects that previously were Mutable (e.g. the extension geo.* objects) have been refactored into immutable objects constructed with a Builder pattern. The point behind this change is to make the code much more reliable, readable, and... well... just better overall.

Added:
    abdera/abdera2/.settings/org.eclipse.ltk.core.refactoring.prefs   (with props)
    abdera/abdera2/.settings/org.eclipse.m2e.core.prefs   (with props)
    abdera/abdera2/activities/.classpath   (with props)
    abdera/abdera2/activities/.project   (with props)
    abdera/abdera2/activities/.settings/
    abdera/abdera2/activities/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateTimeAdapter.java   (with props)
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/MultimapAdapter.java   (with props)
    abdera/abdera2/client/.classpath   (with props)
    abdera/abdera2/client/.project   (with props)
    abdera/abdera2/client/.settings/
    abdera/abdera2/client/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/common/.classpath   (with props)
    abdera/abdera2/common/.project   (with props)
    abdera/abdera2/common/.settings/
    abdera/abdera2/common/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/date/DateTimes.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/AbstractItemManager.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/AbstractResolver.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/Chain.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/MorePreconditions.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/MorePredicates.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/Task.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/selector/AbstractSelector.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/selector/PropertySelector.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/selector/TransformSelector.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/text/CodepointMatcher.java   (with props)
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/text/CodepointMatchers.java   (with props)
    abdera/abdera2/core/.classpath   (with props)
    abdera/abdera2/core/.project   (with props)
    abdera/abdera2/core/.settings/
    abdera/abdera2/core/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/selector/Selectors.java   (with props)
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/Parsers.java   (with props)
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/UnacceptableException.java   (with props)
    abdera/abdera2/core/src/main/java/org/apache/abdera2/writer/Writers.java   (with props)
    abdera/abdera2/core/src/main/java/org/apache/abdera2/xpath/XPaths.java   (with props)
    abdera/abdera2/ext/.classpath   (with props)
    abdera/abdera2/ext/.project   (with props)
    abdera/abdera2/ext/.settings/
    abdera/abdera2/ext/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/activities/ActivityToFeedParser.java   (with props)
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/activities/FeedToActivityWriter.java   (with props)
    abdera/abdera2/security/.classpath   (with props)
    abdera/abdera2/security/.project   (with props)
    abdera/abdera2/security/.settings/
    abdera/abdera2/security/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/server/.classpath   (with props)
    abdera/abdera2/server/.project   (with props)
    abdera/abdera2/server/.settings/
    abdera/abdera2/server/.settings/org.eclipse.jdt.core.prefs   (with props)
    abdera/abdera2/test/.classpath   (with props)
    abdera/abdera2/test/.project   (with props)
    abdera/abdera2/test/.settings/
    abdera/abdera2/test/.settings/org.eclipse.jdt.core.prefs   (with props)
Removed:
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/date/DateTime.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/date/Duration.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/date/Interval.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Coordinates.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/MultiIterator.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/FilterChain.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/SetParseFilter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/common/date/DateTimeTest.java
Modified:
    abdera/abdera2/.classpath
    abdera/abdera2/.project
    abdera/abdera2/.settings/org.eclipse.core.resources.prefs
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClient.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesSession.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/Extra.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/MovieObject.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/PusherCollectionWriter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/BaseAdapter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateAdapter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DurationAdapter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/GsonIO.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/IntervalAdapter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASBase.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASObject.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/AbstractCollectionWriter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Activity.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Collection.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/CollectionWriter.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Generator.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/AbstractActivitiesProvider.java
    abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/ActivitiesRequestContext.java
    abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/AbderaClientResponseImpl.java
    abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/AbderaSession.java
    abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/ClientResponseImpl.java
    abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/RequestHelper.java
    abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/RequestOptions.java
    abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/Session.java
    abdera/abdera2/common/pom.xml
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/Discover.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/anno/AnnoUtil.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Box.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Coordinate.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/IsoPosition.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Line.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Multiple.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Point.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Polygon.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/geo/Position.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/Authentication.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/CacheControl.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/CacheControlUtil.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/Preference.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/WebLink.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/CharsetSniffingInputStream.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/Compression.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/io/FilteredCharReader.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/iri/AbstractScheme.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/iri/IRI.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/mediatype/MimeTypeHelper.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/mediatype/MimeTypeParseException.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/ExceptionHelper.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/ItemManager.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/PoolManager.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/misc/Resolver.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractBaseRequestContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractCollectionAdapter.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractMessage.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractServiceManager.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/BaseProvider.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/CompressionFilter.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/Filter.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/MethodOverrideFilter.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/Provider.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/RegexTargetResolver.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/RouteManager.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/SimpleSubjectResolver.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/TemplateManagerTargetBuilder.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/AbstractAbderaServlet.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/servlet/async/AbderaTask.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/pusher/MapChannelManager.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/pusher/SelectorListener.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/pusher/SelectorPusher.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/HashHelper.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/security/KeyHelper.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/selector/InvertedSelector.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/selector/MultiSelector.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/selector/Selector.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/AnnotationContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/CachingContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/DefaultingContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/DelegatingContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/Expression.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/MapContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/MultiContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/ObjectContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/Operation.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/QueryContext.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/Template.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateManager.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/templates/TemplateProvider.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/text/CharUtils.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/text/Codec.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/text/NormalizationForm.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/text/UrlEncoding.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/xml/XMLStreamSniffingInputStream.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/xml/XMLVersion.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/xml/XmlRestrictedCharReader.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/xml/XmlVersionInputStream.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/xml/XmlVersionReader.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/factory/StreamBuilder.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Categories.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Collection.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/DateTime.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/DateTimeWrapper.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Document.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Element.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementIteratorWrapper.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ElementWrapper.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Entry.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ExtensibleElement.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ExtensibleElementWrapper.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/ExtensionIterator.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Feed.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Link.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Service.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Source.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/Workspace.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/selector/CategorySchemeSelector.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/selector/CollectionAcceptSelector.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/selector/LinkHrefLangSelector.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/selector/LinkRelSelector.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/model/selector/XPathSelector.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMCategories.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMCollection.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMDateTime.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMDocument.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMElement.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMEntry.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMExtensibleElement.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMFeed.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMService.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMSource.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/axiom/FOMWorkspace.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/AbstractParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/AbstractSetParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/BlackListParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/CompoundParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/NonOpParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/ParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/SafeContentWhiteListParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/parser/filter/WhiteListParseFilter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/writer/AbstractStreamWriter.java
    abdera/abdera2/core/src/main/java/org/apache/abdera2/writer/StreamWriter.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/activities/MiscellaneousExamples.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/activities/MyActivitiesAdapter.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/appclient/Main.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/appserver/employee/Employee.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/appserver/employee/EmployeeCollectionAdapter.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/ext/Geo.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/security/DHEnc.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/security/DSig.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/security/Enc.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/Create.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/Parse.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/PrintTitles.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/StreamBuilderExample.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/StreamWriterExample.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/UnacceptableElementsExample.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/simple/i18nExample.java
    abdera/abdera2/examples/src/main/java/org/apache/abdera2/examples/uritemplates/TemplateManagerExample.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/activities/ActivityToFeedConverter.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/activities/FeedToActivityConverter.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/features/FeatureSelector.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/features/FeaturesHelper.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/geo/GeoHelper.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/history/FeedPagingHelper.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/json/JSONFilter.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/json/JSONServlet.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/json/JSONStream.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/license/LicensedEntrySelector.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/license/UnspecifiedLicenseEntrySelector.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/rss/RssChannel.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/rss/RssDateTime.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/rss/RssFeed.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/rss/RssItem.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/rss/RssSource.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/serializer/ObjectResponseContext.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/serializer/impl/DateTimeSerializer.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/sharing/History.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/sharing/Sharing.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/sharing/SharingHelper.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/thread/ThreadHelper.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/tombstones/Tombstone.java
    abdera/abdera2/ext/src/main/java/org/apache/abdera2/ext/tombstones/TombstonesHelper.java
    abdera/abdera2/ext/src/main/resources/META-INF/services/org.apache.abdera2.parser.Parser
    abdera/abdera2/ext/src/main/resources/META-INF/services/org.apache.abdera2.writer.Writer
    abdera/abdera2/pom.xml
    abdera/abdera2/security/src/main/java/org/apache/abdera2/security/util/filters/AbstractEncryptedRequestFilter.java
    abdera/abdera2/security/src/main/java/org/apache/abdera2/security/util/filters/AbstractEncryptedResponseFilter.java
    abdera/abdera2/security/src/main/java/org/apache/abdera2/security/util/filters/DHEncryptedRequestFilter.java
    abdera/abdera2/security/src/main/java/org/apache/abdera2/security/util/filters/DHEncryptedResponseFilter.java
    abdera/abdera2/security/src/main/java/org/apache/abdera2/security/util/filters/SignedRequestFilter.java
    abdera/abdera2/security/src/main/java/org/apache/abdera2/security/util/filters/SignedResponseFilter.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubCollectionAdapter.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractAtompubProvider.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/impl/AbstractEntityCollectionAdapter.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/processors/ServiceRequestProcessor.java
    abdera/abdera2/server/src/main/java/org/apache/abdera2/protocol/server/provider/basic/BasicAdapter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/AsyncBasicTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/BasicTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/activities/server/SampleBasicAdapter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/AppTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/client/CacheTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/common/geo/GeoTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/common/http/CacheControlTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/common/misc/MiscTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/common/text/CharUtilsTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/ext/features/FeatureTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/ext/serializer/SerializerTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/ext/sharing/SharingTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/parser/EncodingTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/parser/ParserTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/parser/axiom/AtomConformanceTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/parser/axiom/FOMTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/parser/axiom/FeedValidatorTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/security/DigitalSignatureTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/security/EncryptionTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/security/filter/SecurityFilterTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/security/filter/SimpleAdapter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/basic/BasicTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/basic/SampleBasicAdapter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/custom/CustomProvider.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/custom/CustomProviderTest.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/custom/SimpleAdapter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/customer/CustomerAdapter.java
    abdera/abdera2/test/src/main/java/org/apache/abdera2/test/server/customer/CustomerAdapterTest.java

Modified: abdera/abdera2/.classpath
URL: http://svn.apache.org/viewvc/abdera/abdera2/.classpath?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/.classpath (original)
+++ abdera/abdera2/.classpath Wed Oct 19 22:33:04 2011
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="src" path="common/src/main/resources"/>
 	<classpathentry kind="src" path="examples/src/main/resources"/>
 	<classpathentry kind="src" path="examples/src/main/java"/>
@@ -19,48 +20,10 @@
 	<classpathentry kind="src" path="client/src/main/resources"/>
 	<classpathentry kind="src" path="activities/src/main/resources"/>
 	<classpathentry kind="src" path="activities/src/main/java"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/commons-codec-1.5/commons-codec-1.5.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/httpcomponents-client-4.1.2/lib/httpclient-4.1.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/httpcomponents-client-4.1.2/lib/httpclient-cache-4.1.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/httpcomponents-client-4.1.2/lib/httpcore-4.1.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/httpcomponents-client-4.1.2/lib/httpmime-4.1.2.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
-		<attributes>
-			<attribute name="owner.project.facets" value="jst.utility"/>
-		</attributes>
-	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.5.0 (MacOS X Default)">
 		<attributes>
 			<attribute name="owner.project.facets" value="java"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Jetty"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/google-gson-1.7.1/gson-1.7.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/axiom-api-1.2.12.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/axiom-impl-1.2.12-tests.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/axiom-impl-1.2.12.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/bcprov-jdk16-1.46.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/cglib-2.2.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/commons-logging-1.1.1-tests.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/commons-logging-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/easymock-3.0.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/geronimo-activation_1.0.2_spec-1.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/geronimo-activation-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/geronimo-javamail_1.3.1_spec-1.3.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/htmlparser-1.2.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/icu4j-4_8_1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/jaxen-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/jetty-6.0.0beta6.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/junit-4.9.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/log4j-1.2.16.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/serializer-2.7.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/stax2-api-3.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/woodstox-core-asl-4.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/woodstox-core-asl-4.1.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/wstx-asl-3.2.0.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/xalan-2.7.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/xml-apis-2.0.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="/Users/james/lib/abdera-dependencies/xmlsec-1.4.5.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: abdera/abdera2/.project
URL: http://svn.apache.org/viewvc/abdera/abdera2/.project?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/.project (original)
+++ abdera/abdera2/.project Wed Oct 19 22:33:04 2011
@@ -6,25 +6,18 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
 			<name>org.eclipse.jdt.core.javabuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 	</buildSpec>
 	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
 	</natures>
 </projectDescription>

Modified: abdera/abdera2/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/abdera/abdera2/.settings/org.eclipse.core.resources.prefs?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/.settings/org.eclipse.core.resources.prefs (original)
+++ abdera/abdera2/.settings/org.eclipse.core.resources.prefs Wed Oct 19 22:33:04 2011
@@ -1,3 +1,4 @@
-#Wed Sep 14 10:25:43 PDT 2011
+#Fri Oct 14 12:12:15 PDT 2011
 eclipse.preferences.version=1
 encoding//common/src/main/java/org/apache/abdera2/common/geo/IsoPosition.java=UTF-8
+encoding/<project>=UTF-8

Added: abdera/abdera2/.settings/org.eclipse.ltk.core.refactoring.prefs
URL: http://svn.apache.org/viewvc/abdera/abdera2/.settings/org.eclipse.ltk.core.refactoring.prefs?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/.settings/org.eclipse.ltk.core.refactoring.prefs (added)
+++ abdera/abdera2/.settings/org.eclipse.ltk.core.refactoring.prefs Wed Oct 19 22:33:04 2011
@@ -0,0 +1,3 @@
+#Fri Oct 14 12:21:17 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

Propchange: abdera/abdera2/.settings/org.eclipse.ltk.core.refactoring.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: abdera/abdera2/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/abdera/abdera2/.settings/org.eclipse.m2e.core.prefs?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/.settings/org.eclipse.m2e.core.prefs (added)
+++ abdera/abdera2/.settings/org.eclipse.m2e.core.prefs Wed Oct 19 22:33:04 2011
@@ -0,0 +1,5 @@
+#Fri Oct 14 12:12:11 PDT 2011
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

Propchange: abdera/abdera2/.settings/org.eclipse.m2e.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: abdera/abdera2/activities/.classpath
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/.classpath?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/activities/.classpath (added)
+++ abdera/abdera2/activities/.classpath Wed Oct 19 22:33:04 2011
@@ -0,0 +1,25 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="target/maven-shared-archive-resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="src" path="/abdera2-client"/>
+  <classpathentry kind="src" path="/abdera2-common"/>
+  <classpathentry kind="src" path="/abdera2-core"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ws/commons/axiom/axiom-api/1.2.12/axiom-api-1.2.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ws/commons/axiom/axiom-impl/1.2.12/axiom-impl-1.2.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.5/commons-codec-1.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.6/geronimo-javamail_1.4_spec-1.6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0.1/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/google/code/gson/gson/1.7.1/gson-1.7.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient-cache/4.1.2/httpclient-cache-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.1.2/httpmime-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/4.8.1.1/icu4j-4.8.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.6/wstx-asl-3.2.6.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+</classpath>
\ No newline at end of file

Propchange: abdera/abdera2/activities/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: abdera/abdera2/activities/.project
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/.project?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/activities/.project (added)
+++ abdera/abdera2/activities/.project Wed Oct 19 22:33:04 2011
@@ -0,0 +1,17 @@
+<projectDescription>
+  <name>abdera2-activities</name>
+  <comment>JSON Activity Streams Implementation. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+  <projects>
+    <project>abdera2-client</project>
+    <project>abdera2-common</project>
+    <project>abdera2-core</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Propchange: abdera/abdera2/activities/.project
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: abdera/abdera2/activities/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/.settings/org.eclipse.jdt.core.prefs?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/activities/.settings/org.eclipse.jdt.core.prefs (added)
+++ abdera/abdera2/activities/.settings/org.eclipse.jdt.core.prefs Wed Oct 19 22:33:04 2011
@@ -0,0 +1,5 @@
+#Thu Sep 29 16:38:19 PDT 2011
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6

Propchange: abdera/abdera2/activities/.settings/org.eclipse.jdt.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClient.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClient.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClient.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesClient.java Wed Oct 19 22:33:04 2011
@@ -33,31 +33,31 @@ public class ActivitiesClient 
 
   public <T extends Collection<?>>T getCollection(String uri) {
     ActivitiesSession session = newSession();
-    return (T)session.getCollection(uri);
+    return session.<T>getCollection(uri);
   }
   
   public <T extends Collection<?>>T getCollection(String uri, RequestOptions options) {
     ActivitiesSession session = newSession();
-    return (T)session.getCollection(uri,options);
+    return session.<T>getCollection(uri,options);
   }
   
   public <T extends Activity>T getActivity(String uri) {
     ActivitiesSession session = newSession();
-    return (T)session.getActivity(uri);
+    return session.<T>getActivity(uri);
   }
   
   public <T extends Activity>T getActivity(String uri, RequestOptions options) {
     ActivitiesSession session = newSession();
-    return (T)session.getActivity(uri,options);
+    return session.<T>getActivity(uri,options);
   }
   
   public <T extends ASObject>T getObject(String uri) {
     ActivitiesSession session = newSession();
-    return (T)session.getObject(uri);
+    return session.<T>getObject(uri);
   }
   
   public <T extends ASObject>T getObject(String uri, RequestOptions options) {
     ActivitiesSession session = newSession();
-    return (T)session.getObject(uri,options);
+    return session.<T>getObject(uri,options);
   }
 }

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesSession.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesSession.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesSession.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/client/ActivitiesSession.java Wed Oct 19 22:33:04 2011
@@ -15,6 +15,7 @@ import org.apache.abdera2.protocol.clien
 import org.apache.abdera2.protocol.client.ClientResponse;
 import org.apache.abdera2.protocol.client.RequestOptions;
 import org.apache.abdera2.protocol.client.Session;
+import org.joda.time.DateTime;
 
 /**
  * Extension of the base Abdera Client Session that provides utility 
@@ -147,7 +148,7 @@ public class ActivitiesSession 
         base.setEntityTag(etag);
     Date lm = resp.getLastModified();
     if (lm != null)
-        base.setLastModified(lm);
+        base.setLastModified(new DateTime(lm));
     MimeType mt = resp.getContentType();
     if (mt != null)
         base.setContentType(mt.toString());

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/Extra.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/Extra.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/Extra.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/Extra.java Wed Oct 19 22:33:04 2011
@@ -1,9 +1,24 @@
 package org.apache.abdera2.activities.extra;
 
 
+
+import java.util.Comparator;
+
 import org.apache.abdera2.activities.model.ASObject;
+import org.apache.abdera2.activities.model.Activity;
 import org.apache.abdera2.activities.model.IO;
 import org.apache.abdera2.activities.model.Verb;
+import org.apache.abdera2.common.date.DateTimes;
+import org.apache.abdera2.common.selector.AbstractSelector;
+import org.apache.abdera2.common.selector.PropertySelector;
+import org.apache.abdera2.common.selector.Selector;
+import org.joda.time.DateTime;
+
+import com.google.common.base.Equivalence;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+import static com.google.common.base.Preconditions.*;
 
 /**
  * Miscellaneous extensions
@@ -11,6 +26,43 @@ import org.apache.abdera2.activities.mod
 @SuppressWarnings("unchecked")
 public class Extra {
 
+  public static Selector<Activity> usesVerb(Verb verb) {
+    return PropertySelector.<Activity>create(
+      Activity.class, 
+      "getVerb", 
+      Predicates.equalTo(verb));
+  }
+  
+  public static <A extends ASObject>Selector<A> published(Class<A> _class, Predicate<?> predicate) {
+    return PropertySelector.<A>create(
+      _class,
+      "getPublished",
+      predicate);
+  }
+  
+  public static Selector<Activity> activityPublished(Predicate<DateTime> predicate) {
+    return published(Activity.class,predicate);
+  }
+  
+  public static Selector<ASObject> objectPublished(Predicate<DateTime> predicate) {
+    return published(ASObject.class,predicate);
+  }
+  
+  public static <A extends ASObject>Selector<A> updated(Class<A> _class, Predicate<DateTime> predicate) {
+    return PropertySelector.<A>create(
+      _class,
+      "getUpdated",
+      predicate);
+  }
+  
+  public static Selector<Activity> activityUpdated(Predicate<DateTime> predicate) {
+    return updated(Activity.class,predicate);
+  }
+  
+  public static Selector<ASObject> objectUpdated(Predicate<DateTime> predicate) {
+    return updated(ASObject.class,predicate);
+  }
+  
   // As in "Sally purchased the app"
   public static final Verb PURCHASE = new Verb("purchase") {};
   
@@ -185,4 +237,75 @@ public class Extra {
     return anonymousObject("used");
   }
   
+  public static Selector<ASObject> sameIdentity(final ASObject obj) {
+    return new AbstractSelector<ASObject>() {
+      public boolean select(Object item) {
+        checkArgument(item instanceof ASObject);
+        ASObject other = (ASObject) item;
+        return IDENTITY_EQUIVALENCE.equivalent(obj, other);
+      }     
+    };
+  }
+  
+  public static final Equivalence<ASObject> IDENTITY_EQUIVALENCE = identity();
+  
+  /**
+   * Two ASObject's are considered equivalent in identity if 
+   * they share the same objectType and id property
+   * values. 
+   */
+  private static Equivalence<ASObject> identity() {
+    return new Equivalence<ASObject>() {
+      protected boolean doEquivalent(ASObject a, ASObject b) {
+        if (a != null && b == null) return false;
+        if (a == null && b != null) return false;
+        String aot = a.getObjectType();
+        String bot = b.getObjectType();
+        if (aot != null && bot == null) return false;
+        if (aot == null && bot != null) return false; 
+        if (aot != null)
+          if (!aot.equalsIgnoreCase(bot)) return false;
+        String aid = a.getId();
+        String bid = b.getId();
+        if (aid != null && bid == null) return false;
+        if (aid == null && bid != null) return false;
+        if (aid != null)
+          if (!aid.equals(bid)) return false;
+        return true;
+      }
+      protected int doHash(ASObject t) {
+        String id = t.getId();
+        String objectType = t.getObjectType();
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((id == null) ? 0 : id.hashCode());
+        result = prime * result
+            + ((objectType == null) ? 0 : objectType.hashCode());
+        return result;
+      }
+    };
+  }
+  
+  public static final Comparator<ASObject> UPDATED_COMPARATOR = 
+    new UpdatedComparator();
+  public static final Comparator<ASObject> PUBLISHED_COMPARATOR = 
+    new PublishedComparator();
+  
+  private static class UpdatedComparator 
+    extends DateTimes.DateTimeComparator<ASObject> {
+      public int compare(ASObject a1, ASObject a2) {
+        DateTime d1 = a1.getUpdated();
+        DateTime d2 = a2.getUpdated();
+        return innerCompare(d1,d2);
+      }
+  }
+  
+  private static class PublishedComparator 
+    extends DateTimes.DateTimeComparator<ASObject> {
+      public int compare(ASObject a1, ASObject a2) {
+        DateTime d1 = a1.getPublished();
+        DateTime d2 = a2.getPublished();
+        return innerCompare(d1,d2);
+      }
+  }
 }

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/MovieObject.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/MovieObject.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/MovieObject.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/MovieObject.java Wed Oct 19 22:33:04 2011
@@ -5,7 +5,7 @@ import org.apache.abdera2.activities.io.
 import org.apache.abdera2.activities.model.ASObject;
 import org.apache.abdera2.activities.model.MediaLink;
 import org.apache.abdera2.common.anno.Name;
-import org.apache.abdera2.common.date.Duration;
+import org.joda.time.Duration;
 
 /**
  * A simple "objectType":"movie" object that serves primarily as an 

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/PusherCollectionWriter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/PusherCollectionWriter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/PusherCollectionWriter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/extra/PusherCollectionWriter.java Wed Oct 19 22:33:04 2011
@@ -11,6 +11,7 @@ import org.apache.abdera2.common.pusher.
  * and pusher.pushAll methods. The writeHeader and complete methods are 
  * ignored.
  */
+@SuppressWarnings("unchecked")
 public class PusherCollectionWriter 
   implements CollectionWriter {
 
@@ -23,21 +24,25 @@ public class PusherCollectionWriter 
   /**
    * Ignored in this implementation
    */
-  public void writeHeader(ASBase base) {
+  public <X extends CollectionWriter>X writeHeader(ASBase base) {
     // We ignore this in the pusher...
+    return (X)this;
   }
 
-  public void writeObject(ASObject object) {
+  public <X extends CollectionWriter>X writeObject(ASObject object) {
     pusher.push(object);
+    return (X)this;
   }
 
-  public void writeObjects(ASObject... objects) {
+  public <X extends CollectionWriter>X writeObjects(ASObject... objects) {
     for (ASObject object : objects)
       pusher.push(object);
+    return (X)this;
   }
-
-  public void writeObjects(Iterable<ASObject> objects) {
+  
+  public <X extends CollectionWriter>X writeObjects(Iterable<ASObject> objects) {
     pusher.pushAll(objects);
+    return (X)this;
   }
 
   /**

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/BaseAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/BaseAdapter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/BaseAdapter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/BaseAdapter.java Wed Oct 19 22:33:04 2011
@@ -19,7 +19,6 @@ package org.apache.abdera2.activities.io
 
 import java.lang.reflect.Type;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -57,6 +56,7 @@ import org.apache.abdera2.activities.mod
 import org.apache.abdera2.activities.model.objects.ServiceObject;
 import org.apache.abdera2.activities.model.objects.VideoObject;
 import org.apache.abdera2.activities.protocol.ErrorObject;
+import org.joda.time.DateTime;
 
 import com.google.gson.JsonArray;
 import com.google.gson.JsonDeserializationContext;
@@ -87,8 +87,8 @@ public class BaseAdapter 
     map.put("url",IRI.class);
     map.put("fileUrl", IRI.class);
     map.put("gadget", IRI.class);
-    map.put("updated", Date.class);
-    map.put("published", Date.class);
+    map.put("updated", DateTime.class);
+    map.put("published", DateTime.class);
     map.put("lang", Lang.class);
     map.put("icon", MediaLink.class);
     map.put("image", MediaLink.class);
@@ -100,8 +100,8 @@ public class BaseAdapter 
     map.put("address", Address.class);
     map.put("stream", MediaLink.class);
     map.put("fullImage", MediaLink.class);
-    map.put("endTime", Date.class);
-    map.put("startTime", Date.class);
+    map.put("endTime", DateTime.class);
+    map.put("startTime", DateTime.class);
     map.put("mimeType", MimeType.class);
     map.put("rating", Double.class);
     map.put("position", IsoPosition.class);

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateAdapter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateAdapter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateAdapter.java Wed Oct 19 22:33:04 2011
@@ -18,19 +18,16 @@
 package org.apache.abdera2.activities.io.gson;
 
 import java.util.Date;
-
-import org.apache.abdera2.common.date.DateTime;
+import org.joda.time.DateTime;
+import org.joda.time.format.ISODateTimeFormat;
 
 @AdaptedType(Date.class)
 public class DateAdapter
   extends SimpleAdapter<Date> {
-
   protected String serialize(Date t) {
-    return DateTime.format(t);
+    return ISODateTimeFormat.dateTime().print(new DateTime(t));
   }
-
   protected Date deserialize(String v) {
-    return DateTime.parse(v);
+    return DateTime.parse(v).toDate();
   }
-
 }

Added: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateTimeAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateTimeAdapter.java?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateTimeAdapter.java (added)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateTimeAdapter.java Wed Oct 19 22:33:04 2011
@@ -0,0 +1,32 @@
+/*
+ * 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.abdera2.activities.io.gson;
+
+import org.joda.time.DateTime;
+import org.joda.time.format.ISODateTimeFormat;
+
+@AdaptedType(DateTime.class)
+public class DateTimeAdapter
+  extends SimpleAdapter<DateTime> {
+  protected String serialize(DateTime t) {
+    return ISODateTimeFormat.dateTime().print(t);
+  }
+  protected DateTime deserialize(String v) {
+    return DateTime.parse(v);
+  }
+}

Propchange: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DateTimeAdapter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DurationAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DurationAdapter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DurationAdapter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/DurationAdapter.java Wed Oct 19 22:33:04 2011
@@ -17,7 +17,7 @@
  */
 package org.apache.abdera2.activities.io.gson;
 
-import org.apache.abdera2.common.date.Duration;
+import org.joda.time.Duration;
 
 @AdaptedType(Duration.class)
 public class DurationAdapter

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/GsonIO.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/GsonIO.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/GsonIO.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/GsonIO.java Wed Oct 19 22:33:04 2011
@@ -26,8 +26,9 @@ import java.util.Date;
 
 import javax.activation.MimeType;
 
-import org.apache.abdera2.common.date.Duration;
-import org.apache.abdera2.common.date.Interval;
+import org.joda.time.DateTime;
+import org.joda.time.Duration;
+import org.joda.time.Interval;
 import org.apache.abdera2.common.geo.IsoPosition;
 import org.apache.abdera2.common.http.EntityTag;
 import org.apache.abdera2.common.iri.IRI;
@@ -47,6 +48,7 @@ import org.apache.abdera2.activities.mod
 import org.apache.abdera2.activities.model.objects.Mood;
 import org.apache.abdera2.activities.model.objects.PlaceObject;
 
+import com.google.common.collect.Multimap;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.stream.JsonWriter;
@@ -82,8 +84,10 @@ public class GsonIO extends IO {
     gb.registerTypeHierarchyAdapter(Verb.class, new VerbAdapter());
     gb.registerTypeHierarchyAdapter(Lang.class, new LangAdapter());
     gb.registerTypeHierarchyAdapter(ASBase.class,  asbs);  
+    gb.registerTypeHierarchyAdapter(Multimap.class, new MultimapAdapter());
     gb.registerTypeAdapter(ASBase.class, asbs);
     gb.registerTypeAdapter(Date.class, new DateAdapter());
+    gb.registerTypeAdapter(DateTime.class, new DateTimeAdapter());
     gb.registerTypeAdapter(Duration.class, new DurationAdapter());
     gb.registerTypeAdapter(Interval.class, new IntervalAdapter());
     gb.registerTypeAdapter(Activity.class,  asbs);

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/IntervalAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/IntervalAdapter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/IntervalAdapter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/IntervalAdapter.java Wed Oct 19 22:33:04 2011
@@ -17,7 +17,7 @@
  */
 package org.apache.abdera2.activities.io.gson;
 
-import org.apache.abdera2.common.date.Interval;
+import org.joda.time.Interval;
 
 @AdaptedType(Interval.class)
 public class IntervalAdapter

Added: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/MultimapAdapter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/MultimapAdapter.java?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/MultimapAdapter.java (added)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/MultimapAdapter.java Wed Oct 19 22:33:04 2011
@@ -0,0 +1,78 @@
+package org.apache.abdera2.activities.io.gson;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.Map;
+
+import org.apache.abdera2.activities.model.ASBase;
+import org.apache.abdera2.common.misc.ExceptionHelper;
+
+import com.google.common.collect.Multimap;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.JsonPrimitive;
+import com.google.gson.JsonSerializationContext;
+
+@SuppressWarnings({"rawtypes","unchecked"})
+@AdaptedType(Multimap.class)
+public class MultimapAdapter
+  implements GsonTypeAdapter<Multimap> {
+  
+  public Class<Multimap> getAdaptedClass() {
+    return Multimap.class;
+  }
+
+  public JsonElement serialize(
+    Multimap src, 
+    Type typeOfSrc,
+    JsonSerializationContext context) {
+      return context.serialize(src.asMap(), Map.class);
+  }
+
+  public Multimap deserialize(
+    JsonElement json, 
+    Type typeOfT,
+    JsonDeserializationContext context) 
+      throws JsonParseException {
+    Multimap mm = create(typeOfT);
+    JsonObject obj = json.getAsJsonObject();
+    for (Map.Entry<String,JsonElement> entry : obj.entrySet()) {
+      String key = entry.getKey();
+      JsonElement val = entry.getValue();
+      if (val.isJsonArray()) {
+        JsonArray array = val.getAsJsonArray();
+        for (JsonElement el : array) {
+          if (el.isJsonArray()) {       
+          } else if (el.isJsonObject()) {
+            mm.put(key, context.deserialize(el, ASBase.class));
+          } else if (el.isJsonNull()) {
+            mm.put(key, null);
+          } else if (el.isJsonPrimitive()) {
+            JsonPrimitive jp = el.getAsJsonPrimitive();
+            if (jp.isBoolean()) {
+              mm.put(key, jp.getAsBoolean());
+            } else if (jp.isNumber()) {
+              mm.put(key, jp.getAsNumber());
+            } else if (jp.isString()) {
+              mm.put(key, jp.getAsString());
+            }
+          }
+        }
+      }
+    }
+    return mm;
+  }  
+  
+  private static Multimap create(Type typeOfT) {
+    try {
+      Class<Multimap> _class = (Class<Multimap>)typeOfT;
+      Method method = _class.getMethod("create");
+      return (Multimap) method.invoke(_class);
+    } catch (Throwable t) {
+      throw ExceptionHelper.propogate(t);
+    }
+  }
+}

Propchange: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/io/gson/MultimapAdapter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASBase.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASBase.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASBase.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASBase.java Wed Oct 19 22:33:04 2011
@@ -17,11 +17,12 @@
  */
 package org.apache.abdera2.activities.model;
 
+import org.joda.time.DateTime;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Serializable;
 import java.io.Writer;
-import java.util.Date;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -47,6 +48,11 @@ public class ASBase 
   
   public ASBase() {}
   
+  protected <T>Iterable<T> checkEmpty(Iterable<T> i) {
+    return i == null ?
+      Collections.<T>emptySet() : i;
+  }
+  
   public void setLang(Lang lang) {
     setProperty("lang", lang);
   }
@@ -170,7 +176,7 @@ public class ASBase 
   /////// DOCUMENT PROPERTIES ///////
   
   private MimeType contentType;
-  private Date lastModified;
+  private DateTime lastModified;
   private EntityTag entityTag;
   private Lang language;
   private String slug;
@@ -192,11 +198,11 @@ public class ASBase 
     this.contentType = mimeType;
   }
   
-  public Date getLastModified() {
+  public DateTime getLastModified() {
     return lastModified;
   }
   
-  public void setLastModified(Date lastModified) {
+  public void setLastModified(DateTime lastModified) {
     this.lastModified = lastModified;
   }
   

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASObject.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASObject.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASObject.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/ASObject.java Wed Oct 19 22:33:04 2011
@@ -17,15 +17,20 @@
  */
 package org.apache.abdera2.activities.model;
 
-import java.util.Date;
+import org.joda.time.DateTime;
+
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
+import org.apache.abdera2.activities.extra.Extra;
 import org.apache.abdera2.activities.model.objects.Mood;
 import org.apache.abdera2.activities.model.objects.PersonObject;
 import org.apache.abdera2.activities.model.objects.PlaceObject;
 import org.apache.abdera2.common.anno.AnnoUtil;
 import org.apache.abdera2.common.iri.IRI;
+import org.apache.abdera2.common.selector.Selector;
 
 /**
  * Base class for all Activity Streams Objects.
@@ -66,7 +71,7 @@ public class ASObject extends ASBase {
   }
   
   public Iterable<ASObject> getAttachments() {
-    return getProperty(ATTACHMENTS);
+    return checkEmpty((Iterable<ASObject>)getProperty(ATTACHMENTS));
   }
   
   public void setAttachments(Set<ASObject> attachments) {
@@ -125,7 +130,7 @@ public class ASObject extends ASBase {
   }
   
   public Iterable<String> getDownstreamDuplicates() {
-    return getProperty(DOWNSTREAMDUPLICATES);
+    return checkEmpty((Iterable<String>)getProperty(DOWNSTREAMDUPLICATES));
   }
   
   public void setDownstreamDuplicates(Set<String> downstreamDuplicates) {
@@ -172,13 +177,16 @@ public class ASObject extends ASBase {
     
   }
   
-  public Date getPublished() {
+  public DateTime getPublished() {
     return getProperty(PUBLISHED);
   }
   
-  public void setPublished(Date published) {
+  public void setPublished(DateTime published) {
     setProperty(PUBLISHED, published);
-    
+  }
+  
+  public void setPublishedNow() {
+    setPublished(DateTime.now());
   }
   
   public String getSummary() {
@@ -190,17 +198,20 @@ public class ASObject extends ASBase {
     
   }
   
-  public Date getUpdated() {
+  public DateTime getUpdated() {
     return getProperty(UPDATED);
   }
   
-  public void setUpdated(Date updated) {
+  public void setUpdated(DateTime updated) {
     setProperty(UPDATED, updated);
-    
+  }
+  
+  public void setUpdatedNow() {
+    setUpdated(DateTime.now());
   }
   
   public Iterable<String> getUpstreamDuplicates() {
-    return getProperty(UPSTREAMDUPLICATES);
+    return checkEmpty((Iterable<String>)getProperty(UPSTREAMDUPLICATES));
   }
   
   public void setUpstreamDuplicates(Set<String> upstreamDuplicates) {
@@ -228,7 +239,15 @@ public class ASObject extends ASBase {
   }
   
   public Iterable<ASObject> getInReplyTo() {
-    return getProperty(INREPLYTO);
+    return checkEmpty((Iterable<ASObject>)getProperty(INREPLYTO));
+  }
+  
+  public Iterable<ASObject> getInReplyTo(Selector<ASObject> selector) {
+    List<ASObject> list= new ArrayList<ASObject>();
+    for (ASObject obj : getInReplyTo())
+      if (selector.apply(obj))
+        list.add(obj);
+    return list;
   }
   
   public void setInReplyTo(Set<ASObject> inReplyTo) {
@@ -395,4 +414,13 @@ public class ASObject extends ASBase {
     ASBase os = getProperty("openSocial");
     return os.has("embed");
   }
+  
+  /**
+   * Performs an equivalence check. Two ASObjects are equivalent if they
+   * share the same objectType and id property values. All other properties
+   * can be different (e.g. they are different versions of the same object)
+   */
+  public boolean is(ASObject obj) {
+    return Extra.sameIdentity(this).apply(obj);
+  }
 }

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/AbstractCollectionWriter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/AbstractCollectionWriter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/AbstractCollectionWriter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/AbstractCollectionWriter.java Wed Oct 19 22:33:04 2011
@@ -4,6 +4,7 @@ package org.apache.abdera2.activities.mo
  * Base implementation of the CollectionWriter interface.. handles
  * basic flow and state management
  */
+@SuppressWarnings("unchecked")
 public abstract class AbstractCollectionWriter 
   implements CollectionWriter {
 
@@ -20,7 +21,7 @@ public abstract class AbstractCollection
   
   public abstract void complete();
   
-  public void writeHeader(ASBase base) {
+  public <X extends CollectionWriter>X writeHeader(ASBase base) {
     if (_items || _header)
     throw new IllegalStateException();
     if (base != null) {
@@ -33,25 +34,29 @@ public abstract class AbstractCollection
     }
     _header = true;
     flush();
+    return (X)this;
   }
   
-  public void writeObject(ASObject object) {
+  public <X extends CollectionWriter>X writeObject(ASObject object) {
     if (!_items) {
       startItems();
       _items = true;
     }
     writeItem(object);
     flush();
+    return (X)this;
   }
   
-  public void writeObjects(ASObject... objects) {
+  public <X extends CollectionWriter>X writeObjects(ASObject... objects) {
     for (ASObject object : objects)
       writeObject(object);
+    return (X)this;
   }
   
-  public void writeObjects(Iterable<ASObject> objects) {
+  public <X extends CollectionWriter>X writeObjects(Iterable<ASObject> objects) {
     for (ASObject object : objects)
       writeObject(object);
+    return (X)this;
   }
  
 }

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Activity.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Activity.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Activity.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Activity.java Wed Oct 19 22:33:04 2011
@@ -17,14 +17,18 @@
  */
 package org.apache.abdera2.activities.model;
 
-import java.util.Date;
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
+import java.lang.Iterable;
 
 import org.apache.abdera2.activities.model.objects.PersonObject;
 import org.apache.abdera2.activities.model.objects.ServiceObject;
 import org.apache.abdera2.common.anno.Name;
 import org.apache.abdera2.common.iri.IRI;
+import org.apache.abdera2.common.selector.Selector;
+import org.joda.time.DateTime;
 
 /**
  * An Activity. Represents some action that has been taken. At it's core,
@@ -167,13 +171,16 @@ public class Activity extends ASObject {
     setProperty(OBJECT, object);
   }
   
-  public Date getPublished() {
+  public DateTime getPublished() {
     return getProperty(PUBLISHED);
   }
   
-  public void setPublished(Date published) {
+  public void setPublished(DateTime published) {
     setProperty(PUBLISHED, published);
-    
+  }
+  
+  public void setPublishedNow() {
+    setPublished(DateTime.now());
   }
   
   public <E extends ASObject>E getProvider() {
@@ -217,13 +224,16 @@ public class Activity extends ASObject {
     
   }
   
-  public Date getUpdated() {
+  public DateTime getUpdated() {
     return getProperty(UPDATED);
   }
   
-  public void setUpdated(Date updated) {
+  public void setUpdated(DateTime updated) {
     setProperty(UPDATED, updated);
-    
+  }
+  
+  public void setUpdatedNow() {
+    setUpdated(DateTime.now());
   }
   
   public IRI getUrl() {
@@ -281,7 +291,15 @@ public class Activity extends ASObject {
   }
   
   public Iterable<ASObject> getAudience(Audience audience) {
-    return getProperty(audience.label());
+    return checkEmpty((Iterable<ASObject>)getProperty(audience.label()));
+  }
+  
+  public Iterable<ASObject> getAudience(Audience audience, Selector<ASObject> selector) {
+    List<ASObject> list = new ArrayList<ASObject>();
+    for (ASObject obj : getAudience(audience))
+      if (selector.apply(obj))
+        list.add(obj);
+    return list;
   }
   
   public void setAudience(Audience audience, Set<ASObject> set) {

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Collection.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Collection.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Collection.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Collection.java Wed Oct 19 22:33:04 2011
@@ -17,11 +17,14 @@
  */
 package org.apache.abdera2.activities.model;
 
+import java.util.ArrayList;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Set;
 
 import org.apache.abdera2.common.anno.Name;
 import org.apache.abdera2.common.iri.IRI;
+import org.apache.abdera2.common.selector.Selector;
 
 /**
  * An Activity Streams Collection... used as the root object of
@@ -32,7 +35,8 @@ import org.apache.abdera2.common.iri.IRI
  * reference an external Collection document. 
  */
 @Name("collection")
-public class Collection<T extends ASObject> extends ASObject {
+public class Collection<T extends ASObject> 
+  extends ASObject {
 
   private static final long serialVersionUID = 1530068180553259077L;
   public static final String TOTAL_ITEMS = "totalItems";
@@ -57,8 +61,9 @@ public class Collection<T extends ASObje
     setProperty(URL, url);
   }
 
+  @SuppressWarnings("unchecked")
   public Iterable<String> getObjectTypes() {
-    return getProperty(OBJECT_TYPES);
+    return checkEmpty((Iterable<String>)getProperty(OBJECT_TYPES));
   }
   
   public void setObjectTypes(Set<String> types) {
@@ -75,8 +80,17 @@ public class Collection<T extends ASObje
       list.add(objectType);
   }
   
+  public Iterable<T> getItems(Selector<T> selector) {
+    List<T> list = new ArrayList<T>();
+    for (T item : getItems()) 
+      if (selector.apply(item))
+        list.add(item);
+    return list;
+  }
+  
+  @SuppressWarnings("unchecked")
   public Iterable<T> getItems() {
-    return getProperty(ITEMS);
+    return checkEmpty((Iterable<T>)getProperty(ITEMS));
   }
   
   public Iterable<T> getItems(boolean create) {

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/CollectionWriter.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/CollectionWriter.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/CollectionWriter.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/CollectionWriter.java Wed Oct 19 22:33:04 2011
@@ -10,22 +10,22 @@ public interface CollectionWriter {
    * This MUST be called before calling writeObject or writeObjects
    * and cannot be called after calling either of those.
    */
-  void writeHeader(ASBase base);
+  <X extends CollectionWriter>X writeHeader(ASBase base);
   
   /**
    * Writes an object to the items array of the Collection
    */
-  void writeObject(ASObject object);
+  <X extends CollectionWriter>X writeObject(ASObject object);
   
   /**
    * Writes one or more objects to the items array of the Collection
    */
-  void writeObjects(ASObject... objects);
+  <X extends CollectionWriter>X writeObjects(ASObject... objects);
   
   /**
    * Writes one or more objects to the items array of the Collection
    */
-  void writeObjects(Iterable<ASObject> objects);
+  <X extends CollectionWriter>X writeObjects(Iterable<ASObject> objects);
   
   /**
    * Completes the Collection

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Generator.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Generator.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Generator.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/model/Generator.java Wed Oct 19 22:33:04 2011
@@ -1,5 +1,7 @@
 package org.apache.abdera2.activities.model;
 
+import com.google.common.base.Supplier;
+
 /**
  * The Generator is used to create instances of specific
  * types of Activity Objects. They are typically best 
@@ -8,7 +10,7 @@ package org.apache.abdera2.activities.mo
  * activity objects that share a base common set of 
  * properties (e.g. same actor, same provider, same verb, etc)
  */
-public class Generator<T extends ASBase> {
+public class Generator<T extends ASBase> implements Supplier<T> {
 
   private final ASBase template;
   private final Class<T> _class;
@@ -56,6 +58,10 @@ public class Generator<T extends ASBase>
     return t;
   }
   
+  public T get() {
+    return complete();
+  }
+  
   public static interface Copyable {
     Object copy();
   }

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/AbstractActivitiesProvider.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/AbstractActivitiesProvider.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/AbstractActivitiesProvider.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/AbstractActivitiesProvider.java Wed Oct 19 22:33:04 2011
@@ -25,7 +25,7 @@ import org.apache.abdera2.activities.mod
 import org.apache.abdera2.activities.model.Activity;
 import org.apache.abdera2.activities.model.Collection;
 import org.apache.abdera2.activities.model.TypeAdapter;
-import org.apache.abdera2.common.date.DateTime;
+import org.apache.abdera2.common.date.DateTimes;
 import org.apache.abdera2.common.http.EntityTag;
 import org.apache.abdera2.common.mediatype.MimeTypeHelper;
 import org.apache.abdera2.common.protocol.BaseProvider;
@@ -97,7 +97,7 @@ public abstract class AbstractActivities
     if (base instanceof Activity) {
         Activity ac = (Activity)base;
         id = ac.getId();
-        modified = DateTime.format(ac.getUpdated() != null ? ac.getUpdated() : ac.getPublished());
+        modified = DateTimes.format(ac.getUpdated() != null ? ac.getUpdated() : ac.getPublished());
     } else if (base instanceof Collection) {
         Collection<?> col = (Collection<?>)base;
         id = col.getProperty("id");
@@ -106,9 +106,9 @@ public abstract class AbstractActivities
     } else if (base instanceof ASObject) {
         ASObject as = (ASObject)base;
         id = as.getId().toString();
-        modified = DateTime.format(as.getUpdated() != null ? as.getUpdated() : as.getPublished());
+        modified = DateTimes.format(as.getUpdated() != null ? as.getUpdated() : as.getPublished());
     }
-    if (modified == null) modified = DateTime.formatNow();
+    if (modified == null) modified = DateTimes.formatNow();
     return EntityTag.generate(id, modified);
   }
   

Modified: abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/ActivitiesRequestContext.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/ActivitiesRequestContext.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/ActivitiesRequestContext.java (original)
+++ abdera/abdera2/activities/src/main/java/org/apache/abdera2/activities/protocol/ActivitiesRequestContext.java Wed Oct 19 22:33:04 2011
@@ -30,6 +30,7 @@ import org.apache.abdera2.activities.mod
 import org.apache.abdera2.activities.model.TypeAdapter;
 import org.apache.abdera2.common.protocol.BaseRequestContextWrapper;
 import org.apache.abdera2.common.protocol.RequestContext;
+import org.joda.time.DateTime;
 
 public class ActivitiesRequestContext extends BaseRequestContextWrapper {
 
@@ -72,7 +73,7 @@ public class ActivitiesRequestContext ex
         base.setEntityTag(etag);
     Date lm = getDateHeader("Last-Modified");
     if (lm != null)
-        base.setLastModified(lm);
+        base.setLastModified(new DateTime(lm));
     MimeType mt = getContentType();
     if (mt != null)
         base.setContentType(mt.toString());

Added: abdera/abdera2/client/.classpath
URL: http://svn.apache.org/viewvc/abdera/abdera2/client/.classpath?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/client/.classpath (added)
+++ abdera/abdera2/client/.classpath Wed Oct 19 22:33:04 2011
@@ -0,0 +1,23 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="target/maven-shared-archive-resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="src" path="/abdera2-common"/>
+  <classpathentry kind="src" path="/abdera2-core"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ws/commons/axiom/axiom-api/1.2.12/axiom-api-1.2.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ws/commons/axiom/axiom-impl/1.2.12/axiom-impl-1.2.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.5/commons-codec-1.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.6/geronimo-javamail_1.4_spec-1.6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0.1/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient-cache/4.1.2/httpclient-cache-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.1.2/httpmime-4.1.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/4.8.1.1/icu4j-4.8.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.6/wstx-asl-3.2.6.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+</classpath>
\ No newline at end of file

Propchange: abdera/abdera2/client/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: abdera/abdera2/client/.project
URL: http://svn.apache.org/viewvc/abdera/abdera2/client/.project?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/client/.project (added)
+++ abdera/abdera2/client/.project Wed Oct 19 22:33:04 2011
@@ -0,0 +1,16 @@
+<projectDescription>
+  <name>abdera2-client</name>
+  <comment>Atom Publishing Protocol Client Implementation. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+  <projects>
+    <project>abdera2-common</project>
+    <project>abdera2-core</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Propchange: abdera/abdera2/client/.project
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: abdera/abdera2/client/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/abdera/abdera2/client/.settings/org.eclipse.jdt.core.prefs?rev=1186541&view=auto
==============================================================================
--- abdera/abdera2/client/.settings/org.eclipse.jdt.core.prefs (added)
+++ abdera/abdera2/client/.settings/org.eclipse.jdt.core.prefs Wed Oct 19 22:33:04 2011
@@ -0,0 +1,5 @@
+#Thu Sep 29 16:38:18 PDT 2011
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6

Propchange: abdera/abdera2/client/.settings/org.eclipse.jdt.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/AbderaClientResponseImpl.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/AbderaClientResponseImpl.java?rev=1186541&r1=1186540&r2=1186541&view=diff
==============================================================================
--- abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/AbderaClientResponseImpl.java (original)
+++ abdera/abdera2/client/src/main/java/org/apache/abdera2/protocol/client/AbderaClientResponseImpl.java Wed Oct 19 22:33:04 2011
@@ -28,6 +28,7 @@ import org.apache.abdera2.model.Element;
 import org.apache.abdera2.parser.ParseException;
 import org.apache.abdera2.parser.Parser;
 import org.apache.abdera2.parser.ParserOptions;
+import org.joda.time.DateTime;
 
 class AbderaClientResponseImpl 
   extends ClientResponseWrapper implements AbderaClientResponse {
@@ -77,7 +78,7 @@ class AbderaClientResponseImpl 
           doc.setEntityTag(etag);
       Date lm = getLastModified();
       if (lm != null)
-          doc.setLastModified(lm);
+          doc.setLastModified(new DateTime(lm));
       MimeType mt = getContentType();
       if (mt != null)
           doc.setContentType(mt.toString());



Mime
View raw message