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

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

public abstract class TypeHandler
extends Object

A Metadata modification class that intercepts all Metadata flowing in and out of the Catalog. Allows the Catalog to contain additional Metadata or modified Metadata while keeping it invisible to the user. The purpose it to create String queriable Metadata so that the Catalog can be queries accurately and without extra knowledge required on the user end.

Version:
$Revision: 9683 $
Author:
bfoster

Field Summary
protected  String elementName
           
 
Constructor Summary
TypeHandler()
           
 
Method Summary
 String getElementName()
          Get the Element name that this TypeHandler is responsible for handling
protected abstract  QueryCriteria handleRangeQueryCriteria(RangeQueryCriteria qc)
          Converts the given RangeQueryCriteria into a QueryCriteria with the necessary Catalog elements and values to perform the query
protected abstract  QueryCriteria handleTermQueryCriteria(TermQueryCriteria qc)
          Converts the given TermQueryCriteria into a QueryCriteria with the necessary Catalog elements and values to perform the query
abstract  void postGetMetadataHandle(org.apache.oodt.cas.metadata.Metadata metadata)
          Handles converting any Catalog metadata element values to their original values.
abstract  void preAddMetadataHandle(org.apache.oodt.cas.metadata.Metadata metadata)
          Handles converting any metadata element to Catalog element values.
 Query preQueryHandle(Query query)
          Converts this TypeHandler's element in the given Query into a Query with the necessary elements and values so the Catalog can be queried.
 void setElementName(String elementName)
          Sets the Element name that this TypeHandler is responsible for handling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elementName

protected String elementName
Constructor Detail

TypeHandler

public TypeHandler()
Method Detail

setElementName

public void setElementName(String elementName)
Sets the Element name that this TypeHandler is responsible for handling

Parameters:
elementName - The Element name for this TypeHandler

getElementName

public String getElementName()
Get the Element name that this TypeHandler is responsible for handling

Returns:
The Element name for this TypeHandler

preQueryHandle

public Query preQueryHandle(Query query)
                     throws QueryFormulationException
Converts this TypeHandler's element in the given Query into a Query with the necessary elements and values so the Catalog can be queried. NOTE: Original Query is modified . . . the argument query becomes equal to the returned query (return of query is a convenience).

Parameters:
query - Query for which the Catalog Query will be returned
Returns:
A Query with Catalog element values
Throws:
QueryFormulationException
IllegalAccessException
InstantiationException

postGetMetadataHandle

public abstract 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.

Parameters:
metadata - The Catalog Metadata

preAddMetadataHandle

public abstract 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.

Parameters:
metadata - The Original Metadata

handleRangeQueryCriteria

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

Parameters:
qc -
Returns:

handleTermQueryCriteria

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

Parameters:
qc -
Returns:


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