Class S3DataResource

All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="execbroker:S3DataResource", role=objectType) public class S3DataResource extends AbstractDataResource implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A data resource in a S3 storage system. objectType: S3DataResource
  • Field Details

    • endpoint

      @VoDml(id="execbroker:S3DataResource.endpoint", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String endpoint
      The endpoint address of the S3 service. : Attribute endpoint : multiplicity 1
    • template

      @VoDml(id="execbroker:S3DataResource.template", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String template
      The URL template for the S3 service. : Attribute template : multiplicity 1
    • bucket

      @VoDml(id="execbroker:S3DataResource.bucket", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String bucket
      The target bucket name. : Attribute bucket : multiplicity 1
    • object

      @VoDml(id="execbroker:S3DataResource.object", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String object
      The target object name. Leaving this blank will mount the whole bucket as a directory. : Attribute object : multiplicity 1
  • Constructor Details

    • S3DataResource

      public S3DataResource()
      Creates a new S3DataResource
    • S3DataResource

      public S3DataResource(String endpoint, String template, String bucket, String object, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta)
      full parameter constructor.
      Parameters:
      endpoint - The endpoint address of the S3 service.
      template - The URL template for the S3 service.
      bucket - The target bucket name.
      object - The target object name. Leaving this blank will mount the whole bucket as a directory.
      phase - The lifecycle phase.
      schedule - The lifecycle schedule.
      kind - The component type identifier.
      meta - The component metadata.
    • S3DataResource

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

      public S3DataResource(AbstractDataResource superinstance, String endpoint, String template, String bucket, String object)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      endpoint - The endpoint address of the S3 service.
      template - The URL template for the S3 service.
      bucket - The target bucket name.
      object - The target object name. Leaving this blank will mount the whole bucket as a directory.
  • Method Details

    • copyMe

      public AbstractComponent copyMe()
      make a clone of the object taking into account current polymorhic type.
      Specified by:
      copyMe in class AbstractDataResource
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(S3DataResource 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.
    • getEndpoint

      public String getEndpoint()
      Returns endpoint Attribute.
      Returns:
      endpoint Attribute
    • setEndpoint

      public void setEndpoint(String pEndpoint)
      Set endpoint Attribute.
      Parameters:
      pEndpoint - value to set
    • withEndpoint

      public S3DataResource withEndpoint(String pEndpoint)
      fluent setter for endpoint Attribute.
      Parameters:
      pEndpoint - value to set
      Returns:
      S3DataResource
    • getTemplate

      public String getTemplate()
      Returns template Attribute.
      Returns:
      template Attribute
    • setTemplate

      public void setTemplate(String pTemplate)
      Set template Attribute.
      Parameters:
      pTemplate - value to set
    • withTemplate

      public S3DataResource withTemplate(String pTemplate)
      fluent setter for template Attribute.
      Parameters:
      pTemplate - value to set
      Returns:
      S3DataResource
    • getBucket

      public String getBucket()
      Returns bucket Attribute.
      Returns:
      bucket Attribute
    • setBucket

      public void setBucket(String pBucket)
      Set bucket Attribute.
      Parameters:
      pBucket - value to set
    • withBucket

      public S3DataResource withBucket(String pBucket)
      fluent setter for bucket Attribute.
      Parameters:
      pBucket - value to set
      Returns:
      S3DataResource
    • getObject

      public String getObject()
      Returns object Attribute.
      Returns:
      object Attribute
    • setObject

      public void setObject(String pObject)
      Set object Attribute.
      Parameters:
      pObject - value to set
    • withObject

      public S3DataResource withObject(String pObject)
      fluent setter for object Attribute.
      Parameters:
      pObject - value to set
      Returns:
      S3DataResource
    • createS3DataResource

      public static S3DataResource createS3DataResource(Consumer<S3DataResource.S3DataResourceBuilder> f)
      create a S3DataResource 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
      Overrides:
      forceLoad in class AbstractDataResource
    • delete

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