org.apache.oodt.cas.filemgr.validation
Interface ValidationLayer

All Known Implementing Classes:
DataSourceValidationLayer, ScienceDataValidationLayer, XMLValidationLayer

public interface ValidationLayer

Version:
$Revision: 9683 $

The Validation Layer for the File Manager, allowing Elements to be mapped to ProductTypes.

Author:
mattmann, bfoster

Method Summary
 void addElement(Element element)
           Adds the Element to the ValidationLayer.
 void addElementToProductType(ProductType type, 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 type)
           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 type, Element element)
           Removes a metadata Element from the specified productTypeId.
 

Method Detail

addElement

void addElement(Element element)
                throws ValidationLayerException

Adds the Element to the ValidationLayer.

Parameters:
element - The element to add.
Throws:
ValidationLayerException - If any error occurs during the add.

modifyElement

void modifyElement(Element element)
                   throws ValidationLayerException

Modifies an existing Element in the ValidationLayer.

Parameters:
element - The new Element data to update.
Throws:
ValidationLayerException - If any error occurs.

removeElement

void removeElement(Element element)
                   throws ValidationLayerException

Removes a metadata Element from the ValidationLayer.

Parameters:
element - The element to remove.
Throws:
ValidationLayerException - If any error occurs.

addElementToProductType

void addElementToProductType(ProductType type,
                             Element element)
                             throws ValidationLayerException

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

Parameters:
type - The ProductType to associate the metadata Element with.
element - The Element to associate with the ProductType.
Throws:
ValidationLayerException - If any error occurs.

removeElementFromProductType

void removeElementFromProductType(ProductType type,
                                  Element element)
                                  throws ValidationLayerException

Removes a metadata Element from the specified productTypeId.

Parameters:
type - 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.

getElements

List<Element> getElements(ProductType type)
                          throws ValidationLayerException

Returns a List of Elements corresponding to the given ProductType.

Parameters:
type - The product type to retrieve the metadata Elements for.
Returns:
A List of Elements corresponding to the given ProductType.
Throws:
ValidationLayerException - If any error occurs.

getElements

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

getElementById

Element getElementById(String elementId)
                       throws ValidationLayerException
Gets an element by its String identifier.

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

getElementByName

Element getElementByName(String elementName)
                         throws ValidationLayerException
Gets an element by its String name.

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


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