public interface Chronicle extends DBObject
Series
and Attribute
s.
An example of a subject for a chronicle is a traded security, like a share, with price and trading volume changing all the time, and with company information and trading currency remaining constant. Another example is the climate at a location, with varying temperature, humidity, pressure, wind speed, and wind direction, and with fixed geographic coordinates.
A chronicle, seen as a collection, can include other chronicles as members,
and the members can in
turn include more members. All chronicles in a database form a tree, with the root
known as the top chronicle. This structure is reflected in the NamingPolicy
of the database, which defines the syntax for naming chronicles. The tree structure
allows the design of very large collections of chronicles using only a few schemas.
Fast access to chronicles using attribute values is provided
by Property.getChronicles(Object, int)
.
Modifier and Type | Method and Description |
---|---|
UpdatableChronicle |
edit()
Return an
UpdatableChronicle corresponding to this chronicle. |
Chronicle |
findChronicle(String fullName,
boolean mustExist)
Find the chronicle with the the given full name.
|
Attribute<?> |
getAttribute(String name,
boolean mustExist)
Return the attribute with the given name.
|
Collection<Attribute<?>> |
getAttributes()
Return all the chronicle's attributes.
|
Chronicle |
getChronicle(String simpleName,
boolean mustExist)
Return the direct child of this chronicle with the given simple name.
|
Chronicle |
getCollection()
Return the chronicle to which this chronicle belongs.
|
String |
getDescription(boolean full)
Return the description of the chronicle.
|
List<String> |
getDescriptions()
Return the list of all descriptions along the chronicle chain.
|
Collection<Chronicle> |
getMembers()
Return the direct members of this chronicle seen as a collection.
|
String |
getName(boolean full)
Return the name of the chronicle.
|
List<String> |
getNames()
Return the list of all names along the chronicle chain.
|
Schema |
getSchema(boolean effective)
Return the chronicle's schema.
|
Collection<Series<?>> |
getSeries()
Return all existing series in this chronicle.
|
<T> Series<T> |
getSeries(String name)
Return the series with the given simple name.
|
<T> Series<T>[] |
getSeries(String[] name,
Class<T> type,
boolean mustBeDefined)
Return an array of series corresponding to the names requested.
|
boolean |
isMemberOf(Chronicle collection)
Return true if this chronicle is member of the collection.
|
boolean |
isTopChronicle()
Return true if this is the top chronicle.
|
getDatabase, getId, getSurrogate, inConstruction, isValid
UpdatableChronicle edit()
UpdatableChronicle
corresponding to this chronicle.
Successfully getting an Updatable
object does not imply
that updates can be successfully applied.boolean isTopChronicle()
boolean isMemberOf(Chronicle collection) throws T2DBException
collection
- a chronicleT2DBException
Chronicle getChronicle(String simpleName, boolean mustExist) throws T2DBException
mustExist
parameter determines behavior when nothing is
found: exception or null result.simpleName
- a simple namemustExist
- if true throw an exception instead of returning nullT2DBException
Chronicle findChronicle(String fullName, boolean mustExist) throws T2DBException
mustExist
is false, a non-existing chronicle is tolerated when it is at the end of
the chain of simple names.fullName
- the full name of the chroniclemustExist
- if true throw an exception instead of returning nullT2DBException
Chronicle getCollection() throws T2DBException
T2DBException
Collection<Chronicle> getMembers() throws T2DBException
T2DBException
String getName(boolean full) throws T2DBException
full
- if true return the full name, else the simple nameT2DBException
List<String> getNames() throws T2DBException
T2DBException
String getDescription(boolean full) throws T2DBException
full
- if true return the full description, else the simple
descriptionT2DBException
List<String> getDescriptions() throws T2DBException
T2DBException
Schema getSchema(boolean effective) throws T2DBException
effective
parameter is true, the schema
returned is the first non-null schema encountered along the chronicle chain.
Also in this case the result can be null.effective
- if true return the first non-null schema along the chronicle chainT2DBException
Attribute<?> getAttribute(String name, boolean mustExist) throws T2DBException
name
- a stringmustExist
- if true throw an exception instead of returning nullT2DBException
Collection<Attribute<?>> getAttributes() throws T2DBException
T2DBException
<T> Series<T> getSeries(String name) throws T2DBException
T
- the data type of the underlying time seriesname
- the simple name if the seriesT2DBException
<T> Series<T>[] getSeries(String[] name, Class<T> type, boolean mustBeDefined) throws T2DBException
mustBeDefined
is false
(in which case the
series is treated like a missing series). If the value type does not
correspond to the type requested an exception is thrown. If a series is
missing (there are no values), a null is returned in its place.T
- the data type of the underlying time seriesname
- the names of the series requestedtype
- the expected type or null to bypass enforcing a typemustBeDefined
- if true throw an exception when a name is undefinedT2DBException
Collection<Series<?>> getSeries() throws T2DBException
T2DBException
Copyright © 2017. All rights reserved.