public class LQMScriptLauncher extends Object
| Constructor and Description |
|---|
LQMScriptLauncher(String[] args)
Create a scripting environment with access to the command line arguments
|
| Modifier and Type | Method and Description |
|---|---|
FileWriter |
fileWriter(String path)
Open a file for writing.
|
LogicalModelFormat |
getFormat(String name)
Retrieve a format descriptor.
|
ModelModifierService |
getModifier(String name)
Retrieve a modifier service.
|
LogicalModelTool |
getTool(String name)
Retrieve a tool service.
|
static ScriptEngine |
loadEngine(String scriptname)
Detect and load script engines
|
LogicalModel |
loadModel(String filename)
Load a model guessing the format.
|
LogicalModel |
loadModel(String filename,
String format)
Load a model from a file.
|
LogicalModel |
modifyModel(LogicalModel model,
String name)
Construct a modified model.
|
LogicalModel |
modifyModel(LogicalModel model,
String name,
String parameters)
Construct a modified model.
|
boolean |
saveModel(LogicalModel model,
String filename,
String format)
Save a model to a file.
|
public final String[] args
public LQMScriptLauncher(String[] args)
args - the command line argumentspublic static ScriptEngine loadEngine(String scriptname) throws Exception
scriptname - path to the script fileException - if no engine was found or loading failedpublic LogicalModel loadModel(String filename)
filename - the path to the file to load (extension gives the format)public LogicalModel loadModel(String filename, String format)
filename - the path to the file to load (extension gives the format)format - enforced format or null to guess from file extensionLQMLauncher.loadModel(String,String)public boolean saveModel(LogicalModel model, String filename, String format)
model - the model to savefilename - the path to the output fileformat - enforced format or null to guess from file extensionLQMLauncher.saveModel(LogicalModel,String,String)public LogicalModel modifyModel(LogicalModel model, String name)
model - the original modelname - the name of a modifiermodifyModel(LogicalModel,String,String)public LogicalModel modifyModel(LogicalModel model, String name, String parameters)
model - the original modelname - the name of a modifierparameters - parameters for the model modifierModelModifierService.getModifiedModel(LogicalModel,String)public LogicalModelFormat getFormat(String name)
name - the ID of the formatLQMServiceManager.getFormat(String)public ModelModifierService getModifier(String name)
name - the ID of the modifier serviceLQMServiceManager.getModifier(String)public LogicalModelTool getTool(String name)
name - the ID of the toolLQMServiceManager.getTool(String)public FileWriter fileWriter(String path) throws IOException
path - the path to the file to openIOExceptionCopyright © 2012-2017. All Rights Reserved.