Class DataResource

All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
CatalogResource, DataService

@Entity @VoDml(id="VODataService:DataResource", role=objectType) public class DataResource extends Service implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A resource publishing astronomical data. This resource type should only be used if the resource has no common underlying tabular schema (e.g., an inhomogeneous archive). Use CatalogResource otherwise. objectType: DataResource
  • Field Details

    • facility

      @VoDml(id="VODataService:DataResource.facility", role=attribute, type="VOResource:ResourceName", typeRole=dataType) protected List<ResourceName> facility
      The observatory or facility used to collect the data contained or managed by this resource. : Attribute facility : multiplicity 0..*
    • instrument

      @VoDml(id="VODataService:DataResource.instrument", role=attribute, type="VOResource:ResourceName", typeRole=dataType) protected List<ResourceName> instrument
      The instrument used to collect the data contain or managed by a resource. : Attribute instrument : multiplicity 0..*
    • coverage

      @VoDml(id="VODataService:DataResource.coverage", role=composition, type="VODataService:Coverage", typeRole=objectType) protected Coverage coverage
      Extent of the content of the resource over space, time, and frequency. composition coverage : ( Multiplicity : 0..1 )
    • productTypeServed

      @VoDml(id="VODataService:DataResource.productTypeServed", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> productTypeServed
      Collections of data products (e.g., images or spectra) or services serving them define the type of products they contain or serve here. This information is intended to enable global product discovery. Hence, services failing to define their product type(s) may be skipped by clients in global discovery. Product type names must be taken from the IVOA vocabulary http://www.ivoa.net/rdf/product-type. : Attribute productTypeServed : multiplicity 0..*
  • Constructor Details

    • DataResource

      public DataResource()
      Creates a new DataResource
    • DataResource

      public DataResource(List<ResourceName> facility, List<ResourceName> instrument, Coverage coverage, List<String> productTypeServed, List<Rights> rights, List<Capability> capability, List<Validation> validationLevel, String title, ShortName shortName, IdentifierURI identifier, List<String> altIdentifier, Curation curation, Content content, UTCTimestamp created, UTCTimestamp updated, Resource_status status, String version)
      full parameter constructor.
      Parameters:
      facility - The observatory or facility used to collect the data contained or managed by this resource.
      instrument - The instrument used to collect the data contain or managed by a resource.
      coverage - Extent of the content of the resource over space, time, and frequency.
      productTypeServed - Collections of data products (e.g., images or spectra) or services serving them define the type of products they contain or serve here. This information is intended to enable global product discovery. Hence, services failing to define their product type(s) may be skipped by clients in global discovery. Product type names must be taken from the IVOA vocabulary http://www.ivoa.net/rdf/product-type.
      rights - Information about rights held in and over the resource. Mainly for compatibility with DataCite, this element is repeatable. Resource record authors are advised that within the Virtual Observatory clients will typically only display and/or use the rights element occurring first and ignore later elements.
      capability - a description of a general capability of the service and how to use it. This describes a general function of the service, usually in terms of a standard service protocol (e.g. SIA), but not necessarily so. A service can have many capabilities associated with it, each reflecting different aspects of the functionality it provides.
      validationLevel - A numeric grade describing the quality of the resource description, when applicable, to be used to indicate the confidence an end-user can put in the resource as part of a VO application or research study. See VOResource:Validation for an explanation of the allowed levels. Note that when this resource is a Service, this grade applies to the core set of metadata. Capability and interface metadata, as well as the compliance of the service with the interface standard, is rated by validationLevel tag in the capability element (see the VOResource:Service complex type).
      title - the full name given to the resource .
      shortName - A short name or abbreviation given to the resource. This name will be used where brief annotations for the resource name are required. Applications may use to refer to this resource in a compact display. One word or a few letters is recommended. No more than sixteen characters are allowed.
      identifier - Unambiguous reference to the resource conforming to the IVOA standard for identifiers .
      altIdentifier - A reference to this resource in a non-IVOA identifier scheme, e.g., DOI or bibcode. Always use the an URI scheme here, e.g., doi:10.1016/j.epsl.2011.11.037. For bibcodes, use a form like bibcode:2008ivoa.spec.0222P.
      curation - Information regarding the general curation of the resource .
      content - Information regarding the general content of the resource .
      created - The UTC date and time this resource metadata description was created. This timestamp must not be in the future. This time is not required to be accurate; it should be at least accurate to the day. Any non-significant time fields should be set to zero.
      updated - The UTC date this resource metadata description was last updated. This timestamp must not be in the future. This time is not required to be accurate; it should be at least accurate to the day. Any non-significant time fields should be set to zero.
      status - a tag indicating whether this resource is believed to be still actively maintained.
      version - The VOResource XML schema version against which this instance was written. Implementors should set this to the value of the version attribute of their schema's root (xs:schema) element. Clients may assume version 1.0 if this attribute is missing.
    • DataResource

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

      public DataResource(Service superinstance, List<ResourceName> facility, List<ResourceName> instrument, Coverage coverage, List<String> productTypeServed)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      facility - The observatory or facility used to collect the data contained or managed by this resource.
      instrument - The instrument used to collect the data contain or managed by a resource.
      coverage - Extent of the content of the resource over space, time, and frequency.
      productTypeServed - Collections of data products (e.g., images or spectra) or services serving them define the type of products they contain or serve here. This information is intended to enable global product discovery. Hence, services failing to define their product type(s) may be skipped by clients in global discovery. Product type names must be taken from the IVOA vocabulary http://www.ivoa.net/rdf/product-type.
  • Method Details

    • copyMe

      public Resource copyMe()
      make a clone of the object taking into account current polymorhic type.
      Overrides:
      copyMe in class Service
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(DataResource 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.
    • getFacility

      public List<ResourceName> getFacility()
      Returns facility Attribute.
      Returns:
      facility Attribute
    • setFacility

      public void setFacility(List<ResourceName> pFacility)
      Set facility Attribute.
      Parameters:
      pFacility - value to set
    • withFacility

      public DataResource withFacility(List<ResourceName> pFacility)
      fluent setter for facility Attribute.
      Parameters:
      pFacility - value to set
      Returns:
      DataResource
    • getInstrument

      public List<ResourceName> getInstrument()
      Returns instrument Attribute.
      Returns:
      instrument Attribute
    • setInstrument

      public void setInstrument(List<ResourceName> pInstrument)
      Set instrument Attribute.
      Parameters:
      pInstrument - value to set
    • withInstrument

      public DataResource withInstrument(List<ResourceName> pInstrument)
      fluent setter for instrument Attribute.
      Parameters:
      pInstrument - value to set
      Returns:
      DataResource
    • getCoverage

      public Coverage getCoverage()
      Returns coverage Attribute.
      Returns:
      coverage Attribute
    • setCoverage

      public void setCoverage(Coverage pCoverage)
      Set coverage Attribute.
      Parameters:
      pCoverage - value to set
    • withCoverage

      public DataResource withCoverage(Coverage pCoverage)
      fluent setter for coverage Attribute.
      Parameters:
      pCoverage - value to set
      Returns:
      DataResource
    • getProductTypeServed

      public List<String> getProductTypeServed()
      Returns productTypeServed Attribute.
      Returns:
      productTypeServed Attribute
    • setProductTypeServed

      public void setProductTypeServed(List<String> pProductTypeServed)
      Set productTypeServed Attribute.
      Parameters:
      pProductTypeServed - value to set
    • withProductTypeServed

      public DataResource withProductTypeServed(List<String> pProductTypeServed)
      fluent setter for productTypeServed Attribute.
      Parameters:
      pProductTypeServed - value to set
      Returns:
      DataResource
    • createDataResource

      public static DataResource createDataResource(Consumer<DataResource.DataResourceBuilder> f)
      create a DataResource 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 Service
    • delete

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