Class Executable

java.lang.Object
edu.isi.pegasus.planner.dax.CatalogType
edu.isi.pegasus.planner.dax.Executable

public class Executable extends CatalogType
The Transformation Catalog object the represent the entries in the DAX transformation section.
Version:
$Revision$
Author:
gmehta
  • Field Details

    • mNamespace

      protected String mNamespace
      Namespace of the executable
    • mName

      protected String mName
      Name of the executable
    • mVersion

      protected String mVersion
      Version of the executable
    • mArch

      protected Executable.ARCH mArch
      Architecture the executable is compiled for
    • mOs

      protected Executable.OS mOs
      Os the executable is compiled for
    • mOsRelease

      protected String mOsRelease
      Os release the executable is compiled for
    • mOsVersion

      protected String mOsVersion
      OS version the executable is compiled for
    • mGlibc

      protected String mGlibc
      Glibc the executable is compiled for
    • mInstalled

      protected boolean mInstalled
      Flag to mark if the executable is installed or can be staged.
    • mInvokes

      protected List<Invoke> mInvokes
      List of Notification objects
    • mRequires

      protected Set<Executable> mRequires
      Other executables this executable requires
  • Constructor Details

    • Executable

      public Executable(String name)
      Create a new executable
      Parameters:
      name - name
    • Executable

      public Executable(Executable e)
      Copy Constructor
      Parameters:
      e - executable to copy from
    • Executable

      public Executable(String namespace, String name, String version)
      Create a new Executable
      Parameters:
      namespace - the namespace
      name - the name
      version - the version
  • Method Details

    • getName

      public String getName()
      Get the name of the executable
      Returns:
      String
    • getNamespace

      public String getNamespace()
      Get the namespace of the executable
      Returns:
      namespace
    • getVersion

      public String getVersion()
      Get the version of the executable
      Returns:
      version
    • getInvoke

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

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

      public Executable addInvoke(Invoke.WHEN when, String what)
      Add a Notification for this Executable same as addNotification
      Parameters:
      when - when to invoke
      what - what executable to invoke including the arguments
      Returns:
      Executable
    • addNotification

      public Executable addNotification(Invoke.WHEN when, String what)
      Add a Notification for this Executable same as addInvoke
      Parameters:
      when - when to invoke
      what - what executable to invoke including the arguments
      Returns:
      Executable
    • addInvoke

      public Executable addInvoke(Invoke invoke)
      Add a Notification for this Executable Same as add Notification
      Parameters:
      invoke - the invoke object containing the notification
      Returns:
      Executable
    • addNotification

      public Executable addNotification(Invoke invoke)
      Add a Notification for this Executable Same as addInvoke
      Parameters:
      invoke - the invoke object containing the notification
      Returns:
      Executable
    • addInvokes

      public Executable addInvokes(List<Invoke> invokes)
      Add a List of Notifications for this Executable Same as addNotifications
      Parameters:
      invokes - list of notification objects
      Returns:
      Executable
    • addNotifications

      public Executable addNotifications(List<Invoke> invokes)
      Add a List of Notifications for this Executable. Same as addInvokes
      Parameters:
      invokes - list of notification objects
      Returns:
      Executable
    • setArchitecture

      public Executable setArchitecture(Executable.ARCH arch)
      Set the architecture the executable is compiled for
      Parameters:
      arch - the architecture
      Returns:
      the Executable object that was modified
    • setOS

      public Executable setOS(Executable.OS os)
      Set the OS the executable is compiled for
      Parameters:
      os - the OS
      Returns:
      the Executable object that was modified
    • setOSRelease

      public Executable setOSRelease(String osrelease)
      Set the osrelease the executable is compiled for
      Parameters:
      osrelease - the os release
      Returns:
      the Executable object that was modified
    • setOSVersion

      public Executable setOSVersion(String osversion)
      Set the osversion the executable is compiled for
      Parameters:
      osversion - os version
      Returns:
      the Executable object that was modified
    • setGlibc

      public Executable setGlibc(String glibc)
      Set the glibc this executable is compiled for
      Parameters:
      glibc - glibc version
      Returns:
      the Executable object that was modified
    • setInstalled

      public Executable setInstalled()
      set the installed flag on the executable. Default is installed
      Returns:
      the Executable object that was modified
    • unsetInstalled

      public Executable unsetInstalled()
      Unset the installed flag on the executable. Default is installed.
      Returns:
      the Executable object that was modified
    • setInstalled

      public Executable setInstalled(boolean installed)
      Set the installed flag on the executable.Default is installed
      Parameters:
      installed - the installed flag
      Returns:
      the Executable object that was modified
    • getInstalled

      public boolean getInstalled()
      Check if the executable is of type installed.
      Returns:
      Boolean
    • getArchitecture

      public Executable.ARCH getArchitecture()
      Get the architecture the Executable is compiled for
      Returns:
      Architecture
    • getOS

      public Executable.OS getOS()
      Get the OS the Executable is compiled for
      Returns:
      the OS
    • getOsRelease

      public String getOsRelease()
      Get the OS release set for this executable. Returns empty string if not set
      Returns:
      String
    • getOsVersion

      public String getOsVersion()
      Get the OS version set for this executable.
      Returns:
      String
    • getGlibc

      public String getGlibc()
      Get the Glibc version if any set for this file. Returns empty string if not set
      Returns:
      String
    • isExecutable

      public boolean isExecutable()
      Return boolean indicating whether executable or not
      Overrides:
      isExecutable in class CatalogType
      Returns:
      boolean
    • getRequirements

      public Set<Executable> getRequirements()
      Get the set of executables that this executable requires
      Returns:
      Set of Executable this main executable requires
    • addRequirement

      public Executable addRequirement(Executable e)
      Add another executable as a requirement to this executable
      Parameters:
      e - dependent executable
      Returns:
      instance to the Executable that was modified
    • equals

      public boolean equals(Object obj)
      Compares whether an object is equal to this instance of Executable or not
      Overrides:
      equals in class Object
      Parameters:
      obj - object to compare against
      Returns:
      boolean
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXML

      public void toXML(edu.isi.pegasus.common.util.XMLWriter writer)
      Description copied from class: CatalogType
      Write the XML representation of this object
      Overrides:
      toXML in class CatalogType
      Parameters:
      writer - the xml writer
      See Also:
      • XMLWriter
    • toXML

      public void toXML(edu.isi.pegasus.common.util.XMLWriter writer, int indent)
      Description copied from class: CatalogType
      Write the XML representation of this object
      Overrides:
      toXML in class CatalogType
      Parameters:
      writer - the xml writer
      indent - the number of indent spaces
      See Also:
      • XMLWriter
    • toTransformationCatalogEntries

      public List<edu.isi.pegasus.planner.catalog.transformation.TransformationCatalogEntry> toTransformationCatalogEntries()
      Converts the executable into transformation catalog entries
      Returns:
      transformation catalog entries