Class Query

java.lang.Object
org.ivoa.dm.registry.slap.Query
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="SLAP:Query", role=objectType) public class Query extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A query to be sent to the service, e.g., a test query. objectType: Query
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • wavelength

      @VoDml(id="SLAP:Query.wavelength", role=composition, type="SLAP:WavelengthRange", typeRole=objectType) protected WavelengthRange wavelength
      Spectral range in meters to be used to constrain the query of spectral lines. composition wavelength : ( Multiplicity : 0..1 )
    • queryDataCmd

      @VoDml(id="SLAP:Query.queryDataCmd", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String queryDataCmd
      Fully specified queryData test query formatted as an URL argument list in the syntax specified by the SLAP standard. The list must exclude the REQUEST argument which is assumed to be set to 'queryData'. VERSION may be included if the test query applies to a specific version of the service protocol. If queryDataCmd is used to form a query, the default value of WAVELENGTH specified above is not used; if the test query requires WAVELENGTH it should be included directly in queryDataCmd. This value must be a string in the form of name=value pairs delimited with ampersands. A query may then be formed by appending to the baseURL the request argument, 'REQUEST=queryData;', followed by the contents of this element. : Attribute queryDataCmd : multiplicity 0..1
  • Constructor Details

    • Query

      public Query()
      Creates a new Query
    • Query

      public Query(WavelengthRange wavelength, String queryDataCmd)
      full parameter constructor.
      Parameters:
      wavelength - Spectral range in meters to be used to constrain the query of spectral lines.
      queryDataCmd - Fully specified queryData test query formatted as an URL argument list in the syntax specified by the SLAP standard. The list must exclude the REQUEST argument which is assumed to be set to 'queryData'. VERSION may be included if the test query applies to a specific version of the service protocol. If queryDataCmd is used to form a query, the default value of WAVELENGTH specified above is not used; if the test query requires WAVELENGTH it should be included directly in queryDataCmd. This value must be a string in the form of name=value pairs delimited with ampersands. A query may then be formed by appending to the baseURL the request argument, 'REQUEST=queryData;', followed by the contents of this element.
    • Query

      public Query(Query 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(Query 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.
    • getWavelength

      public WavelengthRange getWavelength()
      Returns wavelength Attribute.
      Returns:
      wavelength Attribute
    • setWavelength

      public void setWavelength(WavelengthRange pWavelength)
      Set wavelength Attribute.
      Parameters:
      pWavelength - value to set
    • withWavelength

      public Query withWavelength(WavelengthRange pWavelength)
      fluent setter for wavelength Attribute.
      Parameters:
      pWavelength - value to set
      Returns:
      Query
    • getQueryDataCmd

      public String getQueryDataCmd()
      Returns queryDataCmd Attribute.
      Returns:
      queryDataCmd Attribute
    • setQueryDataCmd

      public void setQueryDataCmd(String pQueryDataCmd)
      Set queryDataCmd Attribute.
      Parameters:
      pQueryDataCmd - value to set
    • withQueryDataCmd

      public Query withQueryDataCmd(String pQueryDataCmd)
      fluent setter for queryDataCmd Attribute.
      Parameters:
      pQueryDataCmd - value to set
      Returns:
      Query
    • createQuery

      public static Query createQuery(Consumer<Query.QueryBuilder> f)
      create a Query 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>