abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Dupriez <christophe.dupr...@destin.be>
Subject Re: Where are DefaultProvider and SimpleWorkspaceInfo?
Date Mon, 26 Mar 2012 06:34:51 GMT
I use the JARs provided for running/developing ABDERA 1.2
    and I use the SVN to have an Eclipse project (that I only read) with 
the source code:
http://svn.apache.org/repos/asf/abdera/java/trunk

In my mavenized project, I use the following dependencies definitions:
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-client</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-server</artifactId>
<version>1.1.2</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-extensions-opensearch</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-extensions-json</artifactId>
<version>1.1.2</version>
</dependency>

To give a glimpse of my integration work (5 big days):
/scheme/src/main/java/be/destin/abdera/AbstractCorrectedCollectionAdapter.java
/scheme/src/main/java/be/destin/abdera/AbstractCorrectedWorkspaceProvider.java
/scheme/src/main/java/be/destin/abdera/AskosiProviderServlet.java
/scheme/src/main/java/be/destin/abdera/ConceptCollectionAdapter.java
/scheme/src/main/java/be/destin/abdera/ConceptProvider.java
/scheme/src/main/java/be/destin/abdera/ConceptSearchUrlAdapter.java
/scheme/src/main/java/be/destin/abdera/EntryLinksRequestProcessor.java
/scheme/src/main/java/be/destin/abdera/MemoCollectionAdapter.java
/scheme/src/main/java/be/destin/abdera/MemoProviderServlet.java
/scheme/src/main/java/be/destin/abdera/MultiCollectionOpenSearchUrlRequestProcessor.java

and the supported URLs definitions are aligned on the OpenSearch and 
(partially) on the OData specifications.
 From AbstractedCorrectedWorkspaceProvider:
         // The target resolver provides the URL path mappings
         setTargetResolver(
                 new RegexTargetResolver()
                 .setPattern('/'+base+"/?", TargetType.TYPE_SERVICE)
                 .setPattern('/'+base+"/opensearch\\.osdx(#.*)?", 
OpenSearchTargetTypes.OPENSEARCH_DESCRIPTION)
                 .setPattern('/'+base+"/?\\?[^#]*(#.*)?", 
OpenSearchTargetTypes.OPENSEARCH_URL)
                 
.setPattern('/'+base+"/([^./#?;_()]+);categories(#.*)?", 
TargetType.TYPE_CATEGORIES, BasicProvider.PARAM_FEED)
                 .setPattern('/'+base+"/([^./#?;_()]+)\\?[^#]*(#.*)?", 
OpenSearchTargetTypes.OPENSEARCH_URL, BasicProvider.PARAM_FEED)
                 .setPattern('/'+base+"/([^./#?;_()]+)(#.*)?", 
TargetType.TYPE_COLLECTION, BasicProvider.PARAM_FEED)
                 
.setPattern('/'+base+"/([^./#?;_()]+)\\(([^/#?()]+)\\)(#.*)?", 
TargetType.TYPE_ENTRY, BasicProvider.PARAM_FEED, BasicProvider.PARAM_ENTRY)
                 
.setPattern('/'+base+"/([^./#?;_()]+)/([^/#?()]+)(#.*)?", 
TargetType.TYPE_ENTRY, BasicProvider.PARAM_FEED, BasicProvider.PARAM_ENTRY)
                 
.setPattern('/'+base+"/([^./#?;_()]+)_([^/#?()]+)(#.*)?", 
TargetType.TYPE_ENTRY, BasicProvider.PARAM_FEED, BasicProvider.PARAM_ENTRY)
                 
.setPattern('/'+base+"/([^./#?;_()]+)\\(([^/#?()]+)\\)/\\$links/([^/#?()]+)(#.*)?", 
AbstractCorrectedCollectionAdapter.TYPE_ENTRY_LINKS, 
BasicProvider.PARAM_FEED, 
BasicProvider.PARAM_ENTRY,AbstractCorrectedCollectionAdapter.PARAM_NAVIGATION)
                 
.setPattern('/'+base+"/([^./#?;_()]+)\\(([^/#?()]+)\\)/\\$links/([^/#?()]+)(\\?[^#]*)(#.*)?",

OpenSearchTargetTypes.OPENSEARCH_URL, BasicProvider.PARAM_FEED, 
BasicProvider.PARAM_ENTRY,AbstractCorrectedCollectionAdapter.PARAM_NAVIGATION)
                 );

         // The target builder is used to construct url's for the 
