abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alistair Miles <aliman...@googlemail.com>
Subject categories.getCategoriesWithScheme(String) behaviour
Date Fri, 18 Feb 2011 09:41:05 GMT
Hi folks,

I just tried to use the getCategoriesWithScheme(String) method on the
Categories interface in Abdera 1.1.1. I have a collection like:

    <atom:title type="text">Projects</atom:title>
    <atom:summary type="text">All projects.</atom:summary>
    <app:categories scheme="http://purl.org/net/datarepo/type/" fixed="yes">
        <atom:category term="http://purl.org/net/datarepo/type/Project" label="Project"/>

I called getCategoriesWithScheme("http://purl.org/net/datarepo/type/")
expecting to get the "Project" category, but got none. The Abdera javadoc
claims that "child categories that do not have a scheme attribute inherit
the scheme attribute of the parent" however I believe that this is not
implemented in Abdera 1.1.1 and only categories with an explicit @scheme
attribute will match.

Also, there are both getCategories(String scheme) and
getCategoriesWithScheme(String scheme) on the Categories interface, it's not
clear how these are different, and looking at FOMCategories [1] one does call
the other, although the latter makes a copy whereas the former doesn't. All
a bit confusing.



[1] http://svn.apache.org/repos/asf/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
United Kingdom
Web: http://purl.org/net/aliman
Email: alimanfoo@gmail.com
Tel: +44 (0)1865 287669

View raw message