Package org.ivoa.dm.tool
Class Tool
java.lang.Object
org.ivoa.dm.tool.Tool
- All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement,org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
@Entity
@VoDml(id="tool:Tool",
role=objectType)
public class Tool
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>, org.ivoa.vodml.jaxb.XmlIdManagement
Definition of a Library Tool.
objectType: Tool
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for Tool, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionTokenized initial command; supports {{inputs.key}} min_length=1.Environment map entries.protected StringUnique tool identifier.protected ToolImageReferenceObject image : Tool container image reference.protected ToolInterfaceTool interface definition - note that the inputs will be mounted in the /inputs directory and the outputs in the /outputs directory.protected PerformanceProfilePerformance profile for the tool. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.tool.EnvVar to the composition.static Toolcreate a Tool in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns command Attribute.getEnv()Returns env composition as an immutable list.getId()Returns id Attribute.getImage()Returns image ReferenceReturns interface Attribute.Returns performanceProfile Attribute.getXmlId()booleanvoidRemove a org.ivoa.dm.tool.EnvVar from the composition.voidreplaceInEnv(EnvVar _p) update a org.ivoa.dm.tool.EnvVar in the composition.voidsetCommand(List<String> pCommand) Set command Attribute.voidDefines whole env composition.voidSet id Attribute.voidDefines image ReferencevoidsetInterface(ToolInterface pInterface) Set interface Attribute.voidsetPerformanceProfile(PerformanceProfile pPerformanceProfile) Set performanceProfile Attribute.voidvoidupdates any cloned references that are contained within the hierarchy.voidupdateUsing(Tool other) Update this object with the content of the given object.withCommand(List<String> pCommand) fluent setter for command Attribute.fluent setter for id Attribute.withInterface(ToolInterface pInterface) fluent setter for interface Attribute.withPerformanceProfile(PerformanceProfile pPerformanceProfile) fluent setter for performanceProfile Attribute.
-
Field Details
-
id
@VoDml(id="tool:Tool.id", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String idUnique tool identifier. : Attribute id type ivoa:string : multiplicity 1 -
image
@VoDml(id="tool:Tool.image", role=reference, type="tool:ToolImage", typeRole=objectType) protected ToolImage imageReferenceObject image : Tool container image reference. ( Multiplicity : 1 ) -
command
@VoDml(id="tool:Tool.command", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> commandTokenized initial command; supports {{inputs.key}} min_length=1. : Attribute command type ivoa:string : multiplicity 1..* -
env
@VoDml(id="tool:Tool.env", role=composition, type="tool:EnvVar", typeRole=objectType) protected List<EnvVar> envEnvironment map entries. composition env : ( Multiplicity : 0..* ) -
interface_
@VoDml(id="tool:Tool.interface", role=composition, type="pdl:ToolInterface", typeRole=objectType) protected ToolInterface interface_Tool interface definition - note that the inputs will be mounted in the /inputs directory and the outputs in the /outputs directory. composition interface : ( Multiplicity : 1 ) -
performanceProfile
@VoDml(id="tool:Tool.performanceProfile", role=composition, type="tool:PerformanceProfile", typeRole=objectType) protected PerformanceProfile performanceProfilePerformance profile for the tool. composition performanceProfile : ( Multiplicity : 1 )
-
-
Constructor Details
-
Tool
public Tool()Creates a new Tool -
Tool
public Tool(String id, ToolImage image, List<String> command, List<EnvVar> env, ToolInterface interface_, PerformanceProfile performanceProfile) full parameter constructor.- Parameters:
id- Unique tool identifier.image- Tool container image reference.command- Tokenized initial command; supports {{inputs.key}} min_length=1.env- Environment map entries.interface_- Tool interface definition - note that the inputs will be mounted in the /inputs directory and the outputs in the /outputs directory.performanceProfile- Performance profile for the tool.
-
Tool
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy. -
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getId
Returns id Attribute.- Specified by:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>- Returns:
- id Attribute
-
setId
Set id Attribute.- Parameters:
pId- value to set
-
withId
fluent setter for id Attribute.- Parameters:
pId- value to set- Returns:
- Tool
-
getImage
Returns image Reference- Returns:
- image Reference
-
setImage
Defines image Reference- Parameters:
pImage- reference to set
-
getCommand
Returns command Attribute.- Returns:
- command Attribute
-
setCommand
Set command Attribute.- Parameters:
pCommand- value to set
-
withCommand
fluent setter for command Attribute.- Parameters:
pCommand- value to set- Returns:
- Tool
-
getEnv
Returns env composition as an immutable list.- Returns:
- env composition.
-
setEnv
Defines whole env composition.- Parameters:
pEnv- composition to set.
-
addToEnv
Add a org.ivoa.dm.tool.EnvVar to the composition.- Parameters:
p- org.ivoa.dm.tool.EnvVar to add
-
removeFromEnv
Remove a org.ivoa.dm.tool.EnvVar from the composition.- Parameters:
p- org.ivoa.dm.tool.EnvVar to remove
-
replaceInEnv
update a org.ivoa.dm.tool.EnvVar in the composition.- Parameters:
_p- org.ivoa.dm.tool.EnvVar to update the match is done via the database key
-
getInterface
Returns interface Attribute.- Returns:
- interface Attribute
-
setInterface
Set interface Attribute.- Parameters:
pInterface- value to set
-
withInterface
fluent setter for interface Attribute.- Parameters:
pInterface- value to set- Returns:
- Tool
-
getPerformanceProfile
Returns performanceProfile Attribute.- Returns:
- performanceProfile Attribute
-
setPerformanceProfile
Set performanceProfile Attribute.- Parameters:
pPerformanceProfile- value to set
-
withPerformanceProfile
fluent setter for performanceProfile Attribute.- Parameters:
pPerformanceProfile- value to set- Returns:
- Tool
-
getXmlId
- Specified by:
getXmlIdin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlIdin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKeyin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
createTool
create a Tool in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
-