various targets
         setTargetBuilder(
                 new TemplateTargetBuilder()
                 .setTemplate(TargetType.TYPE_SERVICE, "{target_base}/")
                 .setTemplate(TargetType.TYPE_COLLECTION, 
"{target_base}/{collection}{-opt|?|"+PARAM_LIST+"}{-join|&|"+PARAM_LIST+"}")
                 .setTemplate("feed", 
"{target_base}/{collection}{-opt|?|"+PARAM_LIST+"}{-join|&|"+PARAM_LIST+"}")
                 .setTemplate(TargetType.TYPE_CATEGORIES, 
"{target_base}/{collection};categories")
                 .setTemplate(TargetType.TYPE_ENTRY, 
"{target_base}/{collection}({entry})")
                 
.setTemplate(AbstractCorrectedCollectionAdapter.TYPE_ENTRY_LINKS, 
"{target_base}/{collection}({entry})/$links/{navigation}{-opt|?|"+PARAM_LIST+"}{-join|&|"+PARAM_LIST+"}")
                 
.setTemplate(OpenSearchTargetTypes.OPENSEARCH_DESCRIPTION, 
"{target_base}/opensearch.osdx")
                 .setTemplate(OpenSearchTargetTypes.OPENSEARCH_URL, 
"{target_base}/{collection}{target_entry}{-opt|?|"+PARAM_LIST+"}{-join|&|"+PARAM_LIST+"}")
         );

When it will be field tested, I could contribute it to the community 
(support for set navigation, OpenSearch, partial OData).
The most interesting is the other side: the Atom result set browser in 
JavaScript...

Hope this helps!

Christophe

Le 26/03/2012 07:17, David Ventimiglia a écrit :
> > From where do I download the source code?  The only hint of source I
> see on the Abdera website is the Subversion repository, but presumably
> that's getting something like the latest, and in any event builds with
> a version of 1.2-SNAPSHOT.  But in my project, I'm using 1.1.2, partly
> because that's the most recent version I saw at search.maven.org.
> Where do I see the source code for 1.1.2?
>
> I ask partly because of this problem.  I tried Chad's tutorial, and it
> worked perfectly.  Except, when I don't add the
> EmployeeCollectionAdapter to the Workspace, I then get a NPE deep in
> Abdera, and having the source would help me understand why.
>
> You might ask why I'm not adding the EmployeeCollectionAdapter to the
> Workspace.  But, how else then do you have a Workspace that has no
> Collections?
>
> Thanks!
> David
>
> On Sun, Mar 25, 2012 at 1:45 AM, Christophe Dupriez
> <christophe.dupriez@destin.be>  wrote:
>> I would even say that the only reliable  "documentation" is the source code
>> itself.
>> You download full Abdera source code and you search in it when you have a
>> question.
>> Googling will not help you a lot. I took a week to make a server:
>> I derived most classes to add the necessary code to "fill the holes" but I
>> succeeded to resist the temptation of modifying Abdera code itself.
>>
>> So get the source, plan a week and write your specs: you will be able to
>> fold Abdera to your whim.
>>
>> Christophe
>> @ChristopheDupri
>>
>> P.S. If anybody is interested in cooperating around an Atom/RSS Javascript
>> client, please let me know!
>> I started one from Tuscany Javascript Client + jQuery faceting plugin.
>>
>> Le 25/03/2012 04:37, Chad Lung a écrit :
>>
>>> Unfortunately the only ones I've ever seen are the 1.1.1 docs - I don't
>>> think the 1.1.2 docs were ever posted.
>>>
>>> Chad
>>>
>>>
>>>
>>> On Sat, Mar 24, 2012 at 6:50 PM, David
>>> Ventimiglia<dventimi@gmail.com>wrote:
>>>
>>>> Thans, Chad.  Do you know of anywhere I can find the JavaDoc API for
>>>> the latest version of Abdera, (1.1.2, I guess)?  The API linked off of
>>>> abdera.apache.org must be out-of-date.  Like I said, some of the
>>>> classes in your tutorials (as in the tutorial on abdera.apache.org)
>>>> are not in those docs.
>>
>


Mime
View raw message