Record Class AnnotationPoint
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.AnnotationPoint
- Record Components:
identifier- A uniqueUUIDidentifying the annotation point. Must not be null.source- TheQualifiedPathrepresenting the source of the annotation. Must not be null.value- TheAnnotationvalue of the annotation point. Must not be null.startTime- TheInstantrepresenting the start time of the annotation. Must not be null.endTime- AnOptionalcontaining the end time of the annotation, if available.lastUpdated- AnOptionalcontaining 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 classA builder class for constructingAnnotationPointinstances. -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationPoint(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated) Constructs anAnnotationPointinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationPoint.Builderbuilder()Creates a newAnnotationPoint.Builderinstance for constructingAnnotationPointobjects.endTime()Returns the value of theendTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theidentifierrecord component.Returns the value of thelastUpdatedrecord component.source()Returns the value of thesourcerecord component.Returns the value of thestartTimerecord component.Retrieves the timestamp of the annotation point.final StringtoString()Returns a string representation of this record class.type()Retrieves the type of the annotation point.value()Returns the value of thevaluerecord component.withSource(QualifiedPath source) Creates a newAnnotationPointwith the specified source.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 anAnnotationPointinstance.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.Builderinstance for constructingAnnotationPointobjects.- Returns:
- A new
AnnotationPoint.Builder.
-
withSource
Creates a newAnnotationPointwith the specified source.If the source is the same as the current source, the existing instance is returned.
- Parameters:
source- The newQualifiedPathsource.- Returns:
- A new
AnnotationPointwith the updated source, or the current instance if unchanged.
-
timestamp
Retrieves the timestamp of the annotation point.- Specified by:
timestampin interfaceTemporalPoint<Annotation,ComplexPointType> - Returns:
- The
Instantrepresenting the start time of the annotation.
-
type
Retrieves the type of the annotation point.By default, this method returns
StandardComplexPointType.ANNOTATION.- Specified by:
typein interfaceComplexPoint<Annotation>- Specified by:
typein interfaceTemporalPoint<Annotation,ComplexPointType> - Returns:
- The
StandardComplexPointTypeof 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 theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
source
Returns the value of thesourcerecord component.- Specified by:
sourcein interfaceTemporalPoint<Annotation,ComplexPointType> - Returns:
- the value of the
sourcerecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceTemporalPoint<Annotation,ComplexPointType> - Returns:
- the value of the
valuerecord component
-
startTime
Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
endTime
Returns the value of theendTimerecord component.- Returns:
- the value of the
endTimerecord component
-
lastUpdated
Returns the value of thelastUpdatedrecord component.- Returns:
- the value of the
lastUpdatedrecord component
-