Class ReadonlyPlan
java.lang.Object
gov.nasa.jpl.aerie.merlin.server.models.ReadonlyPlan
- All Implemented Interfaces:
gov.nasa.ammos.aerie.procedural.timeline.plan.Plan
public final class ReadonlyPlan
extends Object
implements gov.nasa.ammos.aerie.procedural.timeline.plan.Plan
An immutable version of a Timeline Plan. Primary use is for Procedural Constraints.
TODO: Test if this needs to be sim-related and not plan-related
-
Constructor Summary
ConstructorsConstructorDescriptionReadonlyPlan(gov.nasa.jpl.aerie.types.Plan plan, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment environment) -
Method Summary
Modifier and TypeMethodDescription@NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.Directives<gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.AnyDirective> @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.Directives<gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.AnyDirective> directives(@NotNull String type) <A> @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.Directives<A> directives(@Nullable String type, @NotNull kotlin.jvm.functions.Function1<? super gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue, ? extends A> deserializer) Query activity directives.@NotNull gov.nasa.jpl.aerie.merlin.protocol.types.Durationduration()The total duration of the plan, whether simulated on the full extent or not.@NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.ExternalEventsevents()Get all external events across all derivation groups associated with this plan.@NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.ExternalEventsevents(@NotNull gov.nasa.ammos.aerie.procedural.timeline.plan.EventQuery query) Get external events associated with this plan.<V,TL extends gov.nasa.ammos.aerie.procedural.timeline.ops.SerialSegmentOps<V, TL>>
TLresource(@NotNull String name, @NotNull kotlin.jvm.functions.Function1<? super List<gov.nasa.ammos.aerie.procedural.timeline.payloads.Segment<gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue>>, ? extends TL> deserializer) Query a resource profile from the external datasets associated with this plan.@NotNull InstanttoAbsolute(@NotNull gov.nasa.jpl.aerie.merlin.protocol.types.Duration rel) Convert a relative duration to a time instant.@NotNull gov.nasa.jpl.aerie.merlin.protocol.types.DurationtoRelative(@NotNull Instant abs) Convert a time instant to a relative duration (relative to plan start).@NotNull gov.nasa.ammos.aerie.procedural.timeline.IntervalTotal extent of the plan's bounds, whether it was simulated on the full extent or not.
-
Constructor Details
-
ReadonlyPlan
public ReadonlyPlan(gov.nasa.jpl.aerie.types.Plan plan, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment environment)
-
-
Method Details
-
totalBounds
@NotNull public @NotNull gov.nasa.ammos.aerie.procedural.timeline.Interval totalBounds()Total extent of the plan's bounds, whether it was simulated on the full extent or not.- Specified by:
totalBoundsin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
duration
@NotNull public @NotNull gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration()The total duration of the plan, whether simulated on the full extent or not.- Specified by:
durationin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
toRelative
@NotNull public @NotNull gov.nasa.jpl.aerie.merlin.protocol.types.Duration toRelative(@NotNull @NotNull Instant abs) Convert a time instant to a relative duration (relative to plan start).- Specified by:
toRelativein interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
toAbsolute
@NotNull public @NotNull Instant toAbsolute(@NotNull @NotNull gov.nasa.jpl.aerie.merlin.protocol.types.Duration rel) Convert a relative duration to a time instant.- Specified by:
toAbsolutein interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
directives
@NotNull public <A> @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.Directives<A> directives(@Nullable @Nullable String type, @NotNull @NotNull kotlin.jvm.functions.Function1<? super gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue, ? extends A> deserializer) Query activity directives.- Specified by:
directivesin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan- Parameters:
type- Activity type name to filter by; queries all activities if null.deserializer- a function from [SerializedValue] to an inner payload type
-
directives
@NotNull public @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.Directives<gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.AnyDirective> directives(@NotNull @NotNull String type) - Specified by:
directivesin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
directives
@NotNull public @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.Directives<gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.AnyDirective> directives()- Specified by:
directivesin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
resource
@NotNull public <V,TL extends gov.nasa.ammos.aerie.procedural.timeline.ops.SerialSegmentOps<V, TL resourceTL>> (@NotNull @NotNull String name, @NotNull @NotNull kotlin.jvm.functions.Function1<? super List<gov.nasa.ammos.aerie.procedural.timeline.payloads.Segment<gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue>>, ? extends TL> deserializer) Query a resource profile from the external datasets associated with this plan.- Specified by:
resourcein interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan- Parameters:
name- string name of the resourcedeserializer- constructor of the profile, converting [SerializedValue]
-
events
@NotNull public @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.ExternalEvents events(@NotNull @NotNull gov.nasa.ammos.aerie.procedural.timeline.plan.EventQuery query) Get external events associated with this plan.- Specified by:
eventsin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-
events
@NotNull public @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.ExternalEvents events()Get all external events across all derivation groups associated with this plan.- Specified by:
eventsin interfacegov.nasa.ammos.aerie.procedural.timeline.plan.Plan
-