Class ToolInterface

java.lang.Object
org.ivoa.dm.pdl.ToolInterface
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="pdl:ToolInterface", role=objectType) public class ToolInterface extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
The definition of the tool interface. objectType: ToolInterface
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • parameters

      @VoDml(id="pdl:ToolInterface.parameters", role=composition, type="pdl:ParameterDefinition", typeRole=objectType) protected List<ParameterDefinition> parameters
      All possible parameters for the tool interface. composition parameters : ( Multiplicity : 0..* )
    • groups

      @VoDml(id="pdl:ToolInterface.groups", role=composition, type="pdl:ParameterGroup", typeRole=objectType) protected List<ParameterGroup> groups
      all the Parameter Groups. composition groups : ( Multiplicity : 0..* )
    • input

      @VoDml(id="pdl:ToolInterface.input", role=reference, type="pdl:ParameterGroup", typeRole=objectType) protected ParameterGroup input
      ReferenceObject input : The group of of parameters that are required for tool execution - i.e. input. ( Multiplicity : 0..1 )
    • output

      @VoDml(id="pdl:ToolInterface.output", role=reference, type="pdl:ParameterGroup", typeRole=objectType) protected ParameterGroup output
      ReferenceObject output : The group of parameters that are produced by tool execution - i.e. output. ( Multiplicity : 0..1 )
  • Constructor Details

    • ToolInterface

      public ToolInterface()
      Creates a new ToolInterface
    • ToolInterface

      public ToolInterface(List<ParameterDefinition> parameters, List<ParameterGroup> groups, ParameterGroup input, ParameterGroup output)
      full parameter constructor.
      Parameters:
      parameters - All possible parameters for the tool interface.
      groups - all the Parameter Groups.
      input - The group of of parameters that are required for tool execution - i.e. input.
      output - The group of parameters that are produced by tool execution - i.e. output.
    • ToolInterface

      public ToolInterface(ToolInterface other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • updateUsing

      public void updateUsing(ToolInterface other)
      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.
    • getParameters

      public List<ParameterDefinition> getParameters()
      Returns parameters composition as an immutable list.
      Returns:
      parameters composition.
    • setParameters

      public void setParameters(List<ParameterDefinition> pParameters)
      Defines whole parameters composition.
      Parameters:
      pParameters - composition to set.
    • addToParameters

      public void addToParameters(ParameterDefinition p)
      Add a org.ivoa.dm.pdl.ParameterDefinition to the composition.
      Parameters:
      p - org.ivoa.dm.pdl.ParameterDefinition to add
    • removeFromParameters

      public void removeFromParameters(ParameterDefinition p)
      Remove a org.ivoa.dm.pdl.ParameterDefinition from the composition.
      Parameters:
      p - org.ivoa.dm.pdl.ParameterDefinition to remove
    • replaceInParameters

      public void replaceInParameters(ParameterDefinition _p)
      update a org.ivoa.dm.pdl.ParameterDefinition in the composition.
      Parameters:
      _p - org.ivoa.dm.pdl.ParameterDefinition to update the match is done via the database key
    • getGroups

      public List<ParameterGroup> getGroups()
      Returns groups composition as an immutable list.
      Returns:
      groups composition.
    • setGroups

      public void setGroups(List<ParameterGroup> pGroups)
      Defines whole groups composition.
      Parameters:
      pGroups - composition to set.
    • addToGroups

      public void addToGroups(ParameterGroup p)
      Add a org.ivoa.dm.pdl.ParameterGroup to the composition.
      Parameters:
      p - org.ivoa.dm.pdl.ParameterGroup to add
    • removeFromGroups

      public void removeFromGroups(ParameterGroup p)
      Remove a org.ivoa.dm.pdl.ParameterGroup from the composition.
      Parameters:
      p - org.ivoa.dm.pdl.ParameterGroup to remove
    • replaceInGroups

      public void replaceInGroups(ParameterGroup _p)
      update a org.ivoa.dm.pdl.ParameterGroup in the composition.
      Parameters:
      _p - org.ivoa.dm.pdl.ParameterGroup to update the match is done via the database key
    • getInput

      public ParameterGroup getInput()
      Returns input Reference
      Returns:
      input Reference
    • setInput

      public void setInput(ParameterGroup pInput)
      Defines input Reference
      Parameters:
      pInput - reference to set
    • getOutput

      public ParameterGroup getOutput()
      Returns output Reference
      Returns:
      output Reference
    • setOutput

      public void setOutput(ParameterGroup pOutput)
      Defines output Reference
      Parameters:
      pOutput - reference to set
    • createToolInterface

      public static ToolInterface createToolInterface(Consumer<ToolInterface.ToolInterfaceBuilder> f)
      create a ToolInterface in functional builder style.
      Parameters:
      f - the functional builder.
      Returns:
      an object initialized from the builder.
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>