oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattmann, Chris A (388J)" <chris.a.mattm...@jpl.nasa.gov>
Subject Re: OODT-402 progress update
Date Sat, 12 May 2012 17:13:13 GMT
Hey Ross,

On May 11, 2012, at 12:29 AM, Ross Laidlaw wrote:

> Hi Chris,
> On 11 May 2012 06:01, Mattmann, Chris A (388J)
> <chris.a.mattmann@jpl.nasa.gov> wrote:
>> Hey Ross,
>> Either one would be +1 for me -- if you make it easily configurable, and changeable,
>> that would be even better!
>> Cheers,
>> Chris
> I had a go at implementing the configurable namespaces idea and I have
> something that seems to be working!  I added a comment to OODT-449
> with a draft implementation that processes namespace tags in the RSS
> config.  If you like, I could move the comment over to a separate task
> and upload a patch to it.

Yep, +1 to creating a separate task and this sounds like great progress!

> With the implementation, it would be possible to add the cas namespace
> as well to the RSS config file and this will be picked up in the <rss>
> tag of the output.  For example, as follows:
> <namespace prefix="cas" uri="http://oodt.apache.org/components/cas" />


> In theory, this means that the cas namespace wouldn't have to be
> hard-coded in the RSS java classes.  But there might be a couple of
> related things to tidy up:
> 1) Do we still need the cas namespace definition at the top of the RSS
> config file?  This one is an inline definition for the cas:rssconf tag
> itself and not for the output tags:
> <cas:rssconf xmlns:cas="http://oodt.apache.org/components/cas">

I would like to keep the cas namespace since it's really cas config and
to me, declaring the namespace there solidified that for me. Is there any 
specific reason to remove it?

> 2) Two RSS java classes have hard-coded 'cas' namespace info:
> RSSProductServlet.java and RSSProductTransferServlet.java.  These
> classes both use a class variable to store namespaces and write them
> to the output:
> private static final Map NS_MAP = new HashMap();
> static { NS_MAP.put("cas", "http://oodt.jpl.nasa.gov/1.0/cas"); }
> ...
> XMLUtils.addAttribute(doc, rss, "xmlns:cas", (String) NS_MAP.get("cas"));
> I think in RSSProductServlet.java, we could remove this and read it
> from the RSS config instead, but how about
> RSSProductTransferServlet.java?  I'm not sure about that one because
> it doesn't appear to access the RSS config file.

+1 to make it use RSSConfig in both the ProductServlet and the TransferServlet.

Also if you're feeling ambitious, a separate issue is to turn those 2 services
into JAX-RS services using CXF :) You can find examples of how to do that
in CAS curator (see its services) but it's really a separate issue. I just
wanted to whet your whistle b/c you are doing so great! :)

> Many thanks again for your time and guidance!

Anytime Ross! You are super full of win!


Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA

View raw message