public class ToolAdapterOperatorDescriptor extends Object implements OperatorDescriptor
Modifier and Type | Field and Description |
---|---|
static Class[] |
annotatedClasses |
static String |
SOURCE_PACKAGE |
static String |
SOURCE_USER |
Constructor and Description |
---|
ToolAdapterOperatorDescriptor(String name,
Class<? extends Operator> operatorClass) |
ToolAdapterOperatorDescriptor(String name,
Class<? extends Operator> operatorClass,
String alias,
String label,
String version,
String description,
String authors,
String copyright,
String menuLocation) |
ToolAdapterOperatorDescriptor(ToolAdapterOperatorDescriptor obj)
Copy constructor
|
ToolAdapterOperatorDescriptor(ToolAdapterOperatorDescriptor obj,
String newName,
String newAlias)
Variant of the copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addVariable(SystemVariable variable)
Adds a user-defined system variable
|
ToolAdapterOperatorDescriptor |
createCopy()
Creates a deep copy of this operator.
|
static ToolAdapterOperatorDescriptor |
fromXml(File file,
ClassLoader classLoader)
Loads an operator descriptor from an XML document.
|
static ToolAdapterOperatorDescriptor |
fromXml(Reader reader,
String resourceName,
ClassLoader classLoader)
Loads an operator descriptor from an XML document.
|
static ToolAdapterOperatorDescriptor |
fromXml(URL url,
ClassLoader classLoader)
Loads an operator descriptor from an XML document.
|
String |
getAlias() |
String |
getAuthors() |
Bundle |
getBundle() |
Bundle |
getBundle(OSFamily osFamily) |
Map<OSFamily,Bundle> |
getBundles() |
String |
getCopyright() |
String |
getDescription() |
String |
getErrorPattern()
Getter for the Error Pattern field
|
String |
getHelpID() |
String |
getLabel() |
Bundle |
getLinuxBundle() |
Bundle |
getMacosxBundle() |
String |
getMainToolFileLocation()
Getter for the Tool File Location field
|
String |
getMenuLocation()
Getter for the Menu Location field
|
String |
getName() |
Class<? extends Operator> |
getOperatorClass() |
ParameterDescriptor[] |
getParameterDescriptors() |
String |
getPreprocessorExternalTool()
Getter for the Pre-processing External Tool field
|
Boolean |
getPreprocessTool()
Getter for the Has Pre-processing External Tool field
|
String |
getProcessingWriter()
Getter for the Pre-processing Writer field
|
String |
getProgressPattern()
Getter for the Progress Pattern field
|
String |
getSource()
Getter for the source of the descriptor.
|
int |
getSourceProductCount()
Returns the number of source products
|
SourceProductDescriptor[] |
getSourceProductDescriptors() |
SourceProductsDescriptor |
getSourceProductsDescriptor() |
String |
getStepPattern()
Getter for the Step progress Pattern field
|
TargetProductDescriptor |
getTargetProductDescriptor() |
TargetPropertyDescriptor[] |
getTargetPropertyDescriptors() |
FileTemplate |
getTemplate()
Getter for the Template File Location field
|
TemplateEngine |
getTemplateEngine() |
List<ToolParameterDescriptor> |
getToolParameterDescriptors()
Gets all the parameter descriptors
|
List<SystemVariable> |
getVariables()
Gets the list of user-defined system variables
|
String |
getVariableValue(String key) |
String |
getVersion() |
Bundle |
getWindowsBundle() |
String |
getWorkingDir()
Getter for the Working Directory field
|
boolean |
isAutoWriteDisabled()
The GPF framework usually writes the target product of either single operators or processing graphs to the file
system when executed from the GPT command-line interface or the operator GUI.
|
boolean |
isFromPackage()
Determines if the source of this descriptor is from a package or creadet/modified by user.
|
boolean |
isHandlingOutputName()
Determines if the tool would produce by itself the name of the output product.
|
boolean |
isInternal() |
void |
removeParamDescriptor(ToolParameterDescriptor descriptor)
Removes the given parameter descriptor from the internal parameter descriptor list
|
void |
removeParamDescriptors(List<ToolParameterDescriptor> descriptors)
Removes the given descriptors from the internal parameter descriptor list
|
File |
resolveVariables(File file) |
File |
resolveVariables(String location) |
void |
setAlias(String alias)
Setter for the Alias field
|
void |
setAuthors(String authors)
Setter for the Authors field
|
void |
setBundles(Map<OSFamily,Bundle> bundles) |
void |
setCopyright(String copyright)
Setter for the Copyright field
|
void |
setDescription(String description)
Setter for the Description field
|
void |
setErrorPattern(String pattern)
Setter for the Error Pattern field.
|
void |
setHandlingOutputName(boolean value)
Setter for the isHandlingOutputName member.
|
void |
setHelpID(String value) |
void |
setLabel(String label)
Setter for the Label field
|
void |
setLinuxBundle(Bundle bundle) |
void |
setMacosxBundle(Bundle bundle) |
void |
setMainToolFileLocation(String mainToolFileLocation)
Setter for the Tool File Location field
|
void |
setMenuLocation(String value)
Setter for the Menu Location field
|
void |
setName(String name)
Setter for the Name field
|
void |
setOperatorClass(Class<? extends Operator> operatorClass)
Setter for the operator class
|
void |
setPreprocessorExternalTool(String preprocessorExternalTool)
Setter for the Pre-processing External Tool field
|
void |
setPreprocessTool(Boolean preprocessTool)
Setter for the Has Pre-processing External Tool field
|
void |
setProcessingWriter(String processingWriter)
Setter for the Pre-processing Writer field
|
void |
setProgressPattern(String pattern)
Setter for the Progress Pattern field.
|
void |
setSource(String value)
Setter for the Source field.
|
void |
setSourceProductCount(int value)
Sets the number of source products.
|
void |
setStepPattern(String pattern)
Setter for the Step progress Pattern field.
|
void |
setTemplate(FileTemplate value)
Setter for the Template File Location field
|
void |
setWindowsBundle(Bundle bundle) |
void |
setWorkingDir(String workingDir)
Setter for the Working Directory field
|
void |
seVersion(String version)
Setter for the Version field
|
Boolean |
shouldWriteBeforeProcessing()
Getter for the Write Before Processing field
|
String |
toXml(ClassLoader classLoader)
Converts an operator descriptor to XML.
|
void |
writeBeforeProcessing(Boolean writeForProcessing)
Setter for the Write Before Processing field
|
public static final String SOURCE_PACKAGE
public static final String SOURCE_USER
public static final Class[] annotatedClasses
public ToolAdapterOperatorDescriptor(String name, Class<? extends Operator> operatorClass)
public ToolAdapterOperatorDescriptor(String name, Class<? extends Operator> operatorClass, String alias, String label, String version, String description, String authors, String copyright, String menuLocation)
public ToolAdapterOperatorDescriptor(ToolAdapterOperatorDescriptor obj)
obj
- The descriptor to be copiedpublic ToolAdapterOperatorDescriptor(ToolAdapterOperatorDescriptor obj, String newName, String newAlias)
obj
- The descriptor to be copiednewName
- The new name of the operatornewAlias
- The new alias of the operatorpublic void removeParamDescriptor(ToolParameterDescriptor descriptor)
descriptor
- The descriptor to be removedpublic void removeParamDescriptors(List<ToolParameterDescriptor> descriptors)
descriptors
- The list of descriptors to be removedpublic List<ToolParameterDescriptor> getToolParameterDescriptors()
public TemplateEngine getTemplateEngine()
public void setAlias(String alias)
public void setLabel(String label)
public void seVersion(String version)
public void setDescription(String description)
public void setAuthors(String authors)
public void setCopyright(String copyright)
public void setName(String name)
public void setOperatorClass(Class<? extends Operator> operatorClass)
public String getVersion()
getVersion
in interface OperatorDescriptor
null
if not declared.public String getAuthors()
getAuthors
in interface OperatorDescriptor
null
if not declared.public String getCopyright()
getCopyright
in interface OperatorDescriptor
null
if not declared.public boolean isInternal()
isInternal
in interface OperatorDescriptor
true
, this operator is considered for internal use only and thus
may not be exposed in user interfaces. The default is false
.public boolean isAutoWriteDisabled()
OperatorDescriptor
If the autoWriteDisabled
property is set, this default behaviour is switched off and hence,
the operator or graph is responsible for outputting any computed results.
Setting this property on an operator will only be useful, if it either does not generate a new target
Product
and/or if it
does its own outputting of non-Product
targets to external files.
isAutoWriteDisabled
in interface OperatorDescriptor
true
, the framework will prevent automatic writing of the target product to the file system.public String getName()
getName
in interface ElementDescriptor
public String getAlias()
getAlias
in interface ElementDescriptor
null
if not declared.public String getLabel()
getLabel
in interface ElementDescriptor
null
if not declared.public String getDescription()
getDescription
in interface ElementDescriptor
null
if not declared.public String getMenuLocation()
public void setMenuLocation(String value)
public String getSource()
public void setSource(String value)
public boolean isFromPackage()
public boolean isHandlingOutputName()
public void setHandlingOutputName(boolean value)
public String getHelpID()
public void setHelpID(String value)
public Class<? extends Operator> getOperatorClass()
getOperatorClass
in interface OperatorDescriptor
public SourceProductDescriptor[] getSourceProductDescriptors()
getSourceProductDescriptors
in interface OperatorDescriptor
public SourceProductsDescriptor getSourceProductsDescriptor()
getSourceProductsDescriptor
in interface OperatorDescriptor
null
if none is declared.public ParameterDescriptor[] getParameterDescriptors()
getParameterDescriptors
in interface OperatorDescriptor
public TargetPropertyDescriptor[] getTargetPropertyDescriptors()
getTargetPropertyDescriptors
in interface OperatorDescriptor
public TargetProductDescriptor getTargetProductDescriptor()
getTargetProductDescriptor
in interface OperatorDescriptor
null
if none is declared.public FileTemplate getTemplate()
public void setTemplate(FileTemplate value) throws TemplateException
TemplateException
public String getWorkingDir()
public void setWorkingDir(String workingDir)
public String getMainToolFileLocation()
public void setMainToolFileLocation(String mainToolFileLocation)
public void setProgressPattern(String pattern)
public String getProgressPattern()
public void setErrorPattern(String pattern)
public String getErrorPattern()
public void setStepPattern(String pattern)
public String getStepPattern()
public String getProcessingWriter()
public void setProcessingWriter(String processingWriter)
public Boolean shouldWriteBeforeProcessing()
public void writeBeforeProcessing(Boolean writeForProcessing)
public String getPreprocessorExternalTool()
public void setPreprocessorExternalTool(String preprocessorExternalTool)
public Boolean getPreprocessTool()
public void setPreprocessTool(Boolean preprocessTool)
public Bundle getWindowsBundle()
public void setWindowsBundle(Bundle bundle)
public Bundle getLinuxBundle()
public void setLinuxBundle(Bundle bundle)
public Bundle getMacosxBundle()
public void setMacosxBundle(Bundle bundle)
public Bundle getBundle()
public List<SystemVariable> getVariables()
public int getSourceProductCount()
public void setSourceProductCount(int value)
sourceProductDescriptors
array.
This is useful in the execution dialog, because it dictates how many selectors should
be rendered.public void addVariable(SystemVariable variable)
variable
- The variable to be addedpublic ToolAdapterOperatorDescriptor createCopy()
public static ToolAdapterOperatorDescriptor fromXml(URL url, ClassLoader classLoader)
url
- The URL pointing to a valid operator descriptor XML document.classLoader
- The class loader is used to load classed specified in the xml. For example the
class defined by the operatorClass
tag.public static ToolAdapterOperatorDescriptor fromXml(File file, ClassLoader classLoader) throws OperatorException
file
- The file containing a valid operator descriptor XML document.classLoader
- The class loader is used to load classed specified in the xml. For example the
class defined by the operatorClass
tag.OperatorException
public static ToolAdapterOperatorDescriptor fromXml(Reader reader, String resourceName, ClassLoader classLoader) throws OperatorException
reader
- The reader providing a valid operator descriptor XML document.resourceName
- Used in error messagesclassLoader
- The class loader is used to load classed specified in the xml. For example the
class defined by the operatorClass
tag.OperatorException
public String toXml(ClassLoader classLoader)
classLoader
- The class loader is used to load classed specified in the xml. For example the
class defined by the operatorClass
tag.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.