public abstract class PointEntity extends ParamsEntity implements Point
Holds the informations on a point and is the reference for all the values processed by the framework.
Modifier and Type | Class and Description |
---|---|
static class |
PointEntity.Definition
Defined Point Entity.
|
static class |
PointEntity.Reference
Undefined Point Entity.
|
ParamsEntity.Builder
Point.Named, Point.Replicate
Modifier and Type | Field and Description |
---|---|
static ClassDef |
DEFAULT_FILTER
Default filter.
|
static String |
ELEMENT_NAME
Point element name.
|
static String |
ENTITY_PREFIX
Point entity prefix.
|
static String |
ENTITY_REFERENCE_NAME
Point reference name.
|
ARCHIVE_TIME_PARAM, CAPTURE_LIMIT_PARAM, CAPTURE_TIME_PARAM, CEILING_GAP_PARAM, CEILING_RATIO_PARAM, CONFIRM_PARAM, DEADBAND_GAP_PARAM, DEADBAND_RATIO_PARAM, FAIL_RETURNS_NULL_PARAM, FILTER_PARAM, FILTER_STAMP_TRIM_UNIT_PARAM, FILTER_TIME_LIMIT_PARAM, FLOOR_GAP_PARAM, FLOOR_RATIO_PARAM, KEEP_AT_LEAST_PARAM, KEEP_AT_MOST_PARAM, LIFE_TIME_PARAM, NOTIFY_PARAM, NULL, NULL_REMOVES_PARAM, PARAM_PARAM, POLATOR_PARAM, POLATOR_TIME_LIMIT_PARAM, RECALC_LATEST_PARAM, REPLICATED_PARAM, RESPECT_VERSION_PARAM, RESYNCHRONIZED_PARAM, STATES_PARAM, STEP_SIZE_PARAM, TAG_PARAM, VOLATILE_PARAM
UUID_COMPARATOR
Modifier | Constructor and Description |
---|---|
protected |
PointEntity()
Constructs an instance.
|
protected |
PointEntity(PointEntity other)
Constructs an instance from an other.
|
Modifier and Type | Method and Description |
---|---|
void |
addInputRelation(PointInput inputRelation)
Adds an input relation.
|
void |
addReplicate(Point.Replicate replicate)
Adds a replicate.
|
void |
adjustLevel()
Adjust the level of this point's dependents.
|
void |
clearContentEntity()
Clears the content entity for this point.
|
void |
clearInputs()
Clears the input relations.
|
void |
clearResults()
Clears the result relations.
|
void |
clearTransformEntity()
Clears the transform entity for this point.
|
void |
close()
Closes the current store connection.
|
int |
compareTo(Entity other)
Implements Comparable.
|
boolean |
contentIs(String name)
Asks if the content implements a specified interface.
|
abstract PointEntity |
copy()
Creates a copy of this entity.
|
boolean |
equals(Object other)
|
ValueFilter |
filter()
Returns a configured filter.
|
void |
flagResultRelations()
Flags the point as having result relations.
|
Optional<Content> |
getContent()
Gets this point's content handling instance.
|
Optional<ContentEntity> |
getContentEntity()
Gets the content entity for this point.
|
abstract Optional<PointEntity> |
getDefinition()
Gets the point's definition.
|
String |
getElementName()
Gets the entity element name.
|
List<PointInput> |
getInputs()
Gets this point's inputs.
|
int |
getLevel()
Gets this point's level.
|
Optional<? extends Origin> |
getOrigin()
Gets this point's origin.
|
Optional<OriginEntity> |
getOriginEntity()
Gets the origin entity for this point.
|
Optional<? extends Permissions> |
getPermissions()
Gets the permissions.
|
Optional<PermissionsEntity> |
getPermissionsEntity()
Gets the premissions entity.
|
String |
getPrefix()
Gets the class prefix.
|
int |
getRecalcLatest()
Gets the recalc limit.
|
String |
getReferenceName()
Gets the entity reference name.
|
List<Point.Replicate> |
getReplicates()
Gets this point's replicates.
|
List<PointInput> |
getResults()
Gets this point's dependents.
|
Optional<? extends Store> |
getStore()
Gets this point's store.
|
Optional<StoreEntity> |
getStoreEntity()
Gets the store entity for this point.
|
Optional<Sync> |
getSync()
Gets a synchronization object for this point.
|
Optional<SyncEntity> |
getSyncEntity()
Gets the sync entity.
|
Optional<Transform> |
getTransform()
Gets this point's transform.
|
Optional<TransformEntity> |
getTransformEntity()
Gets the transform entity for this point.
|
int |
hashCode() |
boolean |
hasInputRelations()
Asks if this point has input relations.
|
boolean |
hasResultRelations()
Asks if this point has result relations.
|
abstract boolean |
isDefinition()
Asks if this point is a definition.
|
boolean |
isDropped()
Asks if this point is dropped.
|
boolean |
isNullRemoves(boolean defaultNullRemoves)
Asks if a null point values should result in the removal of the values
at the corresponding time stamp.
|
boolean |
isSynced()
Asks if this point has a synchronization object.
|
boolean |
isVolatile()
Asks if this point is volatile.
|
void |
resetInputs()
Reset the input relations.
|
void |
resetReplicates()
Resets this point's replicates.
|
void |
resetResults()
Resets the result relations.
|
void |
setContentEntity(ContentEntity content)
Sets the content entity for this point.
|
abstract void |
setDefinition(PointEntity definition)
Sets the point's definition.
|
void |
setDropped(boolean dropped)
Sets the dropped indicator.
|
void |
setOriginEntity(Optional<OriginEntity> originEntity)
Sets the origin entity for this point.
|
void |
setPermissionsEntity(Optional<PermissionsEntity> permissions)
Sets the permissions.
|
void |
setStoreEntity(Optional<StoreEntity> storeEntity)
Sets the store entity for this point.
|
void |
setSyncEntity(Optional<SyncEntity> syncEntity)
Sets the synchronization reference for this point.
|
void |
setTransformEntity(TransformEntity transform)
Sets the transform entity for this point.
|
boolean |
setUp(Metadata metadata)
Sets up this point.
|
boolean |
setUpRelations(Metadata metadata)
Sets up the input relations of this point.
|
boolean |
setUpStore(Metadata metadata)
Sets up the store associated with this point.
|
void |
tearDown()
Tears down what has been set up.
|
void |
tearDownStore()
Tears down the store associated with this point.
|
boolean |
tidy()
Tidies the point entity.
|
String |
toString() |
getParams, setParams
addText, getAttributes, getAttributes, getTexts, setAttributes
getName, getNameInUpperCase, getThisLogger, getUUID, setName, setUUID
getAttributes, getName, getNameInUpperCase, getUUID
public static final ClassDef DEFAULT_FILTER
public static final String ELEMENT_NAME
public static final String ENTITY_PREFIX
public static final String ENTITY_REFERENCE_NAME
protected PointEntity()
protected PointEntity(@Nonnull PointEntity other)
other
- The other instance.public final void addInputRelation(@Nonnull PointInput inputRelation)
inputRelation
- The input relation.public final void addReplicate(@Nonnull Point.Replicate replicate)
replicate
- The replicate.public final void adjustLevel() throws TopologicalErrorException
TopologicalErrorException
- When a recursive reference is found.public final void clearContentEntity()
public final void clearInputs()
Removes all input relations while keeping the indication that this point has held input relations.
public final void clearResults()
Removes all result relations while keeping the indication that this point has held result relations.
public final void clearTransformEntity()
public final void close()
public final int compareTo(Entity other)
compareTo
in interface Comparable<Entity>
compareTo
in class AbstractEntity
other
- An other Entity.@CheckReturnValue public final boolean contentIs(@Nonnull String name) throws UndefinedEntityException
name
- The name of the ClassDef representing the interface.UndefinedEntityException
- When the interface is undefined.public abstract PointEntity copy()
public boolean equals(Object other)
For two Entity
to be equal, they must at least be instances of
the same class, have the same UUID
and name.
For two Metadata
Entity
to be equal, they must at
least be instances of the same class, have the same UUID
,
Attributes
, name and descriptive texts.
equals
in class ParamsEntity
public final ValueFilter filter()
public void flagResultRelations()
public final Optional<Content> getContent()
The point's content handling provides normalization / denormalization services.
getContent
in interface Point
@Nonnull @CheckReturnValue public final Optional<ContentEntity> getContentEntity()
@Nonnull @CheckReturnValue public abstract Optional<PointEntity> getDefinition()
Allows a reference to supply the referent.
public final String getElementName()
The entity element is used to in the generation of the entity URI.
getElementName
in interface Entity
public final List<PointInput> getInputs()
The point's inputs are the points that may trigger a computation of this point and / or are needed by this point's transform program.
public final int getLevel()
A point's level determines the order of processing for the processor.
public final Optional<? extends Origin> getOrigin()
@Nonnull @CheckReturnValue public final Optional<OriginEntity> getOriginEntity()
@Nonnull @CheckReturnValue public final Optional<? extends Permissions> getPermissions()
@Nonnull @CheckReturnValue public final Optional<PermissionsEntity> getPermissionsEntity()
public final String getPrefix()
Each concrete entity subclass has its own prefix which will be the same for all its instances. This prefix is used to avoid name collision between different classes in a common registry.
@CheckReturnValue public final int getRecalcLatest()
public String getReferenceName()
getReferenceName
in interface Entity
public List<Point.Replicate> getReplicates()
getReplicates
in interface Point
public final List<PointInput> getResults()
When a new or updated value of this point may trigger the computation of the value of an other point and / or this point's value is used in its computation, that other point is considered a dependent.
getResults
in interface Point
public final Optional<? extends Store> getStore()
@Nonnull @CheckReturnValue public final Optional<StoreEntity> getStoreEntity()
public final Optional<Sync> getSync()
@Nonnull @CheckReturnValue public final Optional<SyncEntity> getSyncEntity()
@Nonnull @CheckReturnValue public final Optional<Transform> getTransform()
@Nonnull @CheckReturnValue public final Optional<TransformEntity> getTransformEntity()
@CheckReturnValue public final boolean hasInputRelations()
@CheckReturnValue public final boolean hasResultRelations()
public int hashCode()
hashCode
in class ParamsEntity
@CheckReturnValue public abstract boolean isDefinition()
public final boolean isDropped()
A point may be dropped from the metadata of a service if it is not used to fulfill the responsibilities of the service.
public final boolean isNullRemoves(boolean defaultNullRemoves)
isNullRemoves
in interface Point
defaultNullRemoves
- A default value for the answer.public boolean isSynced()
public final boolean isVolatile()
isVolatile
in interface Point
public final void resetInputs()
public final void resetReplicates()
public final void resetResults()
public final void setContentEntity(@Nonnull ContentEntity content)
content
- The content entity.public abstract void setDefinition(@Nonnull PointEntity definition)
definition
- The point's definition.public final void setDropped(boolean dropped)
dropped
- The new value of the dropped indicator.public final void setOriginEntity(@Nonnull Optional<OriginEntity> originEntity)
originEntity
- The optional origin entity.public final void setPermissionsEntity(@Nonnull Optional<PermissionsEntity> permissions)
permissions
- The optional permissions.public final void setStoreEntity(@Nonnull Optional<StoreEntity> storeEntity)
storeEntity
- The optional store entity.public final void setSyncEntity(@Nonnull Optional<SyncEntity> syncEntity)
syncEntity
- The optional entity used for synchronization.public final void setTransformEntity(@Nonnull TransformEntity transform)
transform
- The transform entity.@CheckReturnValue public final boolean setUp(@Nonnull Metadata metadata)
metadata
- The metadata.@CheckReturnValue public final boolean setUpRelations(@Nonnull Metadata metadata)
metadata
- The metadata.@CheckReturnValue public final boolean setUpStore(@Nonnull Metadata metadata)
metadata
- The metadata.public final void tearDown()
public final void tearDownStore()
public final boolean tidy()
This is called after the document load.
public final String toString()
toString
in class AbstractEntity
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.