Class TableSchema

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

@Entity @VoDml(id="VODataService:TableSchema", role=objectType) public class TableSchema extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A detailed description of a logically related group of tables. objectType: TableSchema
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • name

      @VoDml(id="VODataService:TableSchema.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name
      A name for the group of tables. This is used to uniquely identify the group of tables among several groups. If no title is given, this name can be used for display purposes. If there is no appropriate logical name associated with this group, the name should be explicitly set to “default”. : Attribute name : multiplicity 1
    • title

      @VoDml(id="VODataService:TableSchema.title", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String title
      A descriptive, human-interpretable name for the group of tables. This is used for display purposes. There is no requirement regarding uniqueness. It is useful when there are multiple schemas in the context (e.g., within a tableset; otherwise, the resource title could be used instead). : Attribute title : multiplicity 0..1
    • description

      @VoDml(id="VODataService:TableSchema.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      A free text description of the group of tables that should explain in general how all of the tables in the group are related. : Attribute description : multiplicity 0..1
    • utype

      @VoDml(id="VODataService:TableSchema.utype", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String utype
      An identifier for a concept in a data model that the data in this schema as a whole represent. The form of the utype string depends on the data model; common forms are sequences of dotted identifiers (e.g., in SSA) or URIs (e.g., in RegTAP). : Attribute utype : multiplicity 0..1
    • table

      @VoDml(id="VODataService:TableSchema.table", role=composition, type="VODataService:Table", typeRole=objectType) protected List<Table> table
      A description of one table. composition table : ( Multiplicity : 0..* )
  • Constructor Details

    • TableSchema

      public TableSchema()
      Creates a new TableSchema
    • TableSchema

      public TableSchema(String name, String title, String description, String utype, List<Table> table)
      full parameter constructor.
      Parameters:
      name - A name for the group of tables. This is used to uniquely identify the group of tables among several groups. If no title is given, this name can be used for display purposes. If there is no appropriate logical name associated with this group, the name should be explicitly set to “default”.
      title - A descriptive, human-interpretable name for the group of tables. This is used for display purposes. There is no requirement regarding uniqueness. It is useful when there are multiple schemas in the context (e.g., within a tableset; otherwise, the resource title could be used instead).
      description - A free text description of the group of tables that should explain in general how all of the tables in the group are related.
      utype - An identifier for a concept in a data model that the data in this schema as a whole represent. The form of the utype string depends on the data model; common forms are sequences of dotted identifiers (e.g., in SSA) or URIs (e.g., in RegTAP).
      table - A description of one table.
    • TableSchema

      public TableSchema(TableSchema 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(TableSchema 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.
    • getName

      public String getName()
      Returns name Attribute.
      Returns:
      name Attribute
    • setName

      public void setName(String pName)
      Set name Attribute.
      Parameters:
      pName - value to set
    • withName

      public TableSchema withName(String pName)
      fluent setter for name Attribute.
      Parameters:
      pName - value to set
      Returns:
      TableSchema
    • getTitle

      public String getTitle()
      Returns title Attribute.
      Returns:
      title Attribute
    • setTitle

      public void setTitle(String pTitle)
      Set title Attribute.
      Parameters:
      pTitle - value to set
    • withTitle

      public TableSchema withTitle(String pTitle)
      fluent setter for title Attribute.
      Parameters:
      pTitle - value to set
      Returns:
      TableSchema
    • 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 TableSchema withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      TableSchema
    • 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 TableSchema withUtype(String pUtype)
      fluent setter for utype Attribute.
      Parameters:
      pUtype - value to set
      Returns:
      TableSchema
    • getTable

      public List<Table> getTable()
      Returns table composition as an immutable list.
      Returns:
      table composition.
    • setTable

      public void setTable(List<Table> pTable)
      Defines whole table composition.
      Parameters:
      pTable - composition to set.
    • addToTable

      public void addToTable(Table p)
      Add a org.ivoa.dm.registry.vodataservice.Table to the composition.
      Parameters:
      p - org.ivoa.dm.registry.vodataservice.Table to add
    • removeFromTable

      public void removeFromTable(Table p)
      Remove a org.ivoa.dm.registry.vodataservice.Table from the composition.
      Parameters:
      p - org.ivoa.dm.registry.vodataservice.Table to remove
    • replaceInTable

      public void replaceInTable(Table _p)
      update a org.ivoa.dm.registry.vodataservice.Table in the composition.
      Parameters:
      _p - org.ivoa.dm.registry.vodataservice.Table to update the match is done via the database key
    • createTableSchema

      public static TableSchema createTableSchema(Consumer<TableSchema.TableSchemaBuilder> f)
      create a TableSchema 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>