|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPlatformObject
eu.geclipse.core.model.impl.AbstractGridElement
eu.geclipse.core.model.impl.AbstractGridContainer
eu.geclipse.jsdl.JSDLJobDescriptionModel
public class JSDLJobDescriptionModel
JSDLJobDescription object for use outside g-Eclipse model. This class bases only on EMF's model representing JSDL's XML definition. For creating instance of this class a java.io.File with JSDL content has to exist on disk.
| Constructor Summary | |
|---|---|
JSDLJobDescriptionModel(java.io.File file)
|
|
| Method Summary | |
|---|---|
void |
addArgument(java.lang.String argName)
Adds a Argument element as a child of POSIXApplication element. |
void |
addArgumentForPosixApplication(java.lang.String argName,
java.util.ArrayList<java.lang.String> argValues)
Method to add Argument element to POSIXApplication element. |
void |
addCandidateHosts(java.util.List<java.lang.String> hostsList)
Method to set CandidateHost element of JSDL's Resources. |
void |
addDataStagingIn(java.lang.String name,
java.lang.String path)
Sets JSDL DataStaging element for staged in resources. |
void |
addDataStagingOut(java.lang.String name,
java.lang.String path)
Adds JSDL DataStaging element for staged out resources. |
SweepType |
addIndependentSweep(java.lang.String refParamName,
java.lang.String sweepParamName)
Method to add parameter definition of a sweep changing independently from referenced element (values will be sweep after all values of referenced parameter were substituted). |
SweepType |
addInnerSweep(java.lang.String refParamName,
java.lang.String sweepParamName)
Method to add parameter definition of a sweep changing for each change of referenced element (inner sweep loop). |
SweepType |
addSweepOnTheSameLevel(java.lang.String refParamName,
java.lang.String sweepParamName)
Method to add parameter definition of a sweep changing with referenced element (sweep on the same level). |
java.lang.String |
getApplicationName()
Method to access "name" attribute of the POSIXApplication element. |
java.util.List<java.lang.String> |
getCandidateHostsNames()
Method to access list of candidate hosts - that is content of CandidateHost element of JSDL Resources entry. |
java.lang.String |
getCpuArchitectureName()
Method to access CPUArchitecture name. |
java.util.List<DataStagingType> |
getDataStagingIn()
Returns list of those DataStagings entries that have Source element set (data stagings in) |
java.util.Map<java.lang.String,java.lang.String> |
getDataStagingInStrings()
Returns list of DataStagings entries that have Source element set (data stagings in) in form of Strings map - mapping file name to its location |
java.util.List<DataStagingType> |
getDataStagingOut()
Returns list of those DataStagings entries that have Target element set (data stgaings out) |
java.util.Map<java.lang.String,java.lang.String> |
getDataStagingOutStrings()
Returns list of DataStagings entries that have Target element set (data stagings out) in form of Strings map - mapping file name to its location |
java.lang.String |
getDescription()
|
java.lang.String |
getExecutable()
|
java.util.List<java.lang.String> |
getExecutableArguments()
|
IFileStore |
getFileStore()
Get the file store that this element is associated with. |
java.io.InputStream |
getInputStream()
|
java.lang.String |
getJSDLString()
Reads content of EMF document and transforms it into a String object. |
java.lang.String |
getName()
Get the name of this element. |
java.lang.String |
getOSTypeName()
Method to access OperatingSystem name. |
java.lang.String |
getOSVersion()
Method to access OperatingSystem version. |
IGridContainer |
getParent()
Get the parent element of this element. |
IPath |
getPath()
Get the path of this element relative to the grid root element. |
POSIXApplicationType |
getPosixApplication()
Method to access POSIXApplication element. |
IResource |
getResource()
Get the corresponding resource of this element. |
java.lang.String |
getStdErrorFileName()
|
java.net.URI |
getStdErrorUri()
|
java.lang.String |
getStdInputFileName()
|
java.net.URI |
getStdInputUri()
|
java.lang.String |
getStdOutputFileName()
|
java.net.URI |
getStdOutputUri()
|
boolean |
isLazy()
Determines if this container is using a lazy loading mechanism to manage its children. |
boolean |
isLocal()
Determines if this element is local. |
boolean |
isParametric()
Method to check if any sweep element is present in this document. |
void |
removeDataStaging()
Method to remove all DataStagings elements from JSDL. |
void |
removeTargetsFromOutStaging()
Method to clear (remove) Target elements from data stagings out entries. |
void |
save()
|
void |
setApplicationName(java.lang.String applicationName)
Method to set "name" attribute of POSIXApplication element. |
void |
setEnumFunction(java.lang.String paramName,
java.util.List<java.lang.String> values)
Method for setting function defining sweep parameter values by enumeration (listing them). |
void |
setJobIdentification(java.lang.String jobName,
java.lang.String description)
This method re-sets JSDL JobIdentification element (creates new empty element). |
void |
setLoopFunction(java.lang.String paramName,
java.math.BigInteger start,
java.math.BigInteger end,
java.math.BigInteger step,
java.util.List<java.math.BigInteger> exceptions)
Method for setting function defining sweep parameter values by integer loop. |
void |
setPOSIXApplicationDetails(java.lang.String applicationName,
java.lang.String executableFile,
java.lang.String stdin,
java.lang.String stdinName,
java.lang.String stdout,
java.lang.String outName,
java.lang.String err,
java.lang.String errName)
This method is for set content of POSIXApplication element. |
void |
setRoot(DocumentRoot root)
This method is to set EMF document's root element. |
void |
setUpBasicJSDLStructure()
This method re-sets JSDL content. |
void |
updateModelFromFile()
Updates the EMF JSDL model so that it matches the file content. |
| Methods inherited from class eu.geclipse.core.model.impl.AbstractGridContainer |
|---|
canContain, contains, create, delete, deleteAll, dispose, findChild, findChildWithResource, getChildCount, getChildren, hasChildren, isDirty, refresh, setDirty |
| Methods inherited from class eu.geclipse.core.model.impl.AbstractGridElement |
|---|
getAdapter, getProject, isHidden, isVirtual |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface eu.geclipse.core.model.IGridContainer |
|---|
canContain, contains, create, delete, deleteAll, findChild, findChildWithResource, getChildCount, getChildren, hasChildren, isDirty, refresh, setDirty |
| Methods inherited from interface eu.geclipse.core.model.IGridElement |
|---|
dispose, getProject, isHidden, isVirtual |
| Constructor Detail |
|---|
public JSDLJobDescriptionModel(java.io.File file)
throws IOWrappedException
file -
IOWrappedException| Method Detail |
|---|
public java.lang.String getDescription()
getDescription in interface IGridJobDescriptionpublic java.lang.String getExecutable()
getExecutable in interface IGridJobDescriptionpublic java.util.List<java.lang.String> getExecutableArguments()
getExecutableArguments in interface IGridJobDescriptionpublic java.lang.String getStdErrorFileName()
getStdErrorFileName in interface IGridJobDescription
public java.net.URI getStdErrorUri()
throws ProblemException
getStdErrorUri in interface IGridJobDescriptionURI to file containing standard error
or null if std error is not staged out
ProblemException - if URI cannot be createdpublic java.lang.String getStdInputFileName()
getStdInputFileName in interface IGridJobDescription
public java.net.URI getStdInputUri()
throws ProblemException
getStdInputUri in interface IGridJobDescriptionURI to file containing standard input
or null if std input is not staged in
ProblemException - if URI cannot be createdpublic java.lang.String getStdOutputFileName()
getStdOutputFileName in interface IGridJobDescription
public java.net.URI getStdOutputUri()
throws ProblemException
getStdOutputUri in interface IGridJobDescriptionURI to file containing standard output
or null if std output is not staged out
ProblemException - if URI cannot be createdpublic boolean isLazy()
IGridContainerIGridContainer.getChildren(IProgressMonitor monitor) methode is
called the first time. On subsequent calls of
IGridContainer.getChildren(IProgressMonitor monitor) the formerly loaded
children are returned unless the IGridContainer.setDirty() method was
called. In that case a call to
IGridContainer.getChildren(IProgressMonitor monitor) will cause a
reload of this containers children.
Lazy containers always have to return true if they are asked
if they contain any children with IGridContainer.hasChildren().
isLazy in interface IGridContainerpublic IFileStore getFileStore()
IGridElementnull if there is no such associated
file store. If this element is not virtual the filestore
corresponds to the file store of the corresponding resource.
getFileStore in interface IGridElementpublic java.lang.String getName()
IGridElement
getName in interface IGridElementpublic IGridContainer getParent()
IGridElementIGridContainer. This method may not return
null since the only element that is allowed to
return null is the IGridRoot which is a
singleton and is internally defined within the model.
getParent in interface IGridElementpublic IPath getPath()
IGridElement@IResource.
getPath in interface IGridElementpublic IResource getResource()
IGridElementnull if - and only if - this element is virtual.
getResource in interface IGridElementnull if this
element is virtual.public boolean isLocal()
IGridElementIResource) that
is local in the means that it is located on the local machine.
isLocal in interface IGridElement
public void updateModelFromFile()
throws IOWrappedException
file - XML file with JSDL content.
IOWrappedExceptionpublic void setRoot(DocumentRoot root)
root - EMF document root to set as a JSDL root element
public java.lang.String getJSDLString()
throws java.io.IOException
java.io.IOException - when there was a problem while reading the filepublic void setUpBasicJSDLStructure()
public void setJobIdentification(java.lang.String jobName,
java.lang.String description)
jobName - name of the jobdescription - the description of the job
public void setPOSIXApplicationDetails(java.lang.String applicationName,
java.lang.String executableFile,
java.lang.String stdin,
java.lang.String stdinName,
java.lang.String stdout,
java.lang.String outName,
java.lang.String err,
java.lang.String errName)
applicationName - name of the POSIXApplication (value of "name"
attribute in POSIXApplication element)executableFile - value of Executable elementstdin - standard input file's URI (used in data staging element)stdinName - standard input file's name (used in POSIX Input element
and as a file name in data staging entry)stdout - standard output file's URI (used in data staging element)outName - standard output file's name (used in POSIX Output element
and as a file name in data staging entry)err - standard error file's URI (used in data staging element)errName - standard error file's name (used in POSIX Error element and
as a file name in data staging entry)
public void addDataStagingOut(java.lang.String name,
java.lang.String path)
name - name of the resourcepath - URI representing resource's location
public void addDataStagingIn(java.lang.String name,
java.lang.String path)
name - name of the resourcepath - URI representing resource's locationpublic POSIXApplicationType getPosixApplication()
null
if this element is not set in JSDL document.public java.lang.String getCpuArchitectureName()
public java.lang.String getOSTypeName()
public java.lang.String getOSVersion()
public void addArgumentForPosixApplication(java.lang.String argName,
java.util.ArrayList<java.lang.String> argValues)
argName - name of the argumentargValues - list of argument's valuespublic void addCandidateHosts(java.util.List<java.lang.String> hostsList)
hostsList - list of hosts namespublic java.util.List<DataStagingType> getDataStagingIn()
public java.util.Map<java.lang.String,java.lang.String> getDataStagingInStrings()
public java.util.Map<java.lang.String,java.lang.String> getDataStagingOutStrings()
public java.util.List<DataStagingType> getDataStagingOut()
public void removeDataStaging()
public void setApplicationName(java.lang.String applicationName)
applicationName - name of the applicationpublic java.lang.String getApplicationName()
public java.util.List<java.lang.String> getCandidateHostsNames()
public boolean isParametric()
true if sweep element was defined, false
otherwisepublic void removeTargetsFromOutStaging()
public void addArgument(java.lang.String argName)
argName - name of the argument to add
public SweepType addSweepOnTheSameLevel(java.lang.String refParamName,
java.lang.String sweepParamName)
refParamName - name (XPath expression) of a sweeped element with which
newly created sweep should changesweepParamName - name of JSDL element (XPath expression) for which new
sweep will be created
public SweepType addInnerSweep(java.lang.String refParamName,
java.lang.String sweepParamName)
refParamName - name (XPath expression) of a sweeped element for each
change of which newly created sweep should changesweepParamName - name of JSDL element (XPath expression) for which new
sweep will be created
public SweepType addIndependentSweep(java.lang.String refParamName,
java.lang.String sweepParamName)
null as
a refParamName - sweep on a root level will be created. This means that
JSDL will became parametric.
refParamName - name (XPath expression) of a sweeped element from which
newly created parameter should be independentsweepParamName - name of JSDL element (XPath expression) for which new
sweep will be created
public void setEnumFunction(java.lang.String paramName,
java.util.List<java.lang.String> values)
paramName - name of a parameter (JSDL element, XPath expression) for
which function is definedvalues - enumeration values of function
public void setLoopFunction(java.lang.String paramName,
java.math.BigInteger start,
java.math.BigInteger end,
java.math.BigInteger step,
java.util.List<java.math.BigInteger> exceptions)
paramName - name of a parameter (JSDL element, XPath expression) for
which function is definedstart - starting value of loopend - ending value of loopstep - changing step of loopexceptions - values which will be excluded from values generated by
this looppublic void save()
public java.io.InputStream getInputStream()
|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||