Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Copy the OODT default schema.xml to the Solr configuration directory:
Code Block

cp /usr/local/oodt/cas-filemgr/etc/schema.xml /usr/local/oodt/solr-home/collection1/conf/schema.xml

...

  • Restart Tomcat:
Code Block

export CATALINA_OPTS='-Dsolr.solr.home=/usr/local/oodt/solr-home'

...


cd /usr/local/oodt/apache-tomcat/bin

...


./catalina.sh start

Step 4: Archive a test product

...

...

  • Generate a sample file and associated metadata:
Code Block

echo 'Test File' > /tmp/test.txt

...


touch /tmp/test.txt.met

...

  • Edit the file /tmp/test.txt.met and insert the following content:
Code Block

<cas:metadata xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">

...


	<keyval>
		<key>topic</key>

...


		<val>computer science</val>

...


	</keyval>

...


</cas:metadata>

...

  • Request the File Manager to archive the file and associated metadata:
Code Block

cd /usr/local/oodt/cas-filemgr/bin

...


./filemgr-client --url http://localhost:9000 --operation --ingestProduct --productName test.txt --productStructure Flat --productTypeName GenericFile --metadataFile file:///tmp/test.txt.met --refs file:///tmp/test.txt

...

  • Verify that the product has been archived:

...

  • if you list the content of the archive directory

...

  • , there should be a single sub-directory 'test.txt' containing a single file 'test.txt'

...

Code Block

ls -lR /usr/local/oodt/archive
  • In

...

...

  •  A single document should be returned, containing all the available metadata for the product just archived.

...

  •  Note how the metadata fields include the product id, the core CAS fields (starting with 'CAS....'), and additional fields parsed from the metadata file such as 'topic'.

...

  •  The response XML after ingesting one such document is reported below as an example:

<?xml version="1.0" encoding="UTF-8"?>
<response>

...

Code Block

<response>
<lst name="responseHeader">

...


<int name="status">0</int>

...


<int name="QTime"

...

>1</int>

...


<lst name="params">

...


<str name=

...

"

...

q">*:*</str>

...


</

...

lst></lst>

...


<result name="response" numFound="1" start="0">

...


<doc><str name="id"

...

>28565cc2-

...

237d-

...

4de6-

...

a455-

...

434f55fa7b53</str>

...


<str name="CAS.ProductId"

...

>28565cc2-

...

237d-

...

4de6-

...

a455-

...

434f55fa7b53</str>

...


<str name="CAS.ProductTypeName">GenericFile</str>

...


<date name="CAS.ProductReceivedTime">2013-04-

...

26T10:

...

59:16Z</date>

...


<str name="CAS.ProductTransferStatus">RECEIVED</str>

...


<str name="CAS.ProductName">test.txt</str>

...


<str name="CAS.ProductTypeId">urn:oodt:GenericFile</str>

...


<str name="CAS.ProductStructure">Flat</str>

...


<arr name="topic"

...

><str>computer science</

...

str></arr>

...


<arr name="FileLocation"

...

><str>/usr/local/oodt/archive/test.txt</str>

...


</

...

arr><arr name="MimeType"

...

><str>text/plain</

...

str><str>text</str>

...


<str>plain</

...

str></arr><arr name="Filename"

...

><str>test.txt</

...

str></arr>

...


<arr name="CAS.ReferenceFileSize"

...

><long>10</long></arr>

...


<arr name="CAS.ReferenceMimeType"

...

><str>text/plain</

...

str></arr>

...


<arr name="CAS.ReferenceDatastore"

...

><str>file:/usr/local/oodt/archive/test.txt/test.txt</

...

str></arr>

...


<arr name="CAS.ReferenceOriginal"

...

><str>file:///tmp/test.

...

txt</str></arr>

...


<long name="_version_"

...

>1433398733668614144</

...

long>
</doc>

...


</result>

...


</response>

Step tep 5: Additional client commands examples
-------------------------------------------

...