public class SeriesDefinitionImpl extends SchemaComponentImpl implements SeriesDefinition
SeriesDefinition
.Constructor and Description |
---|
SeriesDefinitionImpl(int number,
String description,
Collection<AttributeDefinition<?>> attributeDefs)
Construct a
SeriesDefinition . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SeriesDefinition o) |
SchemaComponent |
copy()
Return a copy.
|
void |
edit(SchemaComponent component)
Edit the component, taking the parameter as a template.
|
AttributeDefinition<?> |
getAttributeDefinition(int attrNr,
boolean mustExist)
Return the attribute definition with the given attribute number.
|
AttributeDefinition<?> |
getAttributeDefinition(String name,
boolean mustExist)
Return the attribute definition with the given attribute name.
|
Collection<AttributeDefinition<?>> |
getAttributeDefinitions()
Return the collection of all attribute definitions.
|
protected SchemaComponents<AttributeDefinition<?>> |
getAttributeDefinitionsObject()
Return the object managing the series' attribute definitions.
|
Collection<AttributeDefinition<?>> |
getCustomAttributeDefinitions()
Return the collection of attribute definitions which are not built-in.
|
String |
getDescription()
Return the description of the series.
|
String |
getName()
Return the name of the component.
|
int |
getNumber()
Return the number of the component.
|
ch.agent.t2.time.TimeDomain |
getTimeDomain()
Return the time domain of the series.
|
ValueType<?> |
getValueType()
Return the value type of the series.
|
boolean |
isComplete()
Return true if the component is complete and can be used.
|
boolean |
isErasing()
Return true if the definition removes an inherited definition.
|
boolean |
isSparse()
Return true to force the series to use sparse time series.
|
void |
setContainer(SchemaComponentContainer container)
Set a container.
|
void |
setDescription(String description)
Set the description.
|
void |
setErasing(boolean erasing)
Set the erasing mode.
|
String |
toString() |
checkEdit, consolidate, edit, nameChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
consolidate, edit
public SeriesDefinitionImpl(int number, String description, Collection<AttributeDefinition<?>> attributeDefs) throws T2DBException
SeriesDefinition
.number
- a positive numberdescription
- a stringattributeDefs
- a collection of attribute definitionsT2DBException
public void setContainer(SchemaComponentContainer container)
Containable
setContainer
in interface Containable
setContainer
in class SchemaComponentImpl
container
- a container or nullpublic boolean isComplete()
SchemaComponent
Schema
defining an actual Chronicle
must
be complete. If the component is an AttributeDefinition
, it is
complete when the property of the attribute is defined and the default
value is valid. If the component is a SeriesDefinition
, it is
complete when the name, the type, and the time domain of the series are
defined, and all the series attributes are complete.isComplete
in interface SchemaComponent
public boolean isErasing()
SchemaComponent
UpdatableSchema.resolve()
.isErasing
in interface SchemaComponent
public int getNumber()
SchemaComponent
getNumber
in interface SchemaComponent
public Collection<AttributeDefinition<?>> getAttributeDefinitions()
IncompleteSchema
getAttributeDefinitions
in interface IncompleteSchema
public Collection<AttributeDefinition<?>> getCustomAttributeDefinitions()
SeriesDefinition
getCustomAttributeDefinitions
in interface SeriesDefinition
public AttributeDefinition<?> getAttributeDefinition(String name, boolean mustExist) throws T2DBException
IncompleteSchema
mustExist
parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition
in interface IncompleteSchema
name
- the name of the attributemustExist
- if true throw an exception instead of returning nullT2DBException
public AttributeDefinition<?> getAttributeDefinition(int attrNr, boolean mustExist) throws T2DBException
IncompleteSchema
mustExist
parameter determines behavior when nothing is
found: exception or null result.getAttributeDefinition
in interface IncompleteSchema
attrNr
- the number of the attributemustExist
- if true throw an exception instead of returning nullT2DBException
public String getDescription()
SeriesDefinition
getDescription
in interface SeriesDefinition
public String getName()
SchemaComponent
getName
in interface IncompleteSchema
getName
in interface SchemaComponent
public ch.agent.t2.time.TimeDomain getTimeDomain()
SeriesDefinition
getTimeDomain
in interface SeriesDefinition
public ValueType<?> getValueType()
SeriesDefinition
getValueType
in interface SeriesDefinition
public boolean isSparse()
SeriesDefinition
isSparse
in interface SeriesDefinition
public void setErasing(boolean erasing)
erasing
- true if the definition should erase an inherited definitionpublic void setDescription(String description)
description
- a stringprotected SchemaComponents<AttributeDefinition<?>> getAttributeDefinitionsObject()
public void edit(SchemaComponent component) throws T2DBException
SchemaComponent
edit
in interface SchemaComponent
component
- a component serving as templateT2DBException
public SchemaComponent copy()
SchemaComponent
copy
in interface SchemaComponent
public int compareTo(SeriesDefinition o)
compareTo
in interface Comparable<SeriesDefinition>
Copyright © 2017. All rights reserved.