You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Ross Laidlaw (JIRA)" <ji...@apache.org> on 2012/04/27 19:12:49 UTC

[jira] [Created] (OODT-449) Create the default GeoRSS configuration file

Ross Laidlaw created OODT-449:
---------------------------------

             Summary: Create the default GeoRSS configuration file
                 Key: OODT-449
                 URL: https://issues.apache.org/jira/browse/OODT-449
             Project: OODT
          Issue Type: Sub-task
          Components: file manager
            Reporter: Ross Laidlaw
             Fix For: 0.5


Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.

The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.

Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271120#comment-13271120 ] 

Ross Laidlaw commented on OODT-449:
-----------------------------------

I've been experimenting with some ideas to implement Paul's suggestion for namespaces.  I have a solution that appears to be working.  Here are the steps I took:

1) Added Paul's namespace tags to the georss-config.xml file, as follows:

{code}
<namespace prefix="geo" uri="http://www.w3.org/2003/01/geo/wgs84_pos#" />
<namespace prefix="georss" uri="http://www.georss.org/georss" />
<namespace prefix="gml" uri="http://www.opengis.net/gml" />
{code}


2) Created a new RSSNamespace class, which is very similar to the RSSTag class:

{code}
package org.apache.oodt.cas.product.rss;

public class RSSNamespace 
{
  private String prefix;
  private String uri;

  public RSSNamespace() { }

  public String getPrefix() { return prefix; }
  public void setPrefix(String prefix) { this.prefix = prefix;}

  public String getUri() { return uri; }
  public void setUri(String uri) { this.uri = uri; }
}
{code}


3) Modified the RSSConfig class to add a list to store namespaces:

* added new instance variable namespaces:

{code}
private List<RSSNamespace> namespaces;
{code}


* added assignment to the constructor:

{code}
this.namespaces = new Vector<RSSNamespace>();
{code}


* added getter and setter methods for the namespaces instance variable:

{code}
public List<RSSNamespace> getNamespaces() { return namespaces; }
public void setNamespaces(List<RSSNamespace> namespaces) { this.namespaces = namespaces; }
{code}


4) Added new constants to the RSSConfigReaderMetKeys interface:

{code}
public static final String NAMESPACE_TAG = "namespace";
public static final String NAMESPACE_ATTR_PREFIX = "prefix";
public static final String NAMESPACE_ATTR_URI = "uri";
{code}


5) Updated the RSSConfigReader class to read in the namespace tags:

* added readNamespaces() method to RSSConfigReader

{code}
protected static void readNamespaces(Element root, RSSConfig conf) {
  NodeList namespaceList = root.getElementsByTagName(NAMESPACE_TAG);
  if (namespaceList != null && namespaceList.getLength() > 0) {
    for (int i = 0; i < namespaceList.getLength(); i++) {
      Element namespaceElem = (Element) namespaceList.item(i);
      RSSNamespace namespace = new RSSNamespace();
      namespace.setPrefix(namespaceElem.getAttribute(NAMESPACE_ATTR_PREFIX));
      namespace.setUri(namespaceElem.getAttribute(NAMESPACE_ATTR_URI));
      conf.getNamespaces().add(namespace);
    }
  }
}
{code}


* added call to readNamespaces before the call to readTags in the readConfig method

{code}
public static RSSConfig readConfig(File file) throws FileNotFoundException {
  ...
  readNamespaces(rootElem, conf);
  readTags(rootElem, conf);
  ...
}
{code}


6) Updated the doIt() method in the RSSProductServlet class to process the list of namespace tags and add any namespaces to the rss tag of the output:

{code}
public void doIt(HttpServletRequest req, HttpServletResponse resp) 
  throws ServletException, java.io.IOException 
{
  ...

  if (products != null && products.size() > 0) 
  {
    ...
    try 
    {
      ...
      Element rss = XMLUtils.addNode(doc, doc, "rss");
      XMLUtils.addAttribute(doc, rss, "version", "2.0");
      XMLUtils.addAttribute(doc, rss, "xmlns:cas", (String) NS_MAP.get("cas"));
        
      for (RSSNamespace namespace : this.conf.getNamespaces()) 
      {
        XMLUtils.addAttribute(doc, rss, "xmlns:" + namespace.getPrefix(), namespace.getUri());
      }
      ...
    }
  }
}
{code}


7) Tested the output:

The results showed that the namespaces defined in georss-config.xml are now being added to the 'rss' tag of the output, as follows:

{code}
<rss xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas" 
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" 
     xmlns:georss="http://www.georss.org/georss" 
     xmlns:gml="http://www.opengis.net/gml" version="2.0">
{code}

                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ross Laidlaw resolved OODT-449.
-------------------------------

    Resolution: Fixed
    
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>         Attachments: OODT-449.rlaidlaw.2012-05-15.patch.txt
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Paul Ramirez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263940#comment-13263940 ] 

Paul Ramirez commented on OODT-449:
-----------------------------------

You could put an update in the config to support addition of namespaces on the root tag. Maybe something like:

<namespace prefix="geo" uri="http://www.w3.org/2003/01/geo/wgs84_pos#" />
<namespace prefix="georss" uri="http://www.georss.org/georss" />
<namespace prefix="gml" uri="http://www.opengis.net/gml" />
                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ross Laidlaw updated OODT-449:
------------------------------

    Summary: Create a default GeoRSS configuration file for the fmprod web application  (was: Create the default GeoRSS configuration file)
    
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ross Laidlaw updated OODT-449:
------------------------------

    Fix Version/s:     (was: 0.5)
                   0.4
         Assignee: Ross Laidlaw
    
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>            Assignee: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.4
>
>         Attachments: OODT-449.rlaidlaw.2012-05-15.patch.txt
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264199#comment-13264199 ] 

Chris A. Mattmann commented on OODT-449:
----------------------------------------

+1 to Paul's suggestion, or alternatively, the inline version on each tag is also fine with me :) KISS principles apply. Great work, Ross!
                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263955#comment-13263955 ] 

Ross Laidlaw commented on OODT-449:
-----------------------------------

Hi Paul, great suggestion!  I'll have a go at implementing and testing it.
                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263912#comment-13263912 ] 

Ross Laidlaw commented on OODT-449:
-----------------------------------

I also experimented with adding the following code for the rss element in the RSSProductServlet class:

{code}
XMLUtils.addAttribute(doc, rss, "xmlns:geo", "http://www.w3.org/2003/01/geo/wgs84_pos#");
XMLUtils.addAttribute(doc, rss, "xmlns:georss", "http://www.georss.org/georss");
XMLUtils.addAttribute(doc, rss, "xmlns:gml", "http://www.opengis.net/gml");
{code}

This resulted in adding the namespace definitions to the 'rss' tag of the output, for example as follows:

{code}
<rss xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
     xmlns:georss="http://www.georss.org/georss"
     xmlns:gml="http://www.opengis.net/gml"
     version="2.0">
{code}

But this information would then be hard-coded and consequently all RSS outputs from fmprod would contain these namespaces, even if they did not concern files from the LocationAwareProduct family and did not have location meta-data.  So perhaps this is not the ideal solution.
                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ross Laidlaw updated OODT-449:
------------------------------

    Attachment: OODT-449.rlaidlaw.2012-05-15.patch.txt

Here's the patch to create a georss-config.xml file in the src/main/resources directory of the CAS REST ('fmprod') webapp.
                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>         Attachments: OODT-449.rlaidlaw.2012-05-15.patch.txt
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create the default GeoRSS configuration file

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263861#comment-13263861 ] 

Ross Laidlaw commented on OODT-449:
-----------------------------------

I recently tested out a [demo connection|https://cwiki.apache.org/confluence/display/SIS/OODT+File+Manager+to+SIS+Connection+Demo] between the File Manager and SIS using the RSS service of the fmprod web application.  I configured the RSS output of fmprod by adding the following XML tag definitions to 'rssconf.xml':

{code}
<tag name="geo:lat" source="[Latitude]">
  <attribute name="xmlns:geo" value="http://www.w3.org/2003/01/geo/wgs84_pos#" />
</tag>
<tag name="geo:long" source="[Longitude]">
  <attribute name="xmlns:geo" value="http://www.w3.org/2003/01/geo/wgs84_pos#" />
</tag>
{code}

This produced tags in the RSS outputs from fmprod similar to the following:

{code}
<geo:lat xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"> [Latitude] </geo:lat>
<geo:long xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"> [Longitude] </geo:long>
{code}

This was sufficient to get the demo working.  But I felt that there must be a more elegant way to declare the 'geo' namespace rather than as an inline attribute for the 'lat' and 'lon' tags.  Plus I'm sure that we'll require other tags and namespaces, for example 'georss' for <georss:point> tags.

I'll look into these ideas and post my findings and any questions to this ticket.
                
> Create the default GeoRSS configuration file
> --------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OODT-449) Create a default GeoRSS configuration file for the fmprod web application

Posted by "Ross Laidlaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283334#comment-13283334 ] 

Ross Laidlaw commented on OODT-449:
-----------------------------------

I have committed the patch in r1342518.
                
> Create a default GeoRSS configuration file for the fmprod web application
> -------------------------------------------------------------------------
>
>                 Key: OODT-449
>                 URL: https://issues.apache.org/jira/browse/OODT-449
>             Project: OODT
>          Issue Type: Sub-task
>          Components: file manager
>            Reporter: Ross Laidlaw
>              Labels: gsoc2012
>             Fix For: 0.5
>
>         Attachments: OODT-449.rlaidlaw.2012-05-15.patch.txt
>
>
> Create a default GeoRSS configuration file for the fmprod web application of the File Manager component.
> The GeoRSS configuration file will contain all of the information from the default RSS configuration file.  In addition, it will also contain definitions for latitude and longitude GeoRSS XML tags.
> Name the file 'georss-config.xml' and add the file to http://svn.apache.org/repos/asf/oodt/trunk/webapp/fmprod/src/main/resources

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira