Class Schema

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

@Entity @VoDml(id="StandardsRegExt:Schema", role=objectType) public class Schema extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
a description of a schema definition. objectType: Schema
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • location

      @VoDml(id="StandardsRegExt:Schema.location", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected String location
      A URL pointing to a document that formally defines the schema. The document should be in a machine-parsable format when applicable. For example, when refering to an XML schema, the document should be an XML Schema or similar document that can be used to validate an instance document. : Attribute location : multiplicity 1
    • description

      @VoDml(id="StandardsRegExt:Schema.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      A human-readable description of what the schema defines or is used for. A brief description--e.g. one statement--is recommended for display purposes. : Attribute description : multiplicity 0..1
    • example

      @VoDml(id="StandardsRegExt:Schema.example", role=attribute, type="ivoa:anyURI", typeRole=primitiveType) protected List<String> example
      A URL pointing to a sample document that illustrates the use of the schema. When applicable (e.g. XML), the document should be in the format defined by the schema document. : Attribute example : multiplicity 0..*
    • namespace

      @VoDml(id="StandardsRegExt:Schema.namespace", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String namespace
      an identifier for the schema being described. Each instance of this attribute must be unique within the resourse description. For XML schemas, this should be the schema's namespace URI. Otherwise, it should be a unique label to distinguish it from other schemas described in the same resource description. : Attribute namespace : multiplicity 1
  • Constructor Details

    • Schema

      public Schema()
      Creates a new Schema
    • Schema

      public Schema(String location, String description, List<String> example, String namespace)
      full parameter constructor.
      Parameters:
      location - A URL pointing to a document that formally defines the schema. The document should be in a machine-parsable format when applicable. For example, when refering to an XML schema, the document should be an XML Schema or similar document that can be used to validate an instance document.
      description - A human-readable description of what the schema defines or is used for. A brief description--e.g. one statement--is recommended for display purposes.
      example - A URL pointing to a sample document that illustrates the use of the schema. When applicable (e.g. XML), the document should be in the format defined by the schema document.
      namespace - an identifier for the schema being described. Each instance of this attribute must be unique within the resourse description. For XML schemas, this should be the schema's namespace URI. Otherwise, it should be a unique label to distinguish it from other schemas described in the same resource description.
    • Schema

      public Schema(Schema 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(Schema 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.
    • getLocation

      public String getLocation()
      Returns location Attribute.
      Returns:
      location Attribute
    • setLocation

      public void setLocation(String pLocation)
      Set location Attribute.
      Parameters:
      pLocation - value to set
    • withLocation

      public Schema withLocation(String pLocation)
      fluent setter for location Attribute.
      Parameters:
      pLocation - value to set
      Returns:
      Schema
    • getDescription

      public String getDescription()
      Returns description Attribute.
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Set description Attribute.
      Parameters:
      pDescription - value to set
    • withDescription

      public Schema withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      Schema
    • getExample

      public List<String> getExample()
      Returns example Attribute.
      Returns:
      example Attribute
    • setExample

      public void setExample(List<String> pExample)
      Set example Attribute.
      Parameters:
      pExample - value to set
    • withExample

      public Schema withExample(List<String> pExample)
      fluent setter for example Attribute.
      Parameters:
      pExample - value to set
      Returns:
      Schema
    • getNamespace

      public String getNamespace()
      Returns namespace Attribute.
      Returns:
      namespace Attribute
    • setNamespace

      public void setNamespace(String pNamespace)
      Set namespace Attribute.
      Parameters:
      pNamespace - value to set
    • withNamespace

      public Schema withNamespace(String pNamespace)
      fluent setter for namespace Attribute.
      Parameters:
      pNamespace - value to set
      Returns:
      Schema
    • createSchema

      public static Schema createSchema(Consumer<Schema.SchemaBuilder> f)
      create a Schema 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>