edu.isi.pegasus.planner.catalog.transformation
Class TransformationCatalogEntry

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.transformation.TransformationCatalogEntry
All Implemented Interfaces:
CatalogEntry

public class TransformationCatalogEntry
extends Object
implements CatalogEntry

An object of this class corresponds to a tuple in the Transformation Catalog.

Author:
Gaurang Mehta

Field Summary
private  String mName
          The logical mName of the transformation.
private  String mNamespace
          The logical mNamespace of the transformation
private  Notifications mNotifications
          All the notifications associated with the job
private  String mPFN
          The physical path on the resource for a particular arch, os and type.
private  Profiles mProfiles
          The profiles associated with the site.
private  String mResourceID
          The Id of the resource on which the transformation is installed.
private  SysInfo mSysInfo
          The System Info for the transformation.
private  String mVersion
          The mVersion of the transformation.
private  TCType type
          The type of transformation.
 
Constructor Summary
  TransformationCatalogEntry()
          The basic constructor
  TransformationCatalogEntry(String namespace, String name, String version)
          Optimized Constructor
  TransformationCatalogEntry(String namespace, String name, String version, String resourceid, String physicalname, TCType type, List profiles, VDSSysInfo sysinfo)
          Optimized Constructor
private TransformationCatalogEntry(String namespace, String name, String version, String resourceID, String physicalname, TCType type, Profiles profiles, SysInfo sysinfo)
          Overloaded constructor.
 
Method Summary
 void addNotification(Invoke invoke)
          Adds a Invoke object correpsonding to a notification.
 void addNotifications(Notifications invokes)
          Adds all the notifications passed to the underlying container.
 void addProfile(Profile profile)
          Allows you to add one profile at a time to the transformation.
 void addProfiles(List profiles)
          Allows you to add multiple profiles to the transformation.
 void addProfiles(Profiles profiles)
          Allows you to add one profile at a time to the transformation.
 Object clone()
          creates a new instance of this object and returns you it.
 boolean equals(TransformationCatalogEntry entry)
          Compares two catalog entries for equality.
 String getLogicalName()
          Returns the Name of the logical transformation.
 String getLogicalNamespace()
          Returns the Namespace associated with the logical transformation.
 String getLogicalTransformation()
          Gets the Fully Qualified Transformation mName in the format NS::Name:Ver.
 String getLogicalVersion()
          Returns the mVersion of the logical transformation.
 Notifications getNotifications()
          Returns all the notifications associated with the job.
 Collection<Invoke> getNotifications(Invoke.WHEN when)
          Returns a collection of all the notifications that need to be done for a particular condition
 String getPhysicalTransformation()
          Returns the physical location of the transformation.
 List getProfiles()
          Returns the list of profiles associated with the transformation.
 List getProfiles(String namespace)
          Returns the profiles for a particular Namespace.
 String getResourceId()
          Returns the resource where the transformation is located.
 SysInfo getSysInfo()
          Returns the System Information associated with the transformation.
 TCType getType()
          Returns the type of the transformation.
 VDSSysInfo getVDSSysInfo()
          Returns the System Information in the old VDS format associated with the transformation.
private static String joinLFN(String namespace, String name, String version)
          Joins the 3 components into a fully qualified logical mName of the format NS::NAME:VER
 void setLogicalName(String name)
          Set the logical mName of the transformation.
 void setLogicalNamespace(String namespace)
          Set the logical mNamespace of the transformation.
 void setLogicalTransformation(String logicaltransformation)
          Set the logical transformation with a fully qualified tranformation String of the format NS::NAME:Ver
 void setLogicalTransformation(String namespace, String name, String version)
          Set the logical transformation by providing the mNamespace, mName and mVersion as seperate strings.
 void setLogicalVersion(String version)
          Set the logical mVersion of the transformation.
 void setPhysicalTransformation(String physicalname)
          Set the physical location of the transformation.
 void setResourceId(String resourceid)
          Set the mResourceID where the transformation is available.
 void setSysInfo(SysInfo sysinfo)
          Sets the system information for the entry.
 void setType(TCType type)
          Set the type of the transformation.
 void setVDSSysInfo(VDSSysInfo sysinfo)
          Set the System Information associated with the transformation.
private static String[] splitLFN(String logicaltransformation)
          Splits the full qualified logical transformation into its components.
 String toString()
          gets the String mVersion of the data class
 String toTCString()
          Prints out a TC file format String.
 String toXML()
          Returns an xml output of the contents of the data class.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mNamespace

private String mNamespace
The logical mNamespace of the transformation


mVersion

private String mVersion
The mVersion of the transformation.


mName

private String mName
The logical mName of the transformation.


mResourceID

private String mResourceID
The Id of the resource on which the transformation is installed.


mPFN

private String mPFN
The physical path on the resource for a particular arch, os and type.


mProfiles

private Profiles mProfiles
The profiles associated with the site.


mSysInfo

private SysInfo mSysInfo
The System Info for the transformation.


type

private TCType type
The type of transformation. Takes one of the predefined enumerated type TCType.


mNotifications

private Notifications mNotifications
All the notifications associated with the job

Constructor Detail

TransformationCatalogEntry

public TransformationCatalogEntry()
The basic constructor


TransformationCatalogEntry

public TransformationCatalogEntry(String namespace,
                                  String name,
                                  String version)
Optimized Constructor

Parameters:
namespace - String
name - String
version - String

TransformationCatalogEntry

public TransformationCatalogEntry(String namespace,
                                  String name,
                                  String version,
                                  String resourceid,
                                  String physicalname,
                                  TCType type,
                                  List profiles,
                                  VDSSysInfo sysinfo)
Optimized Constructor

Parameters:
namespace - String
name - String
version - String
resourceID - String
physicalname - String
type - TCType
profiles - List
sysinfo - VDSSysInfo

TransformationCatalogEntry

private TransformationCatalogEntry(String namespace,
                                   String name,
                                   String version,
                                   String resourceID,
                                   String physicalname,
                                   TCType type,
                                   Profiles profiles,
                                   SysInfo sysinfo)
Overloaded constructor.

Parameters:
namespace - the namespace
name - the name
version - the version
resourceID - the site with which entry is associated
physicalname - the pfn
type - the type
profiles - the profiles passed
sysinfo - the SystemInformation
Method Detail

clone

public Object clone()
creates a new instance of this object and returns you it. A shallow clone. TO DO : Gaurang correct the clone method.

Overrides:
clone in class Object
Returns:
Object

toString

public String toString()
gets the String mVersion of the data class

Overrides:
toString in class Object
Returns:
String

toTCString

public String toTCString()
Prints out a TC file format String.

Returns:
String

toXML

public String toXML()
Returns an xml output of the contents of the data class.

Returns:
String

setLogicalTransformation

public void setLogicalTransformation(String logicaltransformation)
Set the logical transformation with a fully qualified tranformation String of the format NS::NAME:Ver

Parameters:
logicaltransformation - String

setLogicalTransformation

public void setLogicalTransformation(String namespace,
                                     String name,
                                     String version)
Set the logical transformation by providing the mNamespace, mName and mVersion as seperate strings.

Parameters:
mNamespace - String
mName - String
mVersion - String

setLogicalNamespace

public void setLogicalNamespace(String namespace)
Set the logical mNamespace of the transformation.

Parameters:
mNamespace - String

setLogicalName

public void setLogicalName(String name)
Set the logical mName of the transformation.

Parameters:
mName - String

setLogicalVersion

public void setLogicalVersion(String version)
Set the logical mVersion of the transformation.

Parameters:
mVersion - String

setResourceId

public void setResourceId(String resourceid)
Set the mResourceID where the transformation is available.

Parameters:
mResourceID - String

setType

public void setType(TCType type)
Set the type of the transformation.

Parameters:
type - TCType

setPhysicalTransformation

public void setPhysicalTransformation(String physicalname)
Set the physical location of the transformation.

Parameters:
mPFN - String

setSysInfo

public void setSysInfo(SysInfo sysinfo)
Sets the system information for the entry.

Parameters:
sysinfo - the System information

setVDSSysInfo

public void setVDSSysInfo(VDSSysInfo sysinfo)
Set the System Information associated with the transformation.

Parameters:
sysinfo - VDSSysInfo

addNotification

public void addNotification(Invoke invoke)
Adds a Invoke object correpsonding to a notification.

Parameters:
invoke - the invoke object containing the notification

addNotifications

public void addNotifications(Notifications invokes)
Adds all the notifications passed to the underlying container.

Parameters:
invokes - the notifications to be added

getNotifications

public Collection<Invoke> getNotifications(Invoke.WHEN when)
Returns a collection of all the notifications that need to be done for a particular condition

Parameters:
when - the condition
Returns:

getNotifications

public Notifications getNotifications()
Returns all the notifications associated with the job.

Returns:
the notifications

addProfiles

public void addProfiles(Profiles profiles)
Allows you to add one profile at a time to the transformation.

Parameters:
profile - Profile A single profile consisting of mNamespace, key and value

addProfile

public void addProfile(Profile profile)
Allows you to add one profile at a time to the transformation.

Parameters:
profile - Profile A single profile consisting of mNamespace, key and value

addProfiles

public void addProfiles(List profiles)
Allows you to add multiple profiles to the transformation.

Parameters:
profiles - List of Profile objects containing the profile information.

getLogicalTransformation

public String getLogicalTransformation()
Gets the Fully Qualified Transformation mName in the format NS::Name:Ver.

Returns:
String

getLogicalNamespace

public String getLogicalNamespace()
Returns the Namespace associated with the logical transformation.

Returns:
String Returns null if no mNamespace associated with the transformation.

getLogicalName

public String getLogicalName()
Returns the Name of the logical transformation.

Returns:
String

getLogicalVersion

public String getLogicalVersion()
Returns the mVersion of the logical transformation.

Returns:
String Returns null if no mVersion assocaited with the transformation.

getResourceId

public String getResourceId()
Returns the resource where the transformation is located.

Returns:
String

getType

public TCType getType()
Returns the type of the transformation.

Returns:
TCType

getPhysicalTransformation

public String getPhysicalTransformation()
Returns the physical location of the transformation.

Returns:
String

getSysInfo

public SysInfo getSysInfo()
Returns the System Information associated with the transformation.

Returns:
SysInfo

getVDSSysInfo

public VDSSysInfo getVDSSysInfo()
Returns the System Information in the old VDS format associated with the transformation.

Returns:
VDSSysInfo

getProfiles

public List getProfiles()
Returns the list of profiles associated with the transformation.

Returns:
List Returns null if no profiles associated.

getProfiles

public List getProfiles(String namespace)
Returns the profiles for a particular Namespace.

Parameters:
mNamespace - String The mNamespace of the profile
Returns:
List List of Profile objects. returns null if none are found.

joinLFN

private static String joinLFN(String namespace,
                              String name,
                              String version)
Joins the 3 components into a fully qualified logical mName of the format NS::NAME:VER

Parameters:
mNamespace - String
mName - String
mVersion - String
Returns:
String

splitLFN

private static String[] splitLFN(String logicaltransformation)
Splits the full qualified logical transformation into its components.

Parameters:
logicaltransformation - String
Returns:
String[]

equals

public boolean equals(TransformationCatalogEntry entry)
Compares two catalog entries for equality.

Parameters:
entry - is the entry to compare with
Returns:
true if the entries match, false otherwise


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