edu.isi.pegasus.planner.catalog.transformation.classes
Class TransformationStore

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.transformation.classes.TransformationStore

public class TransformationStore
extends Object

A container data class that is used to store transformations. The transformation are stored internally indexed by transformation name.

Version:
$Revision: 2672 $
Author:
Karan Vahi

Field Summary
private  Map<String,Map<String,List<TransformationCatalogEntry>>> mTCStore
          The internal store map.
 
Constructor Summary
TransformationStore()
          The default constructor.
 
Method Summary
 void addEntry(TransformationCatalogEntry entry)
          Adds an entry into the store.
 void clear()
          Clears all the entries in the store.
 boolean containsTransformation(String completeName)
          Returns a boolean indicating whether the store contains an entry corresponding to a particular transformation or not.
 boolean containsTransformation(String namespace, String name, String version)
          Returns a boolean indicating whether the store contains an entry corresponding to a particular transformation or not.
 List<TransformationCatalogEntry> getAllEntries()
          Returns all the entries in the Transformation Store
 List<TransformationCatalogEntry> getEntries(String completeName, String site)
          Returns List of TransformationCatalogEntry objects for a transformation on a particular site.
 List<TransformationCatalogEntry> getEntries(String completeName, String site, TCType type)
          Returns List of TransformationCatalogEntry objects for a transformation on a particular site and a type.
 List<TransformationCatalogEntry> getEntries(String site, TCType type)
          Returns a list of TransformationCatalogEntry objects matching on a site and transformation type.
 List<String> getTransformations(String site, TCType type)
          Returns a list of transformation names matching on a site and transformation type.
private  void initialize()
          Intializes the store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mTCStore

private Map<String,Map<String,List<TransformationCatalogEntry>>> mTCStore
The internal store map. The Map is indexed by transformation names. The corresponding value is a Map that contains entries for all sites for a particular transformation . This map is indexed by site name and corresponding values are Lists of TransformationCatalogEntry objects.

Constructor Detail

TransformationStore

public TransformationStore()
The default constructor.

Method Detail

initialize

private void initialize()
Intializes the store.


clear

public void clear()
Clears all the entries in the store.


addEntry

public void addEntry(TransformationCatalogEntry entry)
Adds an entry into the store. If the entry already exists i.e entry for a site and corresponding PFN exists it's overriden.

Parameters:
entry - the transformation catalog object.

getEntries

public List<TransformationCatalogEntry> getEntries(String completeName,
                                                   String site,
                                                   TCType type)
Returns List of TransformationCatalogEntry objects for a transformation on a particular site and a type. If the site parameter passed is null, then all entries are returned corresponding to a tranformation. If type is null, then all entries associated with a site are returned.

Parameters:
completeName - the complete name of the transformation
site - the site on which to search for entries. null means all
type - the type to match on . null means all types.
Returns:
List if entries are found , else empty list.

getEntries

public List<TransformationCatalogEntry> getEntries(String completeName,
                                                   String site)
Returns List of TransformationCatalogEntry objects for a transformation on a particular site. If the site parameter passed is null, then all entries are returned corresponding to a tranformation.

Parameters:
completeName - the complete name of the transformation
site - the site on which to search for entries. null means all sites
Returns:
List if entries are found , else empty list.

getAllEntries

public List<TransformationCatalogEntry> getAllEntries()
Returns all the entries in the Transformation Store

Returns:
all entries.

getEntries

public List<TransformationCatalogEntry> getEntries(String site,
                                                   TCType type)
Returns a list of TransformationCatalogEntry objects matching on a site and transformation type.

Parameters:
site - the site on which to search for entries. null means all
type - the type to match on . null means all types.
Returns:
List if transformations exist

getTransformations

public List<String> getTransformations(String site,
                                       TCType type)
Returns a list of transformation names matching on a site and transformation type.

Parameters:
site - the site on which to search for entries. null means all
type - the type to match on . null means all types.
Returns:
List if transformations exist

containsTransformation

public boolean containsTransformation(String namespace,
                                      String name,
                                      String version)
Returns a boolean indicating whether the store contains an entry corresponding to a particular transformation or not.

Parameters:
namespace - the namespace associated with the transformation
name - the logical name
version - the version of the transformation
Returns:
boolean

containsTransformation

public boolean containsTransformation(String completeName)
Returns a boolean indicating whether the store contains an entry corresponding to a particular transformation or not.

Parameters:
completeName - the complete name of the transformation as constructed from namespace, name and version
Returns:
boolean


Copyright © 2011 The University of Southern California. All Rights Reserved.