[georss] java Rome georss plugin failing to consume georss simple
Marc
marc at geonames.org
Sat Dec 9 02:38:44 EST 2006
Hi Nathan
Which version of the georss module are you using? A trailing slash issue
should have been removed in version 0.8.5.
Cheers
Marc
Nathan Heminger wrote:
>
> Hello,
>
> Does anyone know of any problems consuming georss simple feeds? I am
> having issues with georss simple feeds. Interestingly, I do not have
> any problems with the the other types.
>
> I do the following to get the feed:
>
> feed = input.build(
>
> *new* XmlReader(*new* URL(url)));
>
> and then I try to retrieve the GeoRSSModule on each entry:
>
> GeoRSSModule geoRSSModule = GeoRSSUtils./getGeoRSS/(entry);
>
> However, the module is returning null. I have tried tracing the
> problem, and it appears that input.build is not returning the entries
> with a geomodule for each. It appears only the dcmodule is in the
> module list for each entry.
>
>
> parseModules() in com.sun.syndication.io.imp.ModuleParsers however
> seems to find the geomodule fine. Right before a module is added, I
> output the module:
>
> System.
>
> /out/.println("adding module: " + module);
>
> modules.add(module);
>
> and this prints:
>
>
> adding module: SimpleModuleImpl.longitude=-0.331478
>
> SimpleModuleImpl.uri=http://www.georss.org/georss/
>
> SimpleModuleImpl.interface=interface
> com.sun.syndication.feed.module.georss.GeoRSSModule
>
> SimpleModuleImpl.latitude=51.425972
>
> which leads me to believe the module parser is working fine.
>
> I have tracked the problem even further, and found that in
> com.sun.syndication.feed.module.Module.ModuleUtils.getModule(List
> modules,String uri) I am getting a conflict. This is what the code
> looks like (debugging system.out.println statement added):
> *public* *static* Module getModule(List modules,String uri) {
>
> Module module =
>
> *null*; *for* (*int* i=0;module==*null * && modules!=*null* &&
> i<modules.size();i++) {
>
> module = (Module) modules.get(i);
>
> System.
>
> /out/.println("doing comparison: module.getUri().equals(uri)) " +
> module.getUri().equals(uri) + " with uris: " + module.getUri() + " and
> " + uri); *if* (!module.getUri().equalsIgnoreCase(uri)) {
>
> module =
>
> *null*;
>
> }
>
> }
>
> *return* module;
>
> }
>
> This prints out the following:
>
> doing comparison: module.getUri().equals(uri)) true with uris:
> http://purl.org/dc/elements/1.1/ and http://purl.org/dc/elements/1.1/
> <http://purl.org/dc/elements/1.1/>
>
> doing comparison: module.getUri().equals(uri)) false with uris:
> http://purl.org/dc/elements/1.1/ and http://www.georss.org/georss
> <http://www.georss.org/georss>
>
> doing comparison: module.getUri().equals(uri)) false with uris:
> http://www.georss.org/georss/ and http://www.georss.org/georss
>
> As you can see, one of the urls has an extra "/" at the end.
>
> In
>
> com.sun.syndication.feed.module.georss.GeoRSSModule, I see the field is:
>
> public static final String GEORSS_GEORSS_URI =
> "http://www.georss.org/georss";
>
> and in the actual feed I find the uri is:
>
> xmlns:georss="*http://www.georss.org/georss* " xmlns:gml="*
> http://www.opengis.net/gml*">
>
> Where is this extra "/" coming from? Which is correct,
> http://www.georss.org/georss or http://www.georss.org/georss?
>
> The specific feed I am currently testing is:
> http://www.edparsons.com/?feed=rss2
>
> and it validates (albiet with warnings) using the W3C Validator:
> http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.edparsons.com%2F%3Ffeed%3Drss2
> <http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.edparsons.com%2F%3Ffeed%3Drss2>
>
>
> Is there anything I am missing has anyone else had this problem?
>
> Thanks.
> ------------------------------------------------------------------------
>
> _______________________________________________
> georss mailing list
> georss at lists.eogeo.org
> http://lists.eogeo.org/mailman/listinfo/georss
>
More information about the georss
mailing list