|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.optimizationservices.oscommon.localinterface.OSOption
public class OSOption
The OSOption
class is a local interface for storing Optimization Services
options, especially solver service options. Its design follows the Optimization Services
option Language (OSoL). All the data structures in this class are standards specified in OSoL.
Developers can add service-specific options by extending this class.
OSInstance
,
OSResult
,
OSAnalysis
Field Summary | |
---|---|
GeneralOption |
general
general holds the general option specified by the OSoL Schema. |
JobOption |
job
job holds the job option specified by the OSoL Schema. |
OptimizationOption |
optimization
optimization holds the optimization option specified by the OSoL Schema. |
OtherOption[] |
other
other holds an array of all other options specified by the OSoL Schema. |
ServiceOption |
service
service holds the service option specified by the OSoL Schema. |
SystemOption |
system
system holds the system option specified by the OSoL Schema. |
Constructor Summary | |
---|---|
OSOption()
Default constructor. |
Method Summary | |
---|---|
int |
getConstraintNumber()
Get constraint number. |
java.lang.String |
getContactAddress()
Get the contact address to respond to the requester. |
java.lang.String |
getContactTransportType()
Get the contact transport type to respond to the requester, smtp (for email), osp (for knocking back on the requester), etc. |
java.lang.String[] |
getDirectoriesToDelete()
Get the directories to delete after running the job, which is a string array of paths. |
java.lang.String[] |
getDirectoriesToMake()
Get the directories to make before running the job, which is a string array of paths. |
java.lang.String[] |
getFilesToCreate()
Get the files to create before running the job, which is a string array of paths. |
java.lang.String[] |
getFilesToDelete()
Get the files to delete after running the job, which is a string array of paths. |
double[] |
getInitialVariableValues()
get initial variable values (double[]). |
java.lang.String[] |
getInputFilesToCopyFrom()
Get the input files to copy from before running the job, which is a string array of paths. |
java.lang.String[] |
getInputFilesToCopyTo()
Get the input files to copy to before running the job, which is a string array of paths. |
java.lang.String[] |
getInputFilesToMoveFrom()
Get the input files to move from before running the job, which is a string array of paths. |
java.lang.String[] |
getInputFilesToMoveTo()
Get the input files to move to before running the job, which is a string array of paths. |
java.lang.String |
getInstanceAddress()
Get the instance address to get the instance. |
java.lang.String |
getInstanceLocationType()
Get the instance location type to get the instance. |
java.lang.String |
getInstanceName()
Get instance name. |
java.lang.String[] |
getJobDependencies()
Get the dependencies of the current job, which is a string array of ids of the jobs that have run before the current job. |
java.lang.String |
getJobID()
Get job ID. |
double |
getJobMaxTime()
Get the maximum time (in seconds) before the job is terminated. |
java.util.GregorianCalendar |
getJobScheduledStartTime()
Get the scheduled start time for the job. |
java.lang.String |
getLicense()
Get license. |
int |
getObjectiveNumber()
Get objective number. |
java.util.Hashtable<java.lang.String,java.lang.String> |
getOtherOptionDescriptions()
get a hashmap of other option descriptions. |
java.lang.String[] |
getOtherOptionNames()
get a string array of names of other options. |
java.util.Hashtable<java.lang.String,java.lang.String> |
getOtherOptionValues()
get a hashmap of other option values. |
java.lang.String[] |
getOutputFilesToCopyFrom()
Get the output files to copy from before running the job, which is a string array of paths. |
java.lang.String[] |
getOutputFilesToCopyTo()
Get the output files to copy to before running the job, which is a string array of paths. |
java.lang.String[] |
getOutputFilesToMoveFrom()
Get the output files to move from before running the job, which is a string array of paths. |
java.lang.String[] |
getOutputFilesToMoveTo()
Get the output files to move to before running the job, which is a string array of paths. |
java.lang.String |
getPassword()
Get the password. |
java.lang.String[] |
getProcessesToKill()
Get the processes to kill after running the job, which is a string array of process names. |
java.lang.String[] |
getRequiredDirectoriesAndFiles()
Get the required directories and files to run the job, which is a string array of paths. |
java.lang.String |
getServiceName()
Get service name. |
java.lang.String |
getServiceType()
Get the service type, which can be: solver, analyzer, scheduler, simulation, registry, modeler, agent |
java.lang.String |
getServiceURI()
Get service uri. |
double |
getSystemMinCPUSpeed()
Get the system minimum cpu speed required to solve the job. |
double |
getSystemMinDiskSpace()
Get the system minimum disk space required to solve the job. |
double |
getSystemMinMemorySize()
Get the system minimum memory size required to solve the job. |
java.lang.String |
getUserName()
Get the userName. |
int |
getVariableNumber()
Get variable number. |
static void |
main(java.lang.String[] args)
main for test purposes. |
OSOption |
readOSoL(java.lang.String osol,
boolean isFile,
boolean validate)
read an OSoL instance and return and OSOption object. |
boolean |
setConstraintNumber(int constraintNumber)
Set the constraint number. |
boolean |
setContactAddress(java.lang.String address)
Set the contact address to respond to the requester. |
boolean |
setContactTransportType(java.lang.String transportType)
Set the contact transport type to respond to the requester, smtp (for email), osp (for knocking back on the requester), etc. |
boolean |
setDirectoriesToDelete(java.lang.String[] paths)
Set the directories to delete after running the job, which is a string array of paths. |
boolean |
setDirectoriesToMake(java.lang.String[] paths)
Set the directories to make before running the job, which is a string array of paths. |
boolean |
setFilesToCreate(java.lang.String[] paths)
Set the files to create before running the job, which is a string array of paths. |
boolean |
setFilesToDelete(java.lang.String[] paths)
Set the files to delete after running the job, which is a string array of paths. |
boolean |
setInitialVariableValues(double[] initialVariableValues)
Set initial variable values (double[]). |
boolean |
setInputFilesToCopyFrom(java.lang.String[] paths)
Set the input files to copy from before running the job, which is a string array of paths. |
boolean |
setInputFilesToCopyTo(java.lang.String[] paths)
Set the input files to copy to before running the job, which is a string array of paths. |
boolean |
setInputFilesToMoveFrom(java.lang.String[] paths)
Set the input files to move from before running the job, which is a string array of paths. |
boolean |
setInputFilesToMoveTo(java.lang.String[] paths)
Set the input files to move to before running the job, which is a string array of paths. |
boolean |
setInstanceAddress(java.lang.String address)
Set the instance address to get the instance. |
boolean |
setInstanceLocationType(java.lang.String locationType)
Set the instance location type to get the instance. |
boolean |
setInstanceName(java.lang.String instanceName)
Set instance name. |
boolean |
setJobDependencies(java.lang.String[] jobIDs)
Get the dependencies of the current job, which is a string array of ids of the jobs that have run before the current job. |
boolean |
setJobID(java.lang.String jobID)
Set jobID. |
boolean |
setJobMaxTime(double maxTime)
Set the maximum time before the job is terminated. |
boolean |
setJobScheduledStartTime(java.util.GregorianCalendar scheduledStartTime)
Set the scheduled start time for the job. |
boolean |
setLicense(java.lang.String license)
Set license. |
boolean |
setObjectiveNumber(int objectiveNumber)
Set the objective number. |
boolean |
setOtherOptions(java.lang.String[] names,
java.lang.String[] descriptions,
java.lang.String[] values)
set other options, with their names (required), descriptions (optional) and values (optional). |
boolean |
setOutputFilesToCopyFrom(java.lang.String[] paths)
Set the output files to copy from before running the job, which is a string array of paths. |
boolean |
setOutputFilesToCopyTo(java.lang.String[] paths)
Set the output files to copy to before running the job, which is a string array of paths. |
boolean |
setOutputFilesToMoveFrom(java.lang.String[] paths)
Set the output files to move from before running the job, which is a string array of paths. |
boolean |
setOutputFilesToMoveTo(java.lang.String[] paths)
Set the output files to move to before running the job, which is a string array of paths. |
boolean |
setPassword(java.lang.String password)
Set the password. |
boolean |
setProcessesToKill(java.lang.String[] processNames)
Set the processes to kill after running the job, which is a string array of paths. |
boolean |
setRequiredDirectoriesAndFiles(java.lang.String[] paths)
Set the required directories and files to run the job, which is a string array of paths. |
boolean |
setServiceName(java.lang.String serviceName)
Set service name. |
boolean |
setServiceType(java.lang.String type)
Set the service type. |
boolean |
setServiceURI(java.lang.String serviceURI)
Set service uri. |
boolean |
setSystemMinCPUSpeed(double minCPUSpeed)
Set the the system minimum cpu speed required to solve the job. |
boolean |
setSystemMinDiskSpace(double minDiskSpace)
Set the the system minimum disk space required to solve the job. |
boolean |
setSystemMinMemorySize(double minMemorySize)
Set the the system minimum memory size required to solve the job. |
boolean |
setUserName(java.lang.String userName)
Set the user name. |
boolean |
setVariableNumber(int variableNumber)
Set the variable number. |
java.lang.String |
writeOSoL()
write the OSOption to an osol xml string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public GeneralOption general
public SystemOption system
public ServiceOption service
public JobOption job
public OptimizationOption optimization
public OtherOption[] other
Constructor Detail |
---|
public OSOption()
Method Detail |
---|
public OSOption readOSoL(java.lang.String osol, boolean isFile, boolean validate) throws java.lang.Exception
osol
- holds the optimization option in a string which format follows the
Optimization Services option Language (OSoL) schema.isFile
- holds whether the osol string is a file name or a string that literally holds the osol contents.validate
- holds whether the reader should be validating against the schema or not.
java.lang.Exception
- if there are errors in reading the string or setting the OSOption.public java.lang.String writeOSoL() throws java.lang.Exception
java.lang.Exception
- if there are errors in writing the osol string.public java.lang.String getServiceName()
public boolean setServiceName(java.lang.String serviceName)
serviceName
- holds the name of the service.
public java.lang.String getServiceURI()
public boolean setServiceURI(java.lang.String serviceURI)
serviceURI
- holds the uri of the service.
public java.lang.String getInstanceName()
public boolean setInstanceName(java.lang.String instanceName)
instanceName
- holds the name of the instance.
public java.lang.String getInstanceLocationType()
public boolean setInstanceLocationType(java.lang.String locationType)
locationType
- holds the instance location type, e.g. local, http, ftp.
public java.lang.String getInstanceAddress()
public boolean setInstanceAddress(java.lang.String address)
address
- holds the instance address.
public java.lang.String getJobID()
public boolean setJobID(java.lang.String jobID)
jobID
- holds the jobID.
public java.lang.String getLicense()
public boolean setLicense(java.lang.String license)
license
- holds the license required by the service.
public java.lang.String getUserName()
public boolean setUserName(java.lang.String userName)
userName
- holds the user name required by the service.
public java.lang.String getPassword()
public boolean setPassword(java.lang.String password)
password
- holds the password required by the service.
public java.lang.String getContactTransportType()
public boolean setContactTransportType(java.lang.String transportType)
transportType
- holds the contact transport type.
public java.lang.String getContactAddress()
public boolean setContactAddress(java.lang.String address)
address
- holds the contact address.
public double getSystemMinDiskSpace()
public boolean setSystemMinDiskSpace(double minDiskSpace)
minDiskSpace
- holds the minimum disk space required to solve the job.
public double getSystemMinMemorySize()
public boolean setSystemMinMemorySize(double minMemorySize)
minMemorySize
- holds the minimum memory size required to solve the job.
public double getSystemMinCPUSpeed()
public boolean setSystemMinCPUSpeed(double minCPUSpeed)
minCPUSpeed
- holds the minimum cpu speed required to solve the job.
public java.lang.String getServiceType()
public boolean setServiceType(java.lang.String type)
type
- holds the service type, which can be:
solver, analyzer, scheduler, simulation, registry, modeler, agent
public double getJobMaxTime()
public boolean setJobMaxTime(double maxTime)
maxTime
- holds the maximum time in seconds.
public java.util.GregorianCalendar getJobScheduledStartTime()
public boolean setJobScheduledStartTime(java.util.GregorianCalendar scheduledStartTime)
scheduledStartTime
- holds the scheduled start time for the job.
public java.lang.String[] getJobDependencies()
public boolean setJobDependencies(java.lang.String[] jobIDs)
jobIDs
- holds a string array of ids of the jobs that have run before the current job.
public java.lang.String[] getRequiredDirectoriesAndFiles()
public boolean setRequiredDirectoriesAndFiles(java.lang.String[] paths)
paths
- holds a string array of directory/file paths required to run the job.
public java.lang.String[] getDirectoriesToMake()
public boolean setDirectoriesToMake(java.lang.String[] paths)
paths
- holds a string array of directories to make before running the job.
public java.lang.String[] getFilesToCreate()
public boolean setFilesToCreate(java.lang.String[] paths)
paths
- holds a string array of files to create before running the job.
public java.lang.String[] getInputFilesToCopyFrom()
public boolean setInputFilesToCopyFrom(java.lang.String[] paths)
paths
- holds a string array of input files to copy from before running the job.
public java.lang.String[] getInputFilesToCopyTo()
public boolean setInputFilesToCopyTo(java.lang.String[] paths)
paths
- holds a string array of input files to copy to before running the job.
public java.lang.String[] getInputFilesToMoveFrom()
public boolean setInputFilesToMoveFrom(java.lang.String[] paths)
paths
- holds a string array of input files to move from before running the job.
public java.lang.String[] getInputFilesToMoveTo()
public boolean setInputFilesToMoveTo(java.lang.String[] paths)
paths
- holds a string array of input files to move to before running the job.
public java.lang.String[] getOutputFilesToCopyFrom()
public boolean setOutputFilesToCopyFrom(java.lang.String[] paths)
paths
- holds a string array of output files to copy from before running the job.
public java.lang.String[] getOutputFilesToCopyTo()
public boolean setOutputFilesToCopyTo(java.lang.String[] paths)
paths
- holds a string array of output files to copy to before running the job.
public java.lang.String[] getOutputFilesToMoveFrom()
public boolean setOutputFilesToMoveFrom(java.lang.String[] paths)
paths
- holds a string array of output files to move from before running the job.
public java.lang.String[] getOutputFilesToMoveTo()
public boolean setOutputFilesToMoveTo(java.lang.String[] paths)
paths
- holds a string array of output files to move to before running the job.
public java.lang.String[] getFilesToDelete()
public boolean setFilesToDelete(java.lang.String[] paths)
paths
- holds a string array of file paths to delete after running the job.
public java.lang.String[] getDirectoriesToDelete()
public boolean setDirectoriesToDelete(java.lang.String[] paths)
paths
- holds a string array of directory paths to delete after running the job.
public java.lang.String[] getProcessesToKill()
public boolean setProcessesToKill(java.lang.String[] processNames)
processNames
- holds a string array of process names to kill after running the job.
public int getVariableNumber()
public boolean setVariableNumber(int variableNumber)
variableNumber
- holds the number of variables
public int getObjectiveNumber()
public boolean setObjectiveNumber(int objectiveNumber)
objectiveNumber
- holds the number of objectives
public int getConstraintNumber()
public boolean setConstraintNumber(int constraintNumber)
constraintNumber
- holds the number of constraints
public double[] getInitialVariableValues()
public boolean setInitialVariableValues(double[] initialVariableValues)
initialVariableValues
- holds a double array of initial variable values.
public java.lang.String[] getOtherOptionNames()
public java.util.Hashtable<java.lang.String,java.lang.String> getOtherOptionDescriptions()
public java.util.Hashtable<java.lang.String,java.lang.String> getOtherOptionValues()
public boolean setOtherOptions(java.lang.String[] names, java.lang.String[] descriptions, java.lang.String[] values)
names
- holds the names of the other options; it is required.descriptions
- holds the descriptions of the other options; null if none.values
- holds the values of the other options; null if none.
public static void main(java.lang.String[] args)
argv
- command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |