Class Transformation


  • public class Transformation
    extends java.lang.Object
    This Object is used to create a complex Transformation. A complex transformation is one that uses other executables and files
    Version:
    $Revision$
    Author:
    gmehta
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<Invoke> mInvokes  
      protected java.lang.String mName
      Name of the transformation
      protected java.lang.String mNamespace
      Namespace of the Transformation
      protected java.util.List<CatalogType> mUses
      List of executable of files used by the transformation
      protected java.lang.String mVersion
      Version of the transformation
    • Constructor Summary

      Constructors 
      Constructor Description
      Transformation​(Transformation t)
      Copy Constructor
      Transformation​(java.lang.String name)
      Create a new Transformation object
      Transformation​(java.lang.String namespace, java.lang.String name, java.lang.String version)
      Create a new Transformation Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Transformation addInvoke​(Invoke invoke)
      Add a Notification for this Transformation
      Transformation addInvoke​(Invoke.WHEN when, java.lang.String what)
      Add a Notification for this Transformation
      Transformation addInvokes​(java.util.List<Invoke> invokes)
      Add a List of Notifications for this Transformation
      Transformation addNotification​(Invoke.WHEN when, java.lang.String what)
      Add a Notification for this Transformation same as addInvoke()
      Transformation addNotifications​(java.util.List<Invoke> invokes)
      Add a List of Notifications for this Transformation.
      boolean equals​(java.lang.Object obj)
      Returns boolean indicating whether this instance of object is equal to the object being passed
      java.util.List<Invoke> getInvoke()
      Return the list of Notification objects
      java.lang.String getName()
      Get the name of the transformation
      java.lang.String getNamespace()
      Get the namespace of the transformation
      java.util.List<Invoke> getNotification()
      Return the list of Notification objects (same as getInvoke()
      java.util.List<CatalogType> getUses()
      Get the List of files and/or executables being used by the transformation
      java.lang.String getVersion()
      Get the version of the transformation
      int hashCode()
      Return the hashcode
      java.lang.String toString()
      Return the String version
      void toXML​(edu.isi.pegasus.common.util.XMLWriter writer)
      Writes out XML representation using the writer
      void toXML​(edu.isi.pegasus.common.util.XMLWriter writer, int indent)
      Writes out XML representation using the writer
      Transformation uses​(CatalogType fileorexecutable)
      Set the file or executable being used by the transformation
      Transformation uses​(java.util.List<CatalogType> filesorexecutables)
      Set the List of files and/or executables being used by the transformation
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • mNamespace

        protected java.lang.String mNamespace
        Namespace of the Transformation
      • mName

        protected java.lang.String mName
        Name of the transformation
      • mVersion

        protected java.lang.String mVersion
        Version of the transformation
      • mUses

        protected java.util.List<CatalogType> mUses
        List of executable of files used by the transformation
      • mInvokes

        protected java.util.List<Invoke> mInvokes
    • Constructor Detail

      • Transformation

        public Transformation​(java.lang.String name)
        Create a new Transformation object
        Parameters:
        name - the name of transformation
      • Transformation

        public Transformation​(Transformation t)
        Copy Constructor
        Parameters:
        t - Transformation to copy from
      • Transformation

        public Transformation​(java.lang.String namespace,
                              java.lang.String name,
                              java.lang.String version)
        Create a new Transformation Object
        Parameters:
        namespace - the namespace
        name - the name
        version - the version
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of the transformation
        Returns:
        the name
      • getNamespace

        public java.lang.String getNamespace()
        Get the namespace of the transformation
        Returns:
        the namespace
      • getVersion

        public java.lang.String getVersion()
        Get the version of the transformation
        Returns:
        the version
      • getInvoke

        public java.util.List<Invoke> getInvoke()
        Return the list of Notification objects
        Returns:
        List of Invoke objects
      • getNotification

        public java.util.List<Invoke> getNotification()
        Return the list of Notification objects (same as getInvoke()
        Returns:
        List of Invoke objects
      • addInvoke

        public Transformation addInvoke​(Invoke.WHEN when,
                                        java.lang.String what)
        Add a Notification for this Transformation
        Parameters:
        when - when to invoke the notification
        what - the executable to invoke with the arg string
        Returns:
        Transformation
      • addNotification

        public Transformation addNotification​(Invoke.WHEN when,
                                              java.lang.String what)
        Add a Notification for this Transformation same as addInvoke()
        Parameters:
        when - when to invoke the notification
        what - the executable to invoke with the arg string
        Returns:
        Transformation
      • addInvoke

        public Transformation addInvoke​(Invoke invoke)
        Add a Notification for this Transformation
        Parameters:
        invoke - the invoke object containing the invocation to invoke
        Returns:
        Transformation
      • addInvokes

        public Transformation addInvokes​(java.util.List<Invoke> invokes)
        Add a List of Notifications for this Transformation
        Parameters:
        invokes - list of notifications to associate with
        Returns:
        Transformation
      • addNotifications

        public Transformation addNotifications​(java.util.List<Invoke> invokes)
        Add a List of Notifications for this Transformation. Same as addInvokes()
        Parameters:
        invokes - list of notifications to associate with
        Returns:
        Transformation
      • uses

        public Transformation uses​(CatalogType fileorexecutable)
        Set the file or executable being used by the transformation
        Parameters:
        fileorexecutable - file used by executable
        Returns:
        Transformation
      • uses

        public Transformation uses​(java.util.List<CatalogType> filesorexecutables)
        Set the List of files and/or executables being used by the transformation
        Parameters:
        filesorexecutables - list of files or executables used by the transformation
        Returns:
        Transformation
      • getUses

        public java.util.List<CatalogType> getUses()
        Get the List of files and/or executables being used by the transformation
        Returns:
        List of Files and Executables used
      • equals

        public boolean equals​(java.lang.Object obj)
        Returns boolean indicating whether this instance of object is equal to the object being passed
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - object being compared
        Returns:
        boolean
      • hashCode

        public int hashCode()
        Return the hashcode
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int
      • toString

        public java.lang.String toString()
        Return the String version
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • toXML

        public void toXML​(edu.isi.pegasus.common.util.XMLWriter writer)
        Writes out XML representation using the writer
        Parameters:
        writer - the writer
      • toXML

        public void toXML​(edu.isi.pegasus.common.util.XMLWriter writer,
                          int indent)
        Writes out XML representation using the writer
        Parameters:
        writer - the writer
        indent - number pf indent spaces