org.apache.oodt.cas.filemgr.structs.type
Class ValueReplaceTypeHandler

java.lang.Object
  extended by org.apache.oodt.cas.filemgr.structs.type.TypeHandler
      extended by org.apache.oodt.cas.filemgr.structs.type.ValueReplaceTypeHandler
Direct Known Subclasses:
MajorMinorVersionTypeHandler

public abstract class ValueReplaceTypeHandler
extends TypeHandler

A Subset-TypeHandler which only allows for metadata value modification. It will automatically detected and replace the metadata values for the metadata element which it is responsible for. All the developer needs to supply is the convertion method between the original value and the Catalog value

Version:
$Revision: 11462 $
Author:
bfoster

Field Summary
 
Fields inherited from class org.apache.oodt.cas.filemgr.structs.type.TypeHandler
elementName
 
Constructor Summary
ValueReplaceTypeHandler()
           
 
Method Summary
protected abstract  String getCatalogValue(String origValue)
          Converts the metadata element, for this TypeHandler, value to the Catalog value
protected abstract  String getOrigValue(String databaseValue)
          Converts the metadata element, for this TypeHandler, value from the Catalog value to the original value
protected  QueryCriteria handleRangeQueryCriteria(RangeQueryCriteria rqc)
          Converts the given RangeQueryCriteria into a QueryCriteria with the necessary Catalog elements and values to perform the query
protected  QueryCriteria handleTermQueryCriteria(TermQueryCriteria tqc)
          Converts the given TermQueryCriteria into a QueryCriteria with the necessary Catalog elements and values to perform the query
 void postGetMetadataHandle(org.apache.oodt.cas.metadata.Metadata metadata)
          Handles converting any Catalog metadata element values to their original values.
 void preAddMetadataHandle(org.apache.oodt.cas.metadata.Metadata metadata)
          Handles converting any metadata element to Catalog element values.
 
Methods inherited from class org.apache.oodt.cas.filemgr.structs.type.TypeHandler
getElementName, preQueryHandle, setElementName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueReplaceTypeHandler

public ValueReplaceTypeHandler()
Method Detail

postGetMetadataHandle

public void postGetMetadataHandle(org.apache.oodt.cas.metadata.Metadata metadata)
Handles converting any Catalog metadata element values to their original values. Metadata elements can be added, modified, or replaced.

Specified by:
postGetMetadataHandle in class TypeHandler
Parameters:
metadata - The Catalog Metadata

preAddMetadataHandle

public void preAddMetadataHandle(org.apache.oodt.cas.metadata.Metadata metadata)
Handles converting any metadata element to Catalog element values. Metadata elements can be added, modified, or replaced.

Specified by:
preAddMetadataHandle in class TypeHandler
Parameters:
metadata - The Original Metadata

handleRangeQueryCriteria

protected QueryCriteria handleRangeQueryCriteria(RangeQueryCriteria rqc)
Converts the given RangeQueryCriteria into a QueryCriteria with the necessary Catalog elements and values to perform the query

Specified by:
handleRangeQueryCriteria in class TypeHandler
Returns:

handleTermQueryCriteria

protected QueryCriteria handleTermQueryCriteria(TermQueryCriteria tqc)
Converts the given TermQueryCriteria into a QueryCriteria with the necessary Catalog elements and values to perform the query

Specified by:
handleTermQueryCriteria in class TypeHandler
Returns:

getCatalogValue

protected abstract String getCatalogValue(String origValue)
Converts the metadata element, for this TypeHandler, value to the Catalog value

Parameters:
origValue - The value for the element which this TypeHandler is responsible for
Returns:
The Catalog value

getOrigValue

protected abstract String getOrigValue(String databaseValue)
Converts the metadata element, for this TypeHandler, value from the Catalog value to the original value

Parameters:
origValue - The value for the element which this TypeHandler is responsible for
Returns:
The original value


Copyright © 1999-2011 Apache OODT. All Rights Reserved.