Class ScriptableProcessor
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseProcessor
-
- cz.vutbr.fit.layout.console.process.ScriptableProcessor
-
public class ScriptableProcessor extends cz.vutbr.fit.layout.impl.BaseProcessor- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description ScriptableProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(cz.vutbr.fit.layout.model.AreaTree atree, String operatorName, Map<String,Object> params)voiddrawToImage(cz.vutbr.fit.layout.model.Page page, String path)Draws the current page to an image file.voiddrawToImageWithAreas(cz.vutbr.fit.layout.model.Page page, cz.vutbr.fit.layout.model.AreaTree areaTree, String path, String areaNames)Draws the page to an image file and marks selected areas in the image.ObjectexecCommand(String command)booleanexecInternal(String scriptName)voidflushIO()List<String>getArtifactProviderIds(String artifactTypeIRI)protected ScriptEnginegetEngine()List<String>getOperatorIds()cz.vutbr.fit.layout.model.ArtifactprocessArtifact(cz.vutbr.fit.layout.model.Artifact input, String providerName, Map<String,Object> params)voidput(String var, Object obj)voidsetIO(Reader in, Writer out, Writer err)voidsetServiceParams(String serviceName, Map<String,Object> params)
-
-
-
Method Detail
-
processArtifact
public cz.vutbr.fit.layout.model.Artifact processArtifact(cz.vutbr.fit.layout.model.Artifact input, String providerName, Map<String,Object> params)
-
apply
public void apply(cz.vutbr.fit.layout.model.AreaTree atree, String operatorName, Map<String,Object> params)
-
drawToImage
public void drawToImage(cz.vutbr.fit.layout.model.Page page, String path)Draws the current page to an image file.- Parameters:
page- the page to drawpath- The path to the destination image file.
-
drawToImageWithAreas
public void drawToImageWithAreas(cz.vutbr.fit.layout.model.Page page, cz.vutbr.fit.layout.model.AreaTree areaTree, String path, String areaNames)Draws the page to an image file and marks selected areas in the image.- Parameters:
path- The path to the destination image file.areaNames- A substring of the names of areas that should be marked in the image. When set tonull, all the areas are marked.
-
getEngine
protected ScriptEngine getEngine()
-
flushIO
public void flushIO()
-
execInternal
public boolean execInternal(String scriptName) throws ScriptException
- Throws:
ScriptException
-
execCommand
public Object execCommand(String command) throws ScriptException
- Throws:
ScriptException
-
-