Class Time

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

@Entity @VoDml(id="caom2:Time", role=objectType) public class Time extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
description of the time coverage and sampling of the data. objectType: Time
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • bounds

      @VoDml(id="caom2:Time.bounds", role=attribute, type="caom2:types.Interval", typeRole=dataType) protected Interval bounds
      time bounds that include the data (cardinality changed in CAOM-2.5). : Attribute bounds : multiplicity 1
    • samples

      @VoDml(id="caom2:Time.samples", role=composition, type="caom2:types.IntervalM", typeRole=objectType) protected List<IntervalM> samples
      detailed time coverage that include the data (refactored in CAOM-2.5). composition samples : ( Multiplicity : 1..* )
    • calibration

      @VoDml(id="caom2:Time.calibration", role=attribute, type="caom2:CalibrationStatus", typeRole=dataType) protected CalibrationStatus calibration
      term describing the calibration of the time axis values. : Attribute calibration : multiplicity 0..1
    • dimension

      @VoDml(id="caom2:Time.dimension", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer dimension
      number of discrete samples (pixels) on the time axis. : Attribute dimension : multiplicity 0..1
    • resolution

      @VoDml(id="caom2:Time.resolution", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double resolution
      median temporal resolution per pixel. : Attribute resolution : multiplicity 0..1
    • resolutionBounds

      @VoDml(id="caom2:Time.resolutionBounds", role=attribute, type="caom2:types.Interval", typeRole=dataType) protected Interval resolutionBounds
      range of resolution within the bounds. : Attribute resolutionBounds : multiplicity 0..1
    • sampleSize

      @VoDml(id="caom2:Time.sampleSize", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double sampleSize
      median pixel size. : Attribute sampleSize : multiplicity 0..1
    • exposure

      @VoDml(id="caom2:Time.exposure", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double exposure
      mean exposure time per pixel. : Attribute exposure : multiplicity 0..1
    • exposureBounds

      @VoDml(id="caom2:Time.exposureBounds", role=attribute, type="caom2:types.Interval", typeRole=dataType) protected Interval exposureBounds
      range of exposure within the bounds. : Attribute exposureBounds : multiplicity 0..1
  • Constructor Details

    • Time

      public Time()
      Creates a new Time
    • Time

      public Time(Interval bounds, List<IntervalM> samples, CalibrationStatus calibration, Integer dimension, Double resolution, Interval resolutionBounds, Double sampleSize, Double exposure, Interval exposureBounds)
      full parameter constructor.
      Parameters:
      bounds - time bounds that include the data (cardinality changed in CAOM-2.5).
      samples - detailed time coverage that include the data (refactored in CAOM-2.5).
      calibration - term describing the calibration of the time axis values.
      dimension - number of discrete samples (pixels) on the time axis.
      resolution - median temporal resolution per pixel.
      resolutionBounds - range of resolution within the bounds.
      sampleSize - median pixel size.
      exposure - mean exposure time per pixel.
      exposureBounds - range of exposure within the bounds.
    • Time

      public Time(Time 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(Time 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.
    • 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 Time withBounds(Interval pBounds)
      fluent setter for bounds Attribute.
      Parameters:
      pBounds - value to set
      Returns:
      Time
    • 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
    • getCalibration

      public CalibrationStatus getCalibration()
      Returns calibration Attribute.
      Returns:
      calibration Attribute
    • setCalibration

      public void setCalibration(CalibrationStatus pCalibration)
      Set calibration Attribute.
      Parameters:
      pCalibration - value to set
    • withCalibration

      public Time withCalibration(CalibrationStatus pCalibration)
      fluent setter for calibration Attribute.
      Parameters:
      pCalibration - value to set
      Returns:
      Time
    • 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 Time withDimension(Integer pDimension)
      fluent setter for dimension Attribute.
      Parameters:
      pDimension - value to set
      Returns:
      Time
    • getResolution

      public Double getResolution()
      Returns resolution Attribute.
      Returns:
      resolution Attribute
    • setResolution

      public void setResolution(Double pResolution)
      Set resolution Attribute.
      Parameters:
      pResolution - value to set
    • withResolution

      public Time withResolution(Double pResolution)
      fluent setter for resolution Attribute.
      Parameters:
      pResolution - value to set
      Returns:
      Time
    • getResolutionBounds

      public Interval getResolutionBounds()
      Returns resolutionBounds Attribute.
      Returns:
      resolutionBounds Attribute
    • setResolutionBounds

      public void setResolutionBounds(Interval pResolutionBounds)
      Set resolutionBounds Attribute.
      Parameters:
      pResolutionBounds - value to set
    • withResolutionBounds

      public Time withResolutionBounds(Interval pResolutionBounds)
      fluent setter for resolutionBounds Attribute.
      Parameters:
      pResolutionBounds - value to set
      Returns:
      Time
    • getSampleSize

      public Double getSampleSize()
      Returns sampleSize Attribute.
      Returns:
      sampleSize Attribute
    • setSampleSize

      public void setSampleSize(Double pSampleSize)
      Set sampleSize Attribute.
      Parameters:
      pSampleSize - value to set
    • withSampleSize

      public Time withSampleSize(Double pSampleSize)
      fluent setter for sampleSize Attribute.
      Parameters:
      pSampleSize - value to set
      Returns:
      Time
    • getExposure

      public Double getExposure()
      Returns exposure Attribute.
      Returns:
      exposure Attribute
    • setExposure

      public void setExposure(Double pExposure)
      Set exposure Attribute.
      Parameters:
      pExposure - value to set
    • withExposure

      public Time withExposure(Double pExposure)
      fluent setter for exposure Attribute.
      Parameters:
      pExposure - value to set
      Returns:
      Time
    • getExposureBounds

      public Interval getExposureBounds()
      Returns exposureBounds Attribute.
      Returns:
      exposureBounds Attribute
    • setExposureBounds

      public void setExposureBounds(Interval pExposureBounds)
      Set exposureBounds Attribute.
      Parameters:
      pExposureBounds - value to set
    • withExposureBounds

      public Time withExposureBounds(Interval pExposureBounds)
      fluent setter for exposureBounds Attribute.
      Parameters:
      pExposureBounds - value to set
      Returns:
      Time
    • createTime

      public static Time createTime(Consumer<Time.TimeBuilder> f)
      create a Time 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>