This tutorial demonstrates how to create a very simple connection between the OODT File Manager and SIS. The connection is made by outputting an RSS feed of data from the File Manager via the REST API and configuring SIS to read in this RSS data.
This module has been removed from Apache SIS. This wiki page is kept as a source of material that we may use when web application development will restart.
Please note, this demonstration is very much a work-in-progress! It represents the first steps in making a connection between OODT and SIS. Work is ongoing and captured by issue OODT-402. As work continues it is hoped that a more formal, elegant and robust connection between OODT and SIS will be defined. This page will be updated accordingly to reflect the latest developments.
In the meantime, if you spot any typos, mistakes or feel that there are much better ways of doing things, please feel free to comment or update the wiki, send messages to the mailing lists or post to the OODT-402 ticket! Your comments will always be much appreciated!
Prerequisites / Assumptions
For the purposes of this demonstration, it is best to start with an empty File Manager ‘test’ repository, i.e. no files yet ingested into your repository, as we will be modifying the meta tags for the GenericFile product type.
(In the future, the aim is to define a separate ‘LocationAware’ product type that will not interfere with the GenericFile definition and can therefore be used with existing repositories.)
File Manager Configuration
The first step is to configure ‘Latitude’ and ‘Longitude’ meta tags for the GenericFile type in File Manager. This is achieved by editing the File Manager policy files (by default these are located in ‘/usr/local/oodt/filemgr/policy/core’ after installation).
Firstly, edit the ‘elements.xml’ file to add the following element definitions between the <cas:elements> … </cas:elements> tags:
Next, edit the ‘product-type-element-map.xml’ file and map the elements to the GenericFile product type by adding the following tags between the <type> … </type> tags:
After updating and saving the files, restart File Manager, for example by entering the following command from the File Manager bin directory:
Ingesting Sample Files
Create a few sample text files with associated metadata files. Ensure the metadata files contain metadata for the new ‘Latitude’ and ‘Longitude’ fields.
For example, in the /tmp directory create a ‘geodata.txt’ file containing a few arbitrary words of your own choice. Then create a ‘geodata.txt.met’ metadata file containing the following text:
Ingest the files into your File Manager repository. Below is an example command for ingesting files using the ‘filemgr-client’ tool from the File Manager bin directory for a File Manager instance running on port 9000.
File Manager REST API Webapp Configuration
Add the following tag definitions to the ‘rssconf.xml’ configuration file for the File Manager REST API webapp. By default, ‘rssconf.xml’ is located in the WEB-INF/classes directory of the webapp. The new tag definitions should be inserted between the <cas:rssconf> … </cas:rssconf> tags.
The ‘xmlns:geo’ namespace definitions are required for ‘geo:lat’ and ‘geo:long’ tags to be interpreted correctly. The above inline solution was chosen as a first step to get the connection working, but there is probably a much more elegant way of doing this.
After updating the ‘rssconf.xml’ file, you can test your updates by doing the following:
1) Restart Tomcat, for example by entering the following commands from the Tomcat bin directory:
2) Navigate to ‘http://<host>/<webapp>/viewRecent?channel=ALL’. Where <host> is the host location for Tomcat and <webapp> is the directory of your File Manager REST API webapp. For example, ‘’.
After navigating to the above location, you should see an RSS output. Depending on your browser, you may have to ‘view source’ to see the XML. You should be able to see your new tags in the output, for example:
SIS Webapp Configuration
Add the URL used in the File Manager REST API to the ‘sis_location_config.xml’ file for the SIS webapp. By default, this is located in the WEB-INF/classes directory of the SIS webapp. Remove all of the other RSS URLs from the file. After editing the file, it should look similar to the following:
Restart Tomcat to ensure that the changes to the configuration file are detected. [Note: If you have previously run the ‘demo.jsp’ SIS webapp demonstration page, it may be necessary to clear out the stored data from the webapp. This can be done by deleting the folders ‘geodata’ and ‘qtree’ from the main SIS webapp directory inbetween stopping and starting Tomcat. The folders will be recreated by the webapp when the next query is run.]
Running The Demo
To demonstrate the connection we'll use the 'demo.jsp' demo from the SIS web application. Open a web browser and navigate to http://<host>/<webapp>/demo.jsp, where <host> is the Tomcat location and <webapp> is the SIS webapp folder, for example: ‘’.
Enter data in the query form to return an area that should encompass the points defined in your metadata files. For example, the following bounding box query should return an area large enough to include the point defined in the ‘geodata.txt.met’ file:
Press the ‘Query’ button and view the map onscreen. All being well, your File Manager files should be visible on the map, as in the following screenshot. Click on the markers on the map to display information about them and confirm that it is indeed your files that are being displayed: