Class ToolAdapterOperatorDescriptor

    • Constructor Detail

      • ToolAdapterOperatorDescriptor

        public ToolAdapterOperatorDescriptor​(String name,
                                             Class<? extends Operator> operatorClass)
      • ToolAdapterOperatorDescriptor

        public ToolAdapterOperatorDescriptor​(ToolAdapterOperatorDescriptor obj)
        Copy constructor
        Parameters:
        obj - The descriptor to be copied
      • ToolAdapterOperatorDescriptor

        public ToolAdapterOperatorDescriptor​(ToolAdapterOperatorDescriptor obj,
                                             String newName,
                                             String newAlias)
        Variant of the copy constructor
        Parameters:
        obj - The descriptor to be copied
        newName - The new name of the operator
        newAlias - The new alias of the operator
    • Method Detail

      • removeParamDescriptor

        public void removeParamDescriptor​(ToolParameterDescriptor descriptor)
        Removes the given parameter descriptor from the internal parameter descriptor list
        Parameters:
        descriptor - The descriptor to be removed
      • removeParamDescriptors

        public void removeParamDescriptors​(List<ToolParameterDescriptor> descriptors)
        Removes the given descriptors from the internal parameter descriptor list
        Parameters:
        descriptors - The list of descriptors to be removed
      • getToolParameterDescriptors

        public List<ToolParameterDescriptor> getToolParameterDescriptors()
        Gets all the parameter descriptors
        Returns:
        The list of parameter descriptors
      • setAlias

        public void setAlias​(String alias)
        Setter for the Alias field
      • setLabel

        public void setLabel​(String label)
        Setter for the Label field
      • seVersion

        public void seVersion​(String version)
        Setter for the Version field
      • setDescription

        public void setDescription​(String description)
        Setter for the Description field
      • setAuthors

        public void setAuthors​(String authors)
        Setter for the Authors field
      • setCopyright

        public void setCopyright​(String copyright)
        Setter for the Copyright field
      • setName

        public void setName​(String name)
        Setter for the Name field
      • setOperatorClass

        public void setOperatorClass​(Class<? extends Operator> operatorClass)
        Setter for the operator class
      • getCopyright

        public String getCopyright()
        Specified by:
        getCopyright in interface OperatorDescriptor
        Returns:
        The copyright notice for the operator code, or null if not declared.
      • isInternal

        public boolean isInternal()
        Specified by:
        isInternal in interface OperatorDescriptor
        Returns:
        If true, this operator is considered for internal use only and thus may not be exposed in user interfaces. The default is false.
      • isAutoWriteDisabled

        public boolean isAutoWriteDisabled()
        Description copied from interface: OperatorDescriptor
        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.

        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.

        Specified by:
        isAutoWriteDisabled in interface OperatorDescriptor
        Returns:
        If true, the framework will prevent automatic writing of the target product to the file system.
      • getName

        public String getName()
        Specified by:
        getName in interface ElementDescriptor
        Returns:
        The symbolic name used to unambiguously identify this element. E.g. the fully qualified name of a Java class.
      • getAlias

        public String getAlias()
        Specified by:
        getAlias in interface ElementDescriptor
        Returns:
        A short form of the symbolic name, or null if not declared.
      • getLabel

        public String getLabel()
        Specified by:
        getLabel in interface ElementDescriptor
        Returns:
        A human-readable version of the symbolic name to be used in user interfaces, or null if not declared.
      • getMenuLocation

        public String getMenuLocation()
        Getter for the Menu Location field
      • setMenuLocation

        public void setMenuLocation​(String value)
        Setter for the Menu Location field
      • getSource

        public String getSource()
        Getter for the source of the descriptor. The source can be either "package" (coming from a nbm package) or "user" (user-defined).
      • setSource

        public void setSource​(String value)
        Setter for the Source field.
      • isFromPackage

        public boolean isFromPackage()
        Determines if the source of this descriptor is from a package or creadet/modified by user.
      • isHandlingOutputName

        public boolean isHandlingOutputName()
        Determines if the tool would produce by itself the name of the output product.
      • setHandlingOutputName

        public void setHandlingOutputName​(boolean value)
        Setter for the isHandlingOutputName member.
      • getHelpID

        public String getHelpID()
      • setHelpID

        public void setHelpID​(String value)
      • getTemplate

        public FileTemplate getTemplate()
        Getter for the Template File Location field
      • getWorkingDir

        public String getWorkingDir()
        Getter for the Working Directory field
      • setWorkingDir

        public void setWorkingDir​(String workingDir)
        Setter for the Working Directory field
      • getMainToolFileLocation

        public String getMainToolFileLocation()
        Getter for the Tool File Location field
      • setMainToolFileLocation

        public void setMainToolFileLocation​(String mainToolFileLocation)
        Setter for the Tool File Location field
      • resolveVariables

        public File resolveVariables​(String location)
      • resolveVariables

        public File resolveVariables​(File file)
      • setProgressPattern

        public void setProgressPattern​(String pattern)
        Setter for the Progress Pattern field. The pattern is a regular expression.
      • getProgressPattern

        public String getProgressPattern()
        Getter for the Progress Pattern field
      • setErrorPattern

        public void setErrorPattern​(String pattern)
        Setter for the Error Pattern field. The pattern is a regular expression.
      • getErrorPattern

        public String getErrorPattern()
        Getter for the Error Pattern field
      • setStepPattern

        public void setStepPattern​(String pattern)
        Setter for the Step progress Pattern field. The pattern is a regular expression.
      • getStepPattern

        public String getStepPattern()
        Getter for the Step progress Pattern field
      • getProcessingWriter

        public String getProcessingWriter()
        Getter for the Pre-processing Writer field
      • setProcessingWriter

        public void setProcessingWriter​(String processingWriter)
        Setter for the Pre-processing Writer field
      • shouldWriteBeforeProcessing

        public Boolean shouldWriteBeforeProcessing()
        Getter for the Write Before Processing field
      • writeBeforeProcessing

        public void writeBeforeProcessing​(Boolean writeForProcessing)
        Setter for the Write Before Processing field
      • getPreprocessorExternalTool

        public String getPreprocessorExternalTool()
        Getter for the Pre-processing External Tool field
      • setPreprocessorExternalTool

        public void setPreprocessorExternalTool​(String preprocessorExternalTool)
        Setter for the Pre-processing External Tool field
      • getPreprocessTool

        public Boolean getPreprocessTool()
        Getter for the Has Pre-processing External Tool field
      • setPreprocessTool

        public void setPreprocessTool​(Boolean preprocessTool)
        Setter for the Has Pre-processing External Tool field
      • getWindowsBundle

        public Bundle getWindowsBundle()
      • setWindowsBundle

        public void setWindowsBundle​(Bundle bundle)
      • getLinuxBundle

        public Bundle getLinuxBundle()
      • setLinuxBundle

        public void setLinuxBundle​(Bundle bundle)
      • getMacosxBundle

        public Bundle getMacosxBundle()
      • setMacosxBundle

        public void setMacosxBundle​(Bundle bundle)
      • getBundle

        public Bundle getBundle()
      • getVariables

        public List<SystemVariable> getVariables()
        Gets the list of user-defined system variables
      • getVariableValue

        public String getVariableValue​(String key)
      • getSourceProductCount

        public int getSourceProductCount()
        Returns the number of source products
      • setSourceProductCount

        public void setSourceProductCount​(int value)
        Sets the number of source products. It re-dimensions internally the sourceProductDescriptors array. This is useful in the execution dialog, because it dictates how many selectors should be rendered.
      • addVariable

        public void addVariable​(SystemVariable variable)
        Adds a user-defined system variable
        Parameters:
        variable - The variable to be added
      • fromXml

        public static ToolAdapterOperatorDescriptor fromXml​(URL url,
                                                            ClassLoader classLoader)
        Loads an operator descriptor from an XML document.
        Parameters:
        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.
        Returns:
        A new operator descriptor.
      • fromXml

        public static ToolAdapterOperatorDescriptor fromXml​(File file,
                                                            ClassLoader classLoader)
                                                     throws OperatorException
        Loads an operator descriptor from an XML document.
        Parameters:
        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.
        Returns:
        A new operator descriptor.
        Throws:
        OperatorException
      • fromXml

        public static ToolAdapterOperatorDescriptor fromXml​(Reader reader,
                                                            String resourceName,
                                                            ClassLoader classLoader)
                                                     throws OperatorException
        Loads an operator descriptor from an XML document.
        Parameters:
        reader - The reader providing a valid operator descriptor XML document.
        resourceName - Used in error messages
        classLoader - The class loader is used to load classed specified in the xml. For example the class defined by the operatorClass tag.
        Returns:
        A new operator descriptor.
        Throws:
        OperatorException
      • toXml

        public String toXml​(ClassLoader classLoader)
        Converts an operator descriptor to XML.
        Parameters:
        classLoader - The class loader is used to load classed specified in the xml. For example the class defined by the operatorClass tag.
        Returns:
        A string containing valid operator descriptor XML.