Class Operation
- java.lang.Object
-
- es.bsc.dataclay.util.MgrObject<OperationID>
-
- es.bsc.dataclay.util.management.classmgr.Operation
-
public final class Operation extends MgrObject<OperationID>
This class represents an Operation.
-
-
Constructor Summary
Constructors Constructor Description Operation()Creates an empty OperationOperation(String newname, String newdescriptor, String newsignature, String newnameAndDescriptor, String newnamespace, String newclassName, boolean newisAbstract)Operation constructor with provided specifications
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotation(Annotation annotation)Add an annotation to the operationbooleanaddImplementation(Implementation newimplementation)Add a new Implementation to the list of ImplementationsvoidaddLanguageDepInfo(LanguageDependantOperationInfo langInfo)Add language dependant informationvoidaddParam(String paramName, Type newparam)Add a new Params to the map of Paramsbooleanequals(Object object)booleanexistsImplementationInOperation(ImplementationID implementationID)This operation verifies if a Implementation identified by implementationID exists in this Operation.List<Annotation>getAnnotations()Get annotationsStringgetClassName()Get classNameStringgetDescriptor()Get descriptorImplementationgetImplementationInOperation(ImplementationID implementationID)Get the implementation with ID provided in this operation or NULL if it does not exist.List<Implementation>getImplementations()booleangetIsAbstract()Get the Operation::isAbstractbooleangetIsStaticConstructor()Get the Operation::isStaticConstructorJavaOperationInfogetJavaOperationInfo()Get Java language-dependant information of the operationMap<CommonMessages.Langs,LanguageDependantOperationInfo>getLanguageDepInfos()Get the Operation::languageDepInfosMetaClassIDgetMetaClassID()Get the Operation::metaClassIDStringgetName()Get the name of this OperationStringgetNameAndDescriptor()Get nameAndDescriptorStringgetNamespace()Get namespaceNamespaceIDgetNamespaceID()Get the Operation::namespaceIDMap<String,Type>getParams()Get the Parameters of this OperationList<String>getParamsOrder()Get the Parameter order of this OperationList<Type>getParamsTypesInOrder()Get the Parameters types of this OperationPythonOperationInfogetPythonOperationInfo()Get Python language-dependant information of the operationTypegetReturnType()Get the Operation::returnTypeStringgetSignature()Generate operation signatureinthashCode()booleanremoveImplementation(ImplementationID implementationID)This operation remove a Implementation identified by implementationID in the list of implementations.voidsetAnnotations(List<Annotation> annotations)Set annotationsvoidsetClassName(String newclassName)Set classNamevoidsetDescriptor(String newdescriptor)Set descriptorvoidsetImplementations(List<Implementation> newimplementations)voidsetImplementations(SortedSet<Implementation> newimplementations)voidsetIsAbstract(boolean newisAbstract)Set the Operation::isAbstractvoidsetIsStaticConstructor(boolean newisStaticConstructor)Set the Operation::isStaticConstructorvoidsetLanguageDepInfos(Map<CommonMessages.Langs,LanguageDependantOperationInfo> newlanguageDepInfos)Set the Operation::languageDepInfosvoidsetMetaClassID(MetaClassID newmetaClassID)Set the Operation::metaClassIDvoidsetName(String newname)Set the Operation::name of this OperationvoidsetNameAndDescriptor(String newnameAndDescriptor)Set nameAndDescriptorvoidsetNamespace(String newnamespace)Set namespacevoidsetNamespaceID(NamespaceID newnamespaceID)Set the Operation::namespaceIDvoidsetParams(Map<String,Type> newparams)Set the Operation::paramsvoidsetParamsOrder(List<String> newparamOrder)Set the Operation::paramOrdervoidsetReturnType(Type newreturnType)Set the Operation::returnTypevoidsetSignature(String newsignature)Set the Operation::signatureStringtoString()-
Methods inherited from class es.bsc.dataclay.util.MgrObject
getDataClayID, setDataClayID
-
-
-
-
Constructor Detail
-
Operation
public Operation()
Creates an empty Operation
-
Operation
public Operation(String newname, String newdescriptor, String newsignature, String newnameAndDescriptor, String newnamespace, String newclassName, boolean newisAbstract)
Operation constructor with provided specifications- Parameters:
newname- Name of the operationnewdescriptor- Descriptor of the operation (signature without subtypes)newsignature- Signature of the operationnewnameAndDescriptor- Name and descriptor of the operationnewnamespace- Namespace of the class containing operationnewclassName- Name of class of the operationnewisAbstract- Indicates operation is abstract
-
-
Method Detail
-
getName
public String getName()
Get the name of this Operation- Returns:
- Operation::name of container Operation.
-
setName
public void setName(String newname)
Set the Operation::name of this Operation- Parameters:
newname- New name to be set
-
getParams
public Map<String,Type> getParams()
Get the Parameters of this Operation- Returns:
- Operation::params of container Operation.
-
getParamsTypesInOrder
public List<Type> getParamsTypesInOrder()
Get the Parameters types of this Operation- Returns:
- Operation::params of container Operation.
-
setParams
public void setParams(Map<String,Type> newparams)
Set the Operation::params- Parameters:
newparams- Parameter to set of this Operation.
-
getParamsOrder
public List<String> getParamsOrder()
Get the Parameter order of this Operation- Returns:
- Operation::paramOrder of container Operation.
-
setParamsOrder
public void setParamsOrder(List<String> newparamOrder)
Set the Operation::paramOrder- Parameters:
newparamOrder- The list of name of parameters, in the proper order.
-
addParam
public void addParam(String paramName, Type newparam)
Add a new Params to the map of Params- Parameters:
paramName- Name of the parameternewparam- Param to add
-
getImplementations
public List<Implementation> getImplementations()
- Returns:
- the implementations
-
setImplementations
public void setImplementations(SortedSet<Implementation> newimplementations)
- Parameters:
newimplementations- the implementations to set
-
setImplementations
public void setImplementations(List<Implementation> newimplementations)
- Parameters:
newimplementations- the implementations to set This is YAML friendly for lists --instead of sets which Python doesn't like because they contain non-hashable fields.
-
addImplementation
public boolean addImplementation(Implementation newimplementation)
Add a new Implementation to the list of Implementations- Parameters:
newimplementation- Implementation to add- Returns:
- TRUE if Implementation was not found and added. FALSE, otherwise.
-
existsImplementationInOperation
public boolean existsImplementationInOperation(ImplementationID implementationID)
This operation verifies if a Implementation identified by implementationID exists in this Operation.- Parameters:
implementationID- ID of the Implementation to query- Returns:
- TRUE if the provided Implementation exists in the Operation. FALSE otherwise.
-
getImplementationInOperation
public Implementation getImplementationInOperation(ImplementationID implementationID)
Get the implementation with ID provided in this operation or NULL if it does not exist.- Parameters:
implementationID- ID of the implementation to get- Returns:
- The Implementation in the operation or NULL if it does not exist.
-
removeImplementation
public boolean removeImplementation(ImplementationID implementationID)
This operation remove a Implementation identified by implementationID in the list of implementations.- Parameters:
implementationID- ID of the implementation to remove- Returns:
- TRUE if the provided Implementation was successfully removed from system. FALSE otherwise.
-
getReturnType
public Type getReturnType()
Get the Operation::returnType- Returns:
- the returnType
-
setReturnType
public void setReturnType(Type newreturnType)
Set the Operation::returnType- Parameters:
newreturnType- the returnType
-
getMetaClassID
public MetaClassID getMetaClassID()
Get the Operation::metaClassID- Returns:
- the metaClassID
-
setMetaClassID
public void setMetaClassID(MetaClassID newmetaClassID)
Set the Operation::metaClassID- Parameters:
newmetaClassID- the metaClassID to set
-
getLanguageDepInfos
public Map<CommonMessages.Langs,LanguageDependantOperationInfo> getLanguageDepInfos()
Get the Operation::languageDepInfos- Returns:
- the languageDepInfos
-
getJavaOperationInfo
public JavaOperationInfo getJavaOperationInfo()
Get Java language-dependant information of the operation- Returns:
- Java language-dependant information of the operation
-
getPythonOperationInfo
public PythonOperationInfo getPythonOperationInfo()
Get Python language-dependant information of the operation- Returns:
- Python language-dependant information of the operation
-
setLanguageDepInfos
public void setLanguageDepInfos(Map<CommonMessages.Langs,LanguageDependantOperationInfo> newlanguageDepInfos)
Set the Operation::languageDepInfos- Parameters:
newlanguageDepInfos- the languageDepInfos to set
-
addLanguageDepInfo
public void addLanguageDepInfo(LanguageDependantOperationInfo langInfo)
Add language dependant information- Parameters:
langInfo- Language information
-
getIsAbstract
public boolean getIsAbstract()
Get the Operation::isAbstract- Returns:
- the isAbstract
-
setIsAbstract
public void setIsAbstract(boolean newisAbstract)
Set the Operation::isAbstract- Parameters:
newisAbstract- the isAbstract to set
-
getIsStaticConstructor
public boolean getIsStaticConstructor()
Get the Operation::isStaticConstructor- Returns:
- the isStaticConstructor
-
setIsStaticConstructor
public void setIsStaticConstructor(boolean newisStaticConstructor)
Set the Operation::isStaticConstructor- Parameters:
newisStaticConstructor- the isStaticConstructor to set
-
getNamespaceID
public NamespaceID getNamespaceID()
Get the Operation::namespaceID- Returns:
- the namespaceID
-
setNamespaceID
public void setNamespaceID(NamespaceID newnamespaceID)
Set the Operation::namespaceID- Parameters:
newnamespaceID- the namespaceID to set
-
getNamespace
public String getNamespace()
Get namespace- Returns:
- the namespace
-
setNamespace
public void setNamespace(String newnamespace)
Set namespace- Parameters:
newnamespace- the namespace to set
-
getClassName
public String getClassName()
Get className- Returns:
- the className
-
setClassName
public void setClassName(String newclassName)
Set className- Parameters:
newclassName- the className to set
-
getSignature
public String getSignature()
Generate operation signature- Returns:
- Signature of the operation
-
setSignature
public void setSignature(String newsignature)
Set the Operation::signature- Parameters:
newsignature- the signature to set
-
getDescriptor
public String getDescriptor()
Get descriptor- Returns:
- the descriptor
-
setDescriptor
public void setDescriptor(String newdescriptor)
Set descriptor- Parameters:
newdescriptor- the descriptor to set
-
getNameAndDescriptor
public String getNameAndDescriptor()
Get nameAndDescriptor- Returns:
- the nameAndDescriptor
-
setNameAndDescriptor
public void setNameAndDescriptor(String newnameAndDescriptor)
Set nameAndDescriptor- Parameters:
newnameAndDescriptor- the nameAndDescriptor to set
-
getAnnotations
public List<Annotation> getAnnotations()
Get annotations- Returns:
- List of operation's annotations
-
setAnnotations
public void setAnnotations(List<Annotation> annotations)
Set annotations- Parameters:
annotations- the list of annotations to set
-
addAnnotation
public void addAnnotation(Annotation annotation)
Add an annotation to the operation- Parameters:
annotation- the annotation to add
-
-