org.apache.oodt.cas.filemgr.validation
Class ScienceDataValidationLayer

java.lang.Object
  extended by org.apache.oodt.cas.filemgr.validation.ScienceDataValidationLayer
All Implemented Interfaces:
ValidationLayer

public class ScienceDataValidationLayer
extends Object
implements ValidationLayer

Determines the mapping of s to ProductTypes by reading the ScienceDataCatalog catalog schema tables concerning parameters and datasets.

Version:
$Revision: 11462 $
Author:
mattmann

Constructor Summary
ScienceDataValidationLayer(DataSource ds)
           
 
Method Summary
 void addElement(Element element)
           Adds the Element to the ValidationLayer.
 void addElementToProductType(ProductType productType, Element element)
           Adds the specified element to the ProductType specified by its productTypeId.
 Element getElementById(String elementId)
          Gets an element by its String identifier.
 Element getElementByName(String elementName)
          Gets an element by its String name.
 List<Element> getElements()
           
 List<Element> getElements(ProductType productType)
           Returns a List of Elements corresponding to the given ProductType.
 void modifyElement(Element element)
           Modifies an existing Element in the ValidationLayer.
 void removeElement(Element element)
           Removes a metadata Element from the ValidationLayer.
 void removeElementFromProductType(ProductType productType, Element element)
           Removes a metadata Element from the specified productTypeId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScienceDataValidationLayer

public ScienceDataValidationLayer(DataSource ds)
Method Detail

addElement

public void addElement(Element element)
                throws ValidationLayerException
Description copied from interface: ValidationLayer

Adds the Element to the ValidationLayer.

Specified by:
addElement in interface ValidationLayer
Parameters:
element - The element to add.
Throws:
ValidationLayerException - If any error occurs during the add.

addElementToProductType

public void addElementToProductType(ProductType productType,
                                    Element element)
                             throws ValidationLayerException
Description copied from interface: ValidationLayer

Adds the specified element to the ProductType specified by its productTypeId.

Specified by:
addElementToProductType in interface ValidationLayer
Parameters:
productType - The ProductType to associate the metadata Element with.
element - The Element to associate with the ProductType.
Throws:
ValidationLayerException - If any error occurs.

getElementById

public Element getElementById(String elementId)
                       throws ValidationLayerException
Description copied from interface: ValidationLayer
Gets an element by its String identifier.

Specified by:
getElementById in interface ValidationLayer
Parameters:
elementId - The String identifier of the Element to get.
Returns:
An Element by its String identifier.
Throws:
ValidationLayerException - If any error occurs.

getElementByName

public Element getElementByName(String elementName)
                         throws ValidationLayerException
Description copied from interface: ValidationLayer
Gets an element by its String name.

Specified by:
getElementByName in interface ValidationLayer
Parameters:
elementName - The String name of the Element to get.
Returns:
An Element by its String name.
Throws:
ValidationLayerException - If any error occurs.

getElements

public List<Element> getElements()
                          throws ValidationLayerException
Specified by:
getElements in interface ValidationLayer
Returns:
A List of all the metadata Elements in the ValidationLayer.
Throws:
ValidationLayerException - If any error occurs.

getElements

public List<Element> getElements(ProductType productType)
Description copied from interface: ValidationLayer

Returns a List of Elements corresponding to the given ProductType.

Specified by:
getElements in interface ValidationLayer
Parameters:
productType - The product type to retrieve the metadata Elements for.
Returns:
A List of Elements corresponding to the given ProductType.

modifyElement

public void modifyElement(Element element)
                   throws ValidationLayerException
Description copied from interface: ValidationLayer

Modifies an existing Element in the ValidationLayer.

Specified by:
modifyElement in interface ValidationLayer
Parameters:
element - The new Element data to update.
Throws:
ValidationLayerException - If any error occurs.

removeElement

public void removeElement(Element element)
                   throws ValidationLayerException
Description copied from interface: ValidationLayer

Removes a metadata Element from the ValidationLayer.

Specified by:
removeElement in interface ValidationLayer
Parameters:
element - The element to remove.
Throws:
ValidationLayerException - If any error occurs.

removeElementFromProductType

public void removeElementFromProductType(ProductType productType,
                                         Element element)
                                  throws ValidationLayerException
Description copied from interface: ValidationLayer

Removes a metadata Element from the specified productTypeId.

Specified by:
removeElementFromProductType in interface ValidationLayer
Parameters:
productType - The ProductType to remove the association of the specified element with.
element - The element whose association will be removed from the specified ProductType.
Throws:
ValidationLayerException - If any error occurs.


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