Return-Path: Delivered-To: apmail-incubator-abdera-user-archive@locus.apache.org Received: (qmail 95728 invoked from network); 30 Apr 2008 15:11:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2008 15:11:46 -0000 Received: (qmail 72903 invoked by uid 500); 30 Apr 2008 15:11:47 -0000 Delivered-To: apmail-incubator-abdera-user-archive@incubator.apache.org Received: (qmail 72880 invoked by uid 500); 30 Apr 2008 15:11:47 -0000 Mailing-List: contact abdera-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-user@incubator.apache.org Delivered-To: mailing list abdera-user@incubator.apache.org Received: (qmail 72869 invoked by uid 99); 30 Apr 2008 15:11:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 08:11:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.124.50.160] (HELO a2s8.a2hosting.com) (209.124.50.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2008 15:10:50 +0000 Received: from [204.19.213.64] (helo=Arrova001) by a2s8.a2hosting.com with esmtpa (Exim 4.68) (envelope-from ) id 1JrDxe-0006E4-Rv for abdera-user@incubator.apache.org; Wed, 30 Apr 2008 11:11:11 -0400 Reply-To: From: "Remy Gendron" To: References: <0BF456F6B50C4C109DEF1F86B511C231@Arrova001> <1B69D090FD5E444FB1EAEC09E6A6584D@Arrova001> In-Reply-To: Subject: RE: Categories example Date: Wed, 30 Apr 2008 11:11:06 -0400 Organization: Le Groupe Arrova Inc. Message-ID: <349B69628E094E469285D26241821022@Arrova001> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 Thread-Index: AciqlvrSwMHjbMenQ2qUuZ9NlhOi1gAPR1Tw X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s8.a2hosting.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - arrova.ca X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org I've added a route of type COLLECTION using Google GDATA approach (base = + ":collection/-/:categories"). Now, the resolver returns the :categories variable in Target.params. I = just .split("/") this value to get the list of targeted categories. Thanks all for your insights. =20 R=E9my =20 =20 remy.gendron@arrova.ca =20 418 809-8585 http://arrova.ca =20 -----Original Message----- From: David Calavera [mailto:david.calavera@gmail.com]=20 Sent: April 30, 2008 03:51 To: abdera-user@incubator.apache.org; remy@arrova.ca Subject: Re: Categories example I don't know if it's the best practice but I usually add another route = with categories as part of the url: .addRoute("feed", base + "*:collection/category/:cat*", TargetType.TYPE_COLLECTION) I think this approach is more user friendly On Tue, Apr 29, 2008 at 11:00 PM, Remy Gendron wrote: > Ok I have found in the Abdera unit tests and examples some code that > indicates that the following url should return the list of categories > associated to the specified entry: > > http://localhost:8080/imdb/atom/movies/630226;categories > > What I am trying to understand is the URL scheme to use to request the > collection of movies that are part of say, both the scifi and top100 > categories. > > Of course, I could do something like .../movies?cat=3Dscifi&top100, = but I > believe the best practice is to specify the categories as part of the = URL > path... Am I right? > > Remy > > > > -----Original Message----- > From: Remy Gendron [mailto:remy@arrova.ca] > Sent: April 29, 2008 15:52 > To: abdera-user@incubator.apache.org > Subject: RE: Categories example > > And just to be clear, I understand the Atom spec of the categories > document, > and how categories can be added to an entry, be it on the server side > (Entry.addCategory) or the client side (atom:category element). > > I need to understand how it relates to URIs... > > Thanks, > > > R=E9my > > > > remy.gendron@arrova.ca > > 418 809-8585 > http://arrova.ca > > > -----Original Message----- > From: Remy Gendron [mailto:remy@arrova.ca] > Sent: April 29, 2008 15:40 > To: abdera-user@incubator.apache.org > Subject: RE: Categories example > > More questions: > > I see that AbstractProvider will call the adapter's getCategories on a = GET > for entries that are part of one or more categories: > > Question 1) I cannot decipher from the Route implementation how you > specify > one of more categories for a feed request. Could you provide expansion > examples for base/:collection/:entry;categories, as defined in > DefaultProvider. > > Question 2) I use AbstractEntityCollectionAdapter. Is there proper > integration for categories support with this entity oriented adapter? > > Question 3) On a getEntries, I know how to fetch the parameters from = the > request and use them to fetch the entries. Assuming that getCategories = is > called, do I only have to retrieve the categories from the URL path = and > fetch the matching entries? > > Is the scheme used to specify the categories (which I don't know at = the > moment - see question 1) part of some Atom specifications? How does = this > compare with the GDATA path/-/category/category/... scheme? > > I have seen in the Abdera codebase how to add category info to a feed. > That > part is clearer. > > Thanks again, > > R=E9my > > > > remy.gendron@arrova.ca > > 418 809-8585 > http://arrova.ca > > > -----Original Message----- > From: Remy Gendron [mailto:remy@arrova.ca] > Sent: April 29, 2008 14:54 > To: abdera-user@incubator.apache.org > Subject: Categories example > > I was looking for an example of dealing with categories. > > > > I am using the DefaultProvider implementation, hence the RouteManager, > which > defines a route I have trouble interpreting. How would the URL to = access a > collection category look like? > > > > What is the contract of the AbstractCollectionAdapter with regard to > category support (getCategories(RequestContext)). > > > > Thanks, > > > > > > R=E9my > > > > > > > -- > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 269.23.6/1403 - Release Date: > 29/04/2008 > 7:26 AM > > > > -- > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 269.23.6/1403 - Release Date: > 29/04/2008 > 7:26 AM > > > --=20 David Calavera http://www.thinkincode.net