public interface Schema extends IncompleteSchema, DBObject
Chronicle
.
It could have been named "ChronicleDefinition" but because of its importance,
a simpler name was preferred.
A schema defines a number of Attribute
s and a number
of Series
. Series can themselves have attributes, as defined
in their SeriesDefinition
.
A schema can extend, override, or erase elements of another schema. Because of this,
schemas form a tree structure (more precisely a forest). The base
schema, if any, is only accessible from the UpdatableSchema
,
which can be obtained with the edit()
method.
Modifier and Type | Method and Description |
---|---|
boolean |
dependsOnSchema(Schema schema)
Return true if the schema depends on the schema specified.
|
UpdatableSchema |
edit()
Return an
UpdatableSchema corresponding to this schema. |
SeriesDefinition |
getSeriesDefinition(int number,
boolean mustExist)
Return the series definition with the given series number.
|
SeriesDefinition |
getSeriesDefinition(String name,
boolean mustExist)
Return the series definition with the given series name.
|
Collection<SeriesDefinition> |
getSeriesDefinitions()
Return all series definitions of this schema.
|
boolean |
isComplete()
Return true if the schema is complete.
|
getAttributeDefinition, getAttributeDefinition, getAttributeDefinitions, getName
getDatabase, getId, getSurrogate, inConstruction, isValid
boolean isComplete()
SchemaComponent.isComplete()
.UpdatableSchema edit()
UpdatableSchema
corresponding to this schema.
Successfully getting an Updatable
object does not imply
that any update can be successfully applied.Collection<SeriesDefinition> getSeriesDefinitions()
SeriesDefinition getSeriesDefinition(String name, boolean mustExist) throws T2DBException
mustExist
parameter.name
- the series definedmustExist
- if true throw an exception instead of returning nullT2DBException
SeriesDefinition getSeriesDefinition(int number, boolean mustExist) throws T2DBException
mustExist
parameter.number
- the series definedmustExist
- if true throw an exception instead of returning nullT2DBException
boolean dependsOnSchema(Schema schema)
schema
- a schemaCopyright © 2017. All rights reserved.