Class Service

java.lang.Object
org.ivoa.dm.registry.voresource.Resource
org.ivoa.dm.registry.voresource.Service
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
DataResource

@Entity @VoDml(id="VOResource:Service", role=objectType) public class Service extends Resource implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
a resource that can be invoked by a client to perform some action on its behalf. objectType: Service
  • Field Details

    • rights

      @VoDml(id="VOResource:Service.rights", role=attribute, type="VOResource:Rights", typeRole=dataType) protected List<Rights> 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. : Attribute rights : multiplicity 0..*
    • capability

      @VoDml(id="VOResource:Service.capability", role=composition, type="VOResource:Capability", typeRole=objectType) protected List<Capability> 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. composition capability : ( Multiplicity : 0..* )
  • Constructor Details

    • Service

      public Service()
      Creates a new Service
    • Service

      public Service(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:
      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.
    • Service

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

      public Service(Resource superinstance, List<Rights> rights, List<Capability> capability)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      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.
  • Method Details

    • copyMe

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

      public void updateUsing(Service 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.
    • getRights

      public List<Rights> getRights()
      Returns rights Attribute.
      Returns:
      rights Attribute
    • setRights

      public void setRights(List<Rights> pRights)
      Set rights Attribute.
      Parameters:
      pRights - value to set
    • withRights

      public Service withRights(List<Rights> pRights)
      fluent setter for rights Attribute.
      Parameters:
      pRights - value to set
      Returns:
      Service
    • getCapability

      public List<Capability> getCapability()
      Returns capability composition as an immutable list.
      Returns:
      capability composition.
    • setCapability

      public void setCapability(List<Capability> pCapability)
      Defines whole capability composition.
      Parameters:
      pCapability - composition to set.
    • addToCapability

      public void addToCapability(Capability p)
      Add a org.ivoa.dm.registry.voresource.Capability to the composition.
      Parameters:
      p - org.ivoa.dm.registry.voresource.Capability to add
    • removeFromCapability

      public void removeFromCapability(Capability p)
      Remove a org.ivoa.dm.registry.voresource.Capability from the composition.
      Parameters:
      p - org.ivoa.dm.registry.voresource.Capability to remove
    • replaceInCapability

      public void replaceInCapability(Capability _p)
      update a org.ivoa.dm.registry.voresource.Capability in the composition.
      Parameters:
      _p - org.ivoa.dm.registry.voresource.Capability to update the match is done via the database key
    • createService

      public static Service createService(Consumer<Service.ServiceBuilder> f)
      create a Service 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 Resource
    • delete

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