Record Class AnnotationPoint
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.AnnotationPoint
- Record Components:
identifier
- A uniqueUUID
identifying the annotation point. Must not be null.source
- TheQualifiedPath
representing the source of the annotation. Must not be null.value
- TheAnnotation
value of the annotation point. Must not be null.startTime
- TheInstant
representing the start time of the annotation. Must not be null.endTime
- AnOptional
containing the end time of the annotation, if available.lastUpdated
- AnOptional
containing the last updated time of the annotation, if available.
- All Implemented Interfaces:
ComplexPoint<Annotation>
,TemporalPoint<Annotation,
,ComplexPointType> Comparable<TemporalPoint<Annotation,
ComplexPointType>>
public record AnnotationPoint(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated)
extends Record
implements ComplexPoint<Annotation>
Represents an annotation point in the historian system.
This record implements ComplexPoint
with a value type of Annotation
.
It encapsulates metadata and temporal information about an annotation, including
its identifier, source, value, start time, optional end time, and optional last updated time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder class for constructingAnnotationPoint
instances. -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationPoint
(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated) Constructs anAnnotationPoint
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationPoint.Builder
builder()
Creates a newAnnotationPoint.Builder
instance for constructingAnnotationPoint
objects.endTime()
Returns the value of theendTime
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theidentifier
record component.Returns the value of thelastUpdated
record component.source()
Returns the value of thesource
record component.Returns the value of thestartTime
record component.Retrieves the timestamp of the annotation point.final String
toString()
Returns a string representation of this record class.type()
Retrieves the type of the annotation point.value()
Returns the value of thevalue
record component.withSource
(QualifiedPath source) Creates a newAnnotationPoint
with the specified source.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.historian.common.model.data.TemporalPoint
compareTo
-
Constructor Details
-
AnnotationPoint
public AnnotationPoint(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated) Constructs anAnnotationPoint
instance.Validates that the required fields are not null and ensures that the end time, if present, is not before the start time.
- Throws:
NullPointerException
- If any required field is null.IllegalArgumentException
- If the end time is before the start time.
-
-
Method Details
-
builder
Creates a newAnnotationPoint.Builder
instance for constructingAnnotationPoint
objects.- Returns:
- A new
AnnotationPoint.Builder
.
-
withSource
Creates a newAnnotationPoint
with the specified source.If the source is the same as the current source, the existing instance is returned.
- Parameters:
source
- The newQualifiedPath
source.- Returns:
- A new
AnnotationPoint
with the updated source, or the current instance if unchanged.
-
timestamp
Retrieves the timestamp of the annotation point.- Specified by:
timestamp
in interfaceTemporalPoint<Annotation,
ComplexPointType> - Returns:
- The
Instant
representing the start time of the annotation.
-
type
Retrieves the type of the annotation point.By default, this method returns
StandardComplexPointType.ANNOTATION
.- Specified by:
type
in interfaceComplexPoint<Annotation>
- Specified by:
type
in interfaceTemporalPoint<Annotation,
ComplexPointType> - Returns:
- The
StandardComplexPointType
of the annotation point.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
identifier
Returns the value of theidentifier
record component.- Returns:
- the value of the
identifier
record component
-
source
Returns the value of thesource
record component.- Specified by:
source
in interfaceTemporalPoint<Annotation,
ComplexPointType> - Returns:
- the value of the
source
record component
-
value
Returns the value of thevalue
record component.- Specified by:
value
in interfaceTemporalPoint<Annotation,
ComplexPointType> - Returns:
- the value of the
value
record component
-
startTime
Returns the value of thestartTime
record component.- Returns:
- the value of the
startTime
record component
-
endTime
Returns the value of theendTime
record component.- Returns:
- the value of the
endTime
record component
-
lastUpdated
Returns the value of thelastUpdated
record component.- Returns:
- the value of the
lastUpdated
record component
-