Class ComponentMetadata

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

@Entity @VoDml(id="execbroker:ComponentMetadata", role=objectType) public class ComponentMetadata extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A metadata block for our components. This includes a name, a UUID identifier, a URL, and lists of the messages and options. objectType: ComponentMetadata
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • uuid

      @VoDml(id="execbroker:ComponentMetadata.uuid", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String uuid
      A machine readable UUID, assigned when a component is created in a service. : Attribute uuid : multiplicity 1
    • name

      @VoDml(id="execbroker:ComponentMetadata.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name
      A human readable name, assigned by the client. : Attribute name : multiplicity 1
    • url

      @VoDml(id="execbroker:ComponentMetadata.url", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String url
      The URL to access this component. : Attribute url : multiplicity 1
    • description

      @VoDml(id="execbroker:ComponentMetadata.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      A human readable description. : Attribute description : multiplicity 1
    • created

      @VoDml(id="execbroker:ComponentMetadata.created", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String created
      The date and time the component was created. : Attribute created : multiplicity 1
    • modified

      @VoDml(id="execbroker:ComponentMetadata.modified", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String modified
      The date and time the component was last modified. : Attribute modified : multiplicity 1
    • messages

      @VoDml(id="execbroker:ComponentMetadata.messages", role=composition, type="execbroker:MessageItem", typeRole=objectType) protected List<MessageItem> messages
      A list of messages about this component. composition messages : ( Multiplicity : 1..* )
    • options

      @VoDml(id="execbroker:ComponentMetadata.options", role=composition, type="execbroker:AbstractOption", typeRole=objectType) protected List<AbstractOption> options
      A List of options the client can apply to this component. composition options : ( Multiplicity : 1..* )
  • Constructor Details

    • ComponentMetadata

      public ComponentMetadata()
      Creates a new ComponentMetadata
    • ComponentMetadata

      public ComponentMetadata(String uuid, String name, String url, String description, String created, String modified, List<MessageItem> messages, List<AbstractOption> options)
      full parameter constructor.
      Parameters:
      uuid - A machine readable UUID, assigned when a component is created in a service.
      name - A human readable name, assigned by the client.
      url - The URL to access this component.
      description - A human readable description.
      created - The date and time the component was created.
      modified - The date and time the component was last modified.
      messages - A list of messages about this component.
      options - A List of options the client can apply to this component.
    • ComponentMetadata

      public ComponentMetadata(ComponentMetadata 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
    • updateUsing

      public void updateUsing(ComponentMetadata 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.
    • getUuid

      public String getUuid()
      Returns uuid Attribute.
      Returns:
      uuid Attribute
    • setUuid

      public void setUuid(String pUuid)
      Set uuid Attribute.
      Parameters:
      pUuid - value to set
    • withUuid

      public ComponentMetadata withUuid(String pUuid)
      fluent setter for uuid Attribute.
      Parameters:
      pUuid - value to set
      Returns:
      ComponentMetadata
    • getName

      public String getName()
      Returns name Attribute.
      Returns:
      name Attribute
    • setName

      public void setName(String pName)
      Set name Attribute.
      Parameters:
      pName - value to set
    • withName

      public ComponentMetadata withName(String pName)
      fluent setter for name Attribute.
      Parameters:
      pName - value to set
      Returns:
      ComponentMetadata
    • getUrl

      public String getUrl()
      Returns url Attribute.
      Returns:
      url Attribute
    • setUrl

      public void setUrl(String pUrl)
      Set url Attribute.
      Parameters:
      pUrl - value to set
    • withUrl

      public ComponentMetadata withUrl(String pUrl)
      fluent setter for url Attribute.
      Parameters:
      pUrl - value to set
      Returns:
      ComponentMetadata
    • getDescription

      public String getDescription()
      Returns description Attribute.
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Set description Attribute.
      Parameters:
      pDescription - value to set
    • withDescription

      public ComponentMetadata withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      ComponentMetadata
    • getCreated

      public String getCreated()
      Returns created Attribute.
      Returns:
      created Attribute
    • setCreated

      public void setCreated(String pCreated)
      Set created Attribute.
      Parameters:
      pCreated - value to set
    • withCreated

      public ComponentMetadata withCreated(String pCreated)
      fluent setter for created Attribute.
      Parameters:
      pCreated - value to set
      Returns:
      ComponentMetadata
    • getModified

      public String getModified()
      Returns modified Attribute.
      Returns:
      modified Attribute
    • setModified

      public void setModified(String pModified)
      Set modified Attribute.
      Parameters:
      pModified - value to set
    • withModified

      public ComponentMetadata withModified(String pModified)
      fluent setter for modified Attribute.
      Parameters:
      pModified - value to set
      Returns:
      ComponentMetadata
    • getMessages

      public List<MessageItem> getMessages()
      Returns messages composition as an immutable list.
      Returns:
      messages composition.
    • setMessages

      public void setMessages(List<MessageItem> pMessages)
      Defines whole messages composition.
      Parameters:
      pMessages - composition to set.
    • addToMessages

      public void addToMessages(MessageItem p)
      Add a org.ivoa.dm.executionbroker.MessageItem to the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.MessageItem to add
    • removeFromMessages

      public void removeFromMessages(MessageItem p)
      Remove a org.ivoa.dm.executionbroker.MessageItem from the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.MessageItem to remove
    • replaceInMessages

      public void replaceInMessages(MessageItem _p)
      update a org.ivoa.dm.executionbroker.MessageItem in the composition.
      Parameters:
      _p - org.ivoa.dm.executionbroker.MessageItem to update the match is done via the database key
    • getOptions

      public List<AbstractOption> getOptions()
      Returns options composition as an immutable list.
      Returns:
      options composition.
    • setOptions

      public void setOptions(List<AbstractOption> pOptions)
      Defines whole options composition.
      Parameters:
      pOptions - composition to set.
    • addToOptions

      public void addToOptions(AbstractOption p)
      Add a org.ivoa.dm.executionbroker.AbstractOption to the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.AbstractOption to add
    • removeFromOptions

      public void removeFromOptions(AbstractOption p)
      Remove a org.ivoa.dm.executionbroker.AbstractOption from the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.AbstractOption to remove
    • replaceInOptions

      public void replaceInOptions(AbstractOption _p)
      update a org.ivoa.dm.executionbroker.AbstractOption in the composition.
      Parameters:
      _p - org.ivoa.dm.executionbroker.AbstractOption to update the match is done via the database key
    • createComponentMetadata

      public static ComponentMetadata createComponentMetadata(Consumer<ComponentMetadata.ComponentMetadataBuilder> f)
      create a ComponentMetadata 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>