Package cz.vutbr.fit.layout.provider
Class OperatorWrapperProvider
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseService
-
- cz.vutbr.fit.layout.impl.BaseParametrizedOperation
-
- cz.vutbr.fit.layout.impl.BaseArtifactService
-
- cz.vutbr.fit.layout.provider.OperatorWrapperProvider
-
- All Implemented Interfaces:
ArtifactService,ParametrizedOperation,Service
public class OperatorWrapperProvider extends BaseArtifactService
An area tree provider that wraps a single area tree operator. It consumes an area tree applies the given operator with params and produces another area tree.- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description OperatorWrapperProvider(AreaTreeOperator operator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Parameter>defineParams()Creates the parameter definition for this operation.StringgetCategory()A category that allows to group similar services.org.eclipse.rdf4j.model.IRIgetConsumes()The artifact type consumed.StringgetDescription()Obtains a longer description of the service.StringgetId()Obtains a unique ID of the serviceStringgetName()Obtains a descriptive name of the service that may be presented to the user.AreaTreeOperatorgetOperator()ObjectgetParam(String name)Obtains the parameter using the appropriate getter method (if present).org.eclipse.rdf4j.model.IRIgetProduces()The artifact type produced.Artifactprocess(Artifact input)Consumes an input artifact and produces an output artifact.booleansetParam(String name, Object value)Sets the parameter using the appropriate setter method (if present).-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseArtifactService
toString
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseParametrizedOperation
getParams, getParamString
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseService
getServiceManager, setServiceManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cz.vutbr.fit.layout.api.Service
setServiceManager
-
-
-
-
Constructor Detail
-
OperatorWrapperProvider
public OperatorWrapperProvider(AreaTreeOperator operator)
-
-
Method Detail
-
getOperator
public AreaTreeOperator getOperator()
-
getId
public String getId()
Description copied from interface:ServiceObtains a unique ID of the service
-
getName
public String getName()
Description copied from interface:ServiceObtains a descriptive name of the service that may be presented to the user.- Returns:
- the operator name
-
getDescription
public String getDescription()
Description copied from interface:ServiceObtains a longer description of the service.- Returns:
- the description
-
getCategory
public String getCategory()
Description copied from interface:ServiceA category that allows to group similar services.- Specified by:
getCategoryin interfaceService- Overrides:
getCategoryin classBaseArtifactService- Returns:
- Category name or
nullwhen no category is assigned.
-
defineParams
public List<Parameter> defineParams()
Description copied from class:BaseParametrizedOperationCreates the parameter definition for this operation.- Overrides:
defineParamsin classBaseParametrizedOperation- Returns:
- The list of parameters.
-
setParam
public boolean setParam(String name, Object value)
Description copied from class:BaseParametrizedOperationSets the parameter using the appropriate setter method (if present).- Specified by:
setParamin interfaceParametrizedOperation- Overrides:
setParamin classBaseParametrizedOperation- Parameters:
name- parameter namevalue- parameter value- Returns:
- true when successfully set, false for unknown parameter or invalid value
-
getParam
public Object getParam(String name)
Description copied from class:BaseParametrizedOperationObtains the parameter using the appropriate getter method (if present).- Specified by:
getParamin interfaceParametrizedOperation- Overrides:
getParamin classBaseParametrizedOperation- Parameters:
name- the parameter name- Returns:
- the parameter value or
nullfor unknown parameter
-
getConsumes
public org.eclipse.rdf4j.model.IRI getConsumes()
Description copied from interface:ArtifactServiceThe artifact type consumed.- Returns:
- the artifact type IRI or
nullwhen nothing is consumed (source only).
-
getProduces
public org.eclipse.rdf4j.model.IRI getProduces()
Description copied from interface:ArtifactServiceThe artifact type produced.- Returns:
- the artifact type IRI or
nullwhen nothing is produced (consumer only).
-
process
public Artifact process(Artifact input) throws ServiceException
Description copied from interface:ArtifactServiceConsumes an input artifact and produces an output artifact.- Parameters:
input- The input artifact ornullwhen nothing is consumed- Returns:
- the output artifact
nullwhen nothing is produced - Throws:
ServiceException
-
-