|
|
This document covers any changes to the installation, operation or use of the Catalog and Archive Service for a given release. A somewhat itemized list of changes can be found on the
Release Changes
page.
This release fixed a bug involving the handling of product references containing backslashes.
This release fixed a solitary bug introduced in release 2.0.0.
This release includes many changes to the client interface and how the server handles certain types of product items. The interface changes are detailed in this section.
|
New Location
|
Old Location
|
|
jpl.eda.archive.ArchiveClient
|
Combination of jpl.eda.archive.client.ArchiveClient and jpl.eda.archive.server.ArchiveInt. The old versions were deprecated.
|
|
jpl.eda.archive.ArchiveProfileHandler
|
jpl.eda.archive.server.ArchiveProfileHandler
|
|
jpl.eda.archive.ArchiveProductHandler
|
jpl.eda.archive.server.ArchiveProductHandler
|
|
jpl.eda.archive.ProductList
|
jpl.eda.archive.server.ProductList
|
|
jpl.eda.archive.Reference
|
jpl.eda.archive.server.Reference
|
|
jpl.eda.archive.ReferenceException
|
jpl.eda.archive.server.ReferenceException
|
Any properties utilized by the classes listed in the table above were also modified to conform to their new package location.
In general the service was modified to allow products with a status other than
NORMAL
to be queried and deleted. They still cannot be retrieved or have associated tasks executed. Also modified all client interfaces that return files, to only return files that have a product type of
FILE_DATA_LOCAL
.
Besides residing in a new package location, the
ArchiveClient
class has received several additions and modifications. The table below details these changes by method.
|
Method
|
Description
|
|
ArchiveClient()
|
Removed this constructor since it was not being used anyway.
|
|
add()
|
Modified the underlying
Product
class to validate the
productName
parameter. A product name must now begin with a letter, number or a period. Every other character in the name must now be a letter, number, period, underscore, dash or colon.
|
|
get()
|
All of the
get()
methods now require a valid directory location for the
pathSpec
parameter.
|
|
get(datasetName, productName, pathSpec)
|
New method for retrieving the latest product.
|
|
get(productId, pathSpec)
|
New method for retrieving a product.
|
|
getId(datasetName, productName, productVersion)
|
New method for retrieving a product identifier.
|
|
getList(productId)
|
Method renamed from
get(productId)
.
|
|
getMetadata(datasetName, productName)
|
New method for retrieving the metadata for the latest product.
|
|
getMetadata(datasetName, productName, productVersion)
|
New method for retrieving metadata for a product.
|
|
getMetadata(productId)
|
New method for retrieving metadata for a product.
|
|
updateMetadata(productId, metadata)
|
New method for changing the metadata associated with a product.
|
|
delete(datasetName, productName)
|
New method for deleting all versions of a product.
|
|
delete(productId)
|
New method for deleting a product.
|
|
main()
|
Modified by swapping the
serverName
and
event
arguments to conform with other OODT classes. Also removed the
--metadataStr
argument from the
add
event.
|
Modified to include the profile elements
CAS.ProductItemReference
and
CAS.ProductItemLength
in the Profile for a given product. Below is an example portion of a Profile showing the two new elements populated with references of two product items for an associated product.
<profile>
...
<profElement>
<elemId>0</elemId>
<elemName>CAS.ProductItemReference</elemName>
<elemDesc>The product item archive reference.</elemDesc>
<elemType>character</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>
file:///tmp/archive/product_2/Test/1/jpl_logo.gif
</elemValue>
<elemValue>
file:///tmp/archive/product_2/Test/1/jpl_logo.jpg
</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>0</elemId>
<elemName>CAS.ProductItemLength</elemName>
<elemDesc>The product item archive length.</elemDesc>
<elemType>integer</elemType>
<elemUnit>bytes</elemUnit>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>1055</elemValue>
<elemValue>1835</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
...
</profile>
The
ArchiveProfileHandler
class has been modified to allow for mapping of incoming elements to CAS elements. More on this feature can be found in the
Developer Guide
.
This release provided some house cleaning. There were no real changes for this release.
This release provides improved query capability and a Product Service interface. Several changes to the CAS interface are detailed in this section.
Support for a Profile Server Handler already existed in previous versions of the CAS, but I have made some significant modifications to this capability both on the query side as well as the result side (Profile population).
Support for mapping a Dublin Core element name to any defined metadata element in the CAS. For example, the Metadata Service has defined
DC.Title
as an element for registering a Data Dictionary with the CAS. Prior to recent changes, this element had no particular meaning to the CAS. Now this element can be
mapped to
Title
. Which means that this element can now be queried as follows:
-
DC.Title LIKE junk
-
Title LIKE junk
The value for this element will also be returned in the resulting Profile associated with the
Title
element in the resource attributes section as well as with the
DC.Title
element in the profile elements section.
Support for querying by and returning in the profile the internal CAS elements for describing a product. They will be represented by the following names:
CAS.ProductId
,
CAS.ProductName
,
CAS.ProductVersion
,
CAS.ProductStatusType
,
CAS.ProductReceivedTime
and
CAS.ProductOwner
. A new data dictionary registered with the Metadata Service describing these elements will be forthcoming. Although it can't be queried by directly, the
CAS.ProductType
element will also be returned in the profile. This element will contain the name of the dataset for which the product belongs.
Support for populating the resLocation element in a returned profile. If your instance is configured to use a Product Server in conjunction with a Product/Query Servlet, then the names/specs for those object can be defined in a couple of properties for use by the CAS when populating the resLocation element.
-
jpl.eda.archive.server.Product.server
May contain the name of the Product Service. For example,
urn:eda:rmi:JPL.Test.Product
.
-
jpl.eda.archive.server.Product.servlet
May contain the reference to a Product Servlet. For example,
http://cas.jpl.nasa.gov/ProductServlet
.
The above properties may be defined in the Catalog and Archive Server's "properties" elemen
t. The resulting URL can be seen in the example profile at the end of this document.
When configuring a Profile Server for a CAS instance, use the following properties:
-
jpl.eda.profile.handlers
Must contain the value
jpl.eda.archive.server.ArchiveProfileHandler
.
-
jpl.eda.archive.server.ArchiveProfileHandler.archiveServerName
Must contain the name of the Catalog and Archive Service. For example,
urn:eda:rmi:JPL.Test.Archive
.
Support for a Large Product Server handler has been added. Some significant additions were required to the interface and the back end but for the most part it did not impact existing functionality.
This new interface now supports a query for the result set associated with the given product. The result set will consist of each file associated with the product that is locally archived. Files that are stored as remote references are not added to the result set. The query should resemble the following:
-
CAS.ProductId = {product_id} or
-
CAS.ProductId EQ {product_id}
When configuring a Product Server for a CAS instance, use the following properties:
-
jpl.eda.product.handlers
Must contain the value
jpl.eda.archive.server.ArchiveProductHandler
.
-
jpl.eda.archive.server.ArchiveProductHandler.archiveServerName
Must contain the name of the Catalog and Archive Service. For example,
urn:eda:rmi:JPL.Test.Archive
.
There was only one s
ignificant change to an interface method in the ArchiveInt class. This change involves the add() method. Instead of a void return the method will now return the version number of the registered product.
In order to support the modifications listed above some database schema changes were necessary. If you are installing from scratch then you really don't care what these changes are but if you want to upgrade an existing schema, then here is what you need to do.
Two new columns need to be added to the element_policy table. The core_flag column indicates whether the element is an internal CAS element. The dc_element column provides the mapping from element name to Dublin Core name. The following commands must be executed against the schema (these examples are Oracle specific, your mileage may vary):
alter table element_policy
add (core_flag char(1) default 'N'
check (core_flag in ('Y', 'N')));
alter table element_policy
add (dc_element varchar2(30));
One new column needs to be added to all of the product reference tables. The product_length column tracks the length of each file associated with the product. Now if you really want to use the Product Server interface for retrieving files, then the length of each product file needs to be appropriately populated. You are on your own for accomplishing that task. The following command must be executed against the schema (this example is Oracle specific, your mileage may vary):
alter table {product_reference_table_name}
add (product_length number(10));
The element_policy table needs to be populated with the set of core elements. The following set of commands must be executed against the schema as a batch (these examples are Oracle specific, your mileage may vary):
/*
** element_policy
**
** Add the core elements necessary for each product_metadata_* table.
*/
VARIABLE next_id NUMBER
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
core_flag, dc_element, data_type, length, scale,
min_value, max_value, description) VALUES
(:next_id, 'CAS.ProductId', 'product_id', 'Y',
NULL, 'INTEGER', NULL, NULL, NULL, NULL,
'A unique identifier generated for the product
within the context of the CAS instance.');
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
core_flag, dc_element, data_type, length, scale,
min_value, max_value,description) VALUES
(:next_id, 'CAS.ProductName', 'product_name', 'Y',
NULL, 'STRING', 255, NULL, NULL, NULL,
'A unique name for the product within the context
of the product type or dataset.');
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
core_flag, dc_element, data_type, length, scale,
min_value, max_value, description) VALUES
(:next_id, 'CAS.ProductVersion', 'product_version', 'Y',
NULL, 'INTEGER', NULL, NULL, NULL, NULL,
'The version of the product relative to the number
of products with the same product name, registered
with a given product type or dataset.');
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
core_flag, dc_element, data_type, length, scale,
min_value, max_value, description) VALUES
(:next_id, 'CAS.ProductStatusType', 'product_status_type', 'Y',
NULL, 'STRING', 20, NULL, NULL, NULL,
'The status of the product within the context of
the CAS instance.');
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
core_flag, dc_element, data_type, length, scale,
min_value, max_value, description) VALUES
(:next_id, 'CAS.ProductReceivedTime', 'product_received_time', 'Y',
NULL, 'DATETIME', NULL, NULL, NULL, NULL,
'The date/time value representing when the product
was registered with the CAS.');
EXEC get_next_element_id (:next_id);
INSERT INTO element_policy
(element_id, element_name, product_metadata_column,
core_flag, dc_element, data_type, length, scale,
min_value, max_value, description) VALUES
(:next_id, 'CAS.ProductOwner', 'product_owner', 'Y',
NULL, 'STRING', 30, NULL, NULL, NULL,
'The user name of the account that registered the
product.');
COMMIT;
Here is an example Profile generated by the CAS based on a query received from the Profile Server:
<profile>
<profAttributes>
<profId>urn:eda:rmi:JPL.Test.Archive:20040615152012270</profId>
<profVersion>1</profVersion>
<profType>profile</profType>
<profStatusId>active</profStatusId>
<profRegAuthority>JPL.EDM.CAS</profRegAuthority>
<profRevisionNote>
Created on 2004-06-15T15:20:12.270-07:00.
</profRevisionNote>
</profAttributes>
<resAttributes>
<Identifier>urn:eda:rmi:JPL.Test.Archive:1</Identifier>
<Title>This is a test.</Title>
<Creator>unknown</Creator>
<Subject>
Test dataset with associated metadata elements but no tasks.
</Subject>
<Date>2003-08-22T12:30:45.123-07:00</Date>
<Type>Test.Metadata.NoTasks</Type>
<Language>en</Language>
<resContext>UNKNOWN</resContext>
<resAggregation>granule</resAggregation>
<resClass>data.granule</resClass>
<resLocation>
http://cas.jpl.nasa.gov/ProductServlet
?object=urn:eda:rmi:JPL.Test.Product
&keywordQuery=CAS.ProductId%3D1
</resLocation>
</resAttributes>
<profElement>
<elemId>11</elemId>
<elemName>Test.Long</elemName>
<elemDesc>Test element for an 8 byte integer value.</elemDesc>
<elemType>integer</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>123456789012345</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment/>
</profElement>
<profElement>
<elemId>4</elemId>
<elemName>CAS.ProductStatusType</elemName>
<elemDesc>
The status of the product within the context of the CAS instance.
</elemDesc>
<elemType>character</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>NORMAL</elemValue>
<elemObligation>Required</elemObligation>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>1</elemId>
<elemName>CAS.ProductId</elemName>
<elemDesc>
A unique identifier generated for the product within the
context of the CAS instance.
</elemDesc>
<elemType>integer</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>1</elemValue>
<elemObligation>Required</elemObligation>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>9</elemId>
<elemName>Test.Double</elemName>
<elemDesc>
Test element for an 8 byte floating point number value.
</elemDesc>
<elemType>real</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>1.23456789123457E8</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment/>
</profElement>
<profElement>
<elemId>3</elemId>
<elemName>CAS.ProductVersion</elemName>
<elemDesc>
The version of the product relative to the number of products
with the same product name, registered with a given product
type or dataset.
</elemDesc>
<elemType>integer</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>1</elemValue>
<elemObligation>Required</elemObligation>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>10</elemId>
<elemName>Test.Integer</elemName>
<elemDesc>Test element for a 4 byte integer value.</elemDesc>
<elemType>integer</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>123345679</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment/>
</profElement>
<profElement>
<elemId>7</elemId>
<elemName>Test.DateTime</elemName>
<elemDesc>Test element for an ISO 8601 date value.</elemDesc>
<elemType>date_time</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>2003-08-22T12:30:45.123-07:00</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment/>
</profElement>
<profElement>
<elemId>2</elemId>
<elemName>CAS.ProductName</elemName>
<elemDesc>
A unique name for the product within the context of the
product type or dataset.
</elemDesc>
<elemType>character</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>Test</elemValue>
<elemObligation>Required</elemObligation>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>12</elemId>
<elemName>Test.String</elemName>
<elemDesc>Test element for a string value.</elemDesc>
<elemType>character</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>This is a test.</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment/>
</profElement>
<profElement>
<elemId>0</elemId>
<elemName>CAS.ProductType</elemName>
<elemDesc>The product type classification.</elemDesc>
<elemType>character</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>Test.Metadata.NoTasks</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>8</elemId>
<elemName>Test.Real</elemName>
<elemDesc>
Test element for a 4 byte floating point number value.
</elemDesc>
<elemType>real</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>12345.1</elemValue>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment/>
</profElement>
<profElement>
<elemId>6</elemId>
<elemName>CAS.ProductOwner</elemName>
<elemDesc>
The user name of the account that registered the product.
</elemDesc>
<elemType>character</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>unknown</elemValue>
<elemObligation>Required</elemObligation>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
<profElement>
<elemId>5</elemId>
<elemName>CAS.ProductReceivedTime</elemName>
<elemDesc>
The date/time value representing when the product was
registered with the CAS.
</elemDesc>
<elemType>date_time</elemType>
<elemEnumFlag>T</elemEnumFlag>
<elemValue>2004-06-14T13:54:33.804-07:00</elemValue>
<elemObligation>Required</elemObligation>
<elemMaxOccurrence>1</elemMaxOccurrence>
<elemComment>
This element is used by the CAS internally.
</elemComment>
</profElement>
</profile>
|