Class Schema

java.lang.Object
org.ivoa.dm.tapschema.Schema
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>

@Entity @VoDml(id="tapschema:Schema", role=objectType) public class Schema extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
The schema.

objectType: Schema

  • Field Details

    • schema_name

      @VoDml(id="tapschema:Schema.schema_name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String schema_name
      The name of the schema . : Attribute schema_name : multiplicity 1
    • utype

      @VoDml(id="tapschema:Schema.utype", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String utype
      utype. : Attribute utype : multiplicity 0..1
    • description

      @VoDml(id="tapschema:Schema.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      description. : Attribute description : multiplicity 0..1
    • schema_index

      @VoDml(id="tapschema:Schema.schema_index", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer schema_index
      used to recommend table ordering for clients. Clients may order by index (ascending) so lower index items would appear earlier in a listing. : Attribute schema_index : multiplicity 0..1
    • tables

      @VoDml(id="tapschema:Schema.tables", role=composition, type="tapschema:table", typeRole=objectType) protected List<Table> tables
      the tables. composition tables : ( Multiplicity : 1..* )
  • Constructor Details

    • Schema

      public Schema()
      Creates a new Schema
    • Schema

      public Schema(String schema_name, String utype, String description, Integer schema_index, List<Table> tables)
      full parameter constructor.
      Parameters:
      schema_name - The name of the schema .
      utype - utype.
      description - description.
      schema_index - used to recommend table ordering for clients. Clients may order by index (ascending) so lower index items would appear earlier in a listing.
      tables - the tables.
    • 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

    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • 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.
    • getSchema_name

      public String getSchema_name()
      Returns schema_name Attribute.
      Returns:
      schema_name Attribute
    • setSchema_name

      public void setSchema_name(String pSchema_name)
      Set schema_name Attribute.
      Parameters:
      pSchema_name - value to set
    • withSchema_name

      public Schema withSchema_name(String pSchema_name)
      fluent setter for schema_name Attribute.
      Parameters:
      pSchema_name - value to set
      Returns:
      Schema
    • getUtype

      public String getUtype()
      Returns utype Attribute.
      Returns:
      utype Attribute
    • setUtype

      public void setUtype(String pUtype)
      Set utype Attribute.
      Parameters:
      pUtype - value to set
    • withUtype

      public Schema withUtype(String pUtype)
      fluent setter for utype Attribute.
      Parameters:
      pUtype - 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
    • getSchema_index

      public Integer getSchema_index()
      Returns schema_index Attribute.
      Returns:
      schema_index Attribute
    • setSchema_index

      public void setSchema_index(Integer pSchema_index)
      Set schema_index Attribute.
      Parameters:
      pSchema_index - value to set
    • withSchema_index

      public Schema withSchema_index(Integer pSchema_index)
      fluent setter for schema_index Attribute.
      Parameters:
      pSchema_index - value to set
      Returns:
      Schema
    • getTables

      public List<Table> getTables()
      Returns tables composition as an immutable list.
      Returns:
      tables composition.
    • setTables

      public void setTables(List<Table> pTables)
      Defines whole tables composition.
      Parameters:
      pTables - composition to set.
    • addToTables

      public void addToTables(Table p)
      Add a org.ivoa.dm.tapschema.Table to the composition.
      Parameters:
      p - org.ivoa.dm.tapschema.Table to add
    • removeFromTables

      public void removeFromTables(Table p)
      Remove a org.ivoa.dm.tapschema.Table from the composition.
      Parameters:
      p - org.ivoa.dm.tapschema.Table to remove
    • replaceInTables

      public void replaceInTables(Table _p)
      update a org.ivoa.dm.tapschema.Table in the composition.
      Parameters:
      _p - org.ivoa.dm.tapschema.Table to update the match is done via the database key
    • getId

      public String getId()
      return the database key id. Note that this is the same as attribute schema_name.
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
      Returns:
      the id
    • 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<String>