Class PlantModelCreationTO

java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.PlantModelCreationTO
All Implemented Interfaces:
java.io.Serializable

public class PlantModelCreationTO
extends CreationTO
implements java.io.Serializable
A transfer object describing a plant model.
See Also:
Serialized Form
  • Constructor Details

    • PlantModelCreationTO

      public PlantModelCreationTO​(java.lang.String name)
      Creates a new instance.
      Parameters:
      name - The name of this plant model.
  • Method Details

    • getPoints

      public java.util.List<PointCreationTO> getPoints()
      Returns this plant model's points.
      Returns:
      This plant model's points.
    • withPoints

      public PlantModelCreationTO withPoints​(@Nonnull java.util.List<PointCreationTO> points)
      Creates a copy of this object with the given points.
      Parameters:
      points - The new points.
      Returns:
      A copy of this model, differing in the given points.
    • withPoint

      public PlantModelCreationTO withPoint​(@Nonnull PointCreationTO point)
      Creates a copy of this object that includes the given point in the list of points.
      Parameters:
      point - the new point.
      Returns:
      A copy of this model that also includes the given point.
    • getPaths

      public java.util.List<PathCreationTO> getPaths()
      Returns this plant model's paths.
      Returns:
      This plant model's paths.
    • withPaths

      public PlantModelCreationTO withPaths​(@Nonnull java.util.List<PathCreationTO> paths)
      Creates a copy of this object with the given paths.
      Parameters:
      paths - The new paths.
      Returns:
      A copy of this model, differing in the given paths.
    • withPath

      public PlantModelCreationTO withPath​(@Nonnull PathCreationTO path)
      Creates a copy of this object that includes the given path in the list of paths.
      Parameters:
      path - the new path.
      Returns:
      A copy of this model that also includes the given path.
    • getLocationTypes

      public java.util.List<LocationTypeCreationTO> getLocationTypes()
      Returns this plant model's location types.
      Returns:
      This plant model's location types.
    • withLocationTypes

      public PlantModelCreationTO withLocationTypes​(@Nonnull java.util.List<LocationTypeCreationTO> locationTypes)
      Creates a copy of this object with the given location type.
      Parameters:
      locationTypes - The new location types.
      Returns:
      A copy of this model, differing in the given location types.
    • withLocationType

      public PlantModelCreationTO withLocationType​(@Nonnull LocationTypeCreationTO locationType)
      Creates a copy of this object that includes the given path in the list of location types.
      Parameters:
      locationType - the new location type.
      Returns:
      A copy of this model that also includes the given location type.
    • getLocations

      public java.util.List<LocationCreationTO> getLocations()
      Returns this plant model's locations.
      Returns:
      This plant model's locations.
    • withLocations

      public PlantModelCreationTO withLocations​(@Nonnull java.util.List<LocationCreationTO> locations)
      Creates a copy of this object with the given locations.
      Parameters:
      locations - The new locations.
      Returns:
      A copy of this model, differing in the given locations.
    • withLocation

      public PlantModelCreationTO withLocation​(@Nonnull LocationCreationTO location)
      Creates a copy of this object that includes the given block in the list of locations.
      Parameters:
      location - the new location.
      Returns:
      A copy of this model that also includes the given location.
    • getBlocks

      public java.util.List<BlockCreationTO> getBlocks()
      Returns this plant model's blocks.
      Returns:
      This plant model's blocks.
    • withBlocks

      public PlantModelCreationTO withBlocks​(@Nonnull java.util.List<BlockCreationTO> blocks)
      Creates a copy of this object with the given blocks.
      Parameters:
      blocks - The new blocks.
      Returns:
      A copy of this model, differing in the given blocks.
    • withBlock

      public PlantModelCreationTO withBlock​(@Nonnull BlockCreationTO block)
      Creates a copy of this object that includes the given block in the list of blocks.
      Parameters:
      block - the new block.
      Returns:
      A copy of this model that also includes the given block.
    • getGroups

      @Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public java.util.List<GroupCreationTO> getGroups()
      Deprecated.
      Returns this plant model's groups.
      Returns:
      This plant model's groups.
    • withGroups

      @Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public PlantModelCreationTO withGroups​(@Nonnull java.util.List<GroupCreationTO> groups)
      Deprecated.
      Creates a copy of this object with the given groups.
      Parameters:
      groups - The new groups.
      Returns:
      A copy of this model, differing in the given groups.
    • withGroup

      @Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public PlantModelCreationTO withGroup​(@Nonnull GroupCreationTO group)
      Deprecated.
      Creates a copy of this object that includes the given group in the list of groups.
      Parameters:
      group - the new group.
      Returns:
      A copy of this model that also includes the given group.
    • getVehicles

      public java.util.List<VehicleCreationTO> getVehicles()
      Returns this plant model's vehicles.
      Returns:
      This plant model's vehicles.
    • withVehicles

      public PlantModelCreationTO withVehicles​(@Nonnull java.util.List<VehicleCreationTO> vehicles)
      Creates a copy of this object with the given vehicles.
      Parameters:
      vehicles - The new vehicles.
      Returns:
      A copy of this model, differing in the given vehicles.
    • withVehicle

      public PlantModelCreationTO withVehicle​(@Nonnull VehicleCreationTO vehicle)
      Creates a copy of this object that includes the given vehicle in the list of vehicles.
      Parameters:
      vehicle - the new vehicle.
      Returns:
      A copy of this model that also includes the given vehicle.
    • getVisualLayout

      public VisualLayoutCreationTO getVisualLayout()
      Returns this plant model's visual layout.
      Returns:
      This plant model's visual layout.
    • getVisualLayouts

      @Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public java.util.List<VisualLayoutCreationTO> getVisualLayouts()
      Deprecated.
      UsegetVisualLayout() instead.
      Returns this plant model's visual layouts.
      Returns:
      This plant model's visual layouts.
    • withVisualLayouts

      @Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public PlantModelCreationTO withVisualLayouts​(@Nonnull java.util.List<VisualLayoutCreationTO> visualLayouts)
      Creates a copy of this object with the given visual layouts.
      Parameters:
      visualLayouts - The new visual layouts.
      Returns:
      A copy of this model, differing in the given visual layouts.
    • withVisualLayout

      @ScheduledApiChange(details="A plant model will contain only a single visual layout.", when="6.0") public PlantModelCreationTO withVisualLayout​(@Nonnull VisualLayoutCreationTO visualLayout)
      Creates a copy of this object that includes the given visual layout in the list of visual layout elements.
      Parameters:
      visualLayout - the new visual layout.
      Returns:
      A copy of this model that also includes the given visual layout.
    • withProperties

      public PlantModelCreationTO withProperties​(@Nonnull java.util.Map<java.lang.String,​java.lang.String> properties)
      Creates a copy of this object with the given properties.
      Overrides:
      withProperties in class CreationTO
      Parameters:
      properties - The new properties.
      Returns:
      A copy of this object, differing in the given properties.
    • withProperty

      public PlantModelCreationTO withProperty​(@Nonnull java.lang.String key, @Nonnull java.lang.String value)
      Creates a copy of this object and adds the given property. If value == null, then the key-value pair is removed from the properties.
      Overrides:
      withProperty in class CreationTO
      Parameters:
      key - the key.
      value - the value
      Returns:
      A copy of this object that either includes the given entry in it's current properties, if value != null or excludes the entry otherwise.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object