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

    Constructors
    Constructor
    Description
    ReadonlyPlan(gov.nasa.jpl.aerie.types.Plan plan, gov.nasa.jpl.aerie.constraints.model.EvaluationEnvironment environment)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @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.Duration
    The total duration of the plan, whether simulated on the full extent or not.
    @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.ExternalEvents
    Get all external events across all derivation groups associated with this plan.
    @NotNull gov.nasa.ammos.aerie.procedural.timeline.collections.ExternalEvents
    events(@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>>
    TL
    resource(@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 Instant
    toAbsolute(@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.Duration
    toRelative(@NotNull Instant abs)
    Convert a time instant to a relative duration (relative to plan start).
    @NotNull gov.nasa.ammos.aerie.procedural.timeline.Interval
    Total extent of the plan's bounds, whether it was simulated on the full extent or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      totalBounds in interface gov.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:
      duration in interface gov.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:
      toRelative in interface gov.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:
      toAbsolute in interface gov.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:
      directives in interface gov.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:
      directives in interface gov.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:
      directives in interface gov.nasa.ammos.aerie.procedural.timeline.plan.Plan
    • resource

      @NotNull public <V, TL extends gov.nasa.ammos.aerie.procedural.timeline.ops.SerialSegmentOps<V, TL>> TL resource(@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:
      resource in interface gov.nasa.ammos.aerie.procedural.timeline.plan.Plan
      Parameters:
      name - string name of the resource
      deserializer - 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:
      events in interface gov.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:
      events in interface gov.nasa.ammos.aerie.procedural.timeline.plan.Plan