Class CustomAxis

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

@Entity @VoDml(id="caom2:CustomAxis", role=objectType) public class CustomAxis extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
description of a custom coordinate axis (new in CAOM-2.4). objectType: CustomAxis
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • ctype

      @VoDml(id="caom2:CustomAxis.ctype", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String ctype
      coordinate type code. : Attribute ctype : multiplicity 1
    • bounds

      @VoDml(id="caom2:CustomAxis.bounds", role=attribute, type="caom2:types.Interval", typeRole=dataType) protected Interval bounds
      custom coordinate coverage (cardinality changed in CAOM-2.5). : Attribute bounds : multiplicity 1
    • samples

      @VoDml(id="caom2:CustomAxis.samples", role=composition, type="caom2:types.IntervalM", typeRole=objectType) protected List<IntervalM> samples
      detailed custom coordinate coverage (refactored in CAOM-2.5). composition samples : ( Multiplicity : 1..* )
    • dimension

      @VoDml(id="caom2:CustomAxis.dimension", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer dimension
      number of discrete samples (pixels) along custom axis. : Attribute dimension : multiplicity 0..1
  • Constructor Details

    • CustomAxis

      public CustomAxis()
      Creates a new CustomAxis
    • CustomAxis

      public CustomAxis(String ctype, Interval bounds, List<IntervalM> samples, Integer dimension)
      full parameter constructor.
      Parameters:
      ctype - coordinate type code.
      bounds - custom coordinate coverage (cardinality changed in CAOM-2.5).
      samples - detailed custom coordinate coverage (refactored in CAOM-2.5).
      dimension - number of discrete samples (pixels) along custom axis.
    • CustomAxis

      public CustomAxis(CustomAxis 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(CustomAxis 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.
    • getCtype

      public String getCtype()
      Returns ctype Attribute.
      Returns:
      ctype Attribute
    • setCtype

      public void setCtype(String pCtype)
      Set ctype Attribute.
      Parameters:
      pCtype - value to set
    • withCtype

      public CustomAxis withCtype(String pCtype)
      fluent setter for ctype Attribute.
      Parameters:
      pCtype - value to set
      Returns:
      CustomAxis
    • getBounds

      public Interval getBounds()
      Returns bounds Attribute.
      Returns:
      bounds Attribute
    • setBounds

      public void setBounds(Interval pBounds)
      Set bounds Attribute.
      Parameters:
      pBounds - value to set
    • withBounds

      public CustomAxis withBounds(Interval pBounds)
      fluent setter for bounds Attribute.
      Parameters:
      pBounds - value to set
      Returns:
      CustomAxis
    • getSamples

      public List<IntervalM> getSamples()
      Returns samples composition as an immutable list.
      Returns:
      samples composition.
    • setSamples

      public void setSamples(List<IntervalM> pSamples)
      Defines whole samples composition.
      Parameters:
      pSamples - composition to set.
    • addToSamples

      public void addToSamples(IntervalM p)
      Add a org.ivoa.dm.caom2.types.IntervalM to the composition.
      Parameters:
      p - org.ivoa.dm.caom2.types.IntervalM to add
    • removeFromSamples

      public void removeFromSamples(IntervalM p)
      Remove a org.ivoa.dm.caom2.types.IntervalM from the composition.
      Parameters:
      p - org.ivoa.dm.caom2.types.IntervalM to remove
    • replaceInSamples

      public void replaceInSamples(IntervalM _p)
      update a org.ivoa.dm.caom2.types.IntervalM in the composition.
      Parameters:
      _p - org.ivoa.dm.caom2.types.IntervalM to update the match is done via the database key
    • getDimension

      public Integer getDimension()
      Returns dimension Attribute.
      Returns:
      dimension Attribute
    • setDimension

      public void setDimension(Integer pDimension)
      Set dimension Attribute.
      Parameters:
      pDimension - value to set
    • withDimension

      public CustomAxis withDimension(Integer pDimension)
      fluent setter for dimension Attribute.
      Parameters:
      pDimension - value to set
      Returns:
      CustomAxis
    • createCustomAxis

      public static CustomAxis createCustomAxis(Consumer<CustomAxis.CustomAxisBuilder> f)
      create a CustomAxis 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>