Package org.opentcs.access.to.model
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 Summary
Constructors Constructor Description PlantModelCreationTO(java.lang.String name)
Creates a new instance. -
Method Summary
Modifier and Type Method Description java.util.List<BlockCreationTO>
getBlocks()
Returns this plant model's blocks.java.util.List<GroupCreationTO>
getGroups()
Deprecated.java.util.List<LocationCreationTO>
getLocations()
Returns this plant model's locations.java.util.List<LocationTypeCreationTO>
getLocationTypes()
Returns this plant model's location types.java.util.List<PathCreationTO>
getPaths()
Returns this plant model's paths.java.util.List<PointCreationTO>
getPoints()
Returns this plant model's points.java.util.List<VehicleCreationTO>
getVehicles()
Returns this plant model's vehicles.VisualLayoutCreationTO
getVisualLayout()
Returns this plant model's visual layout.java.util.List<VisualLayoutCreationTO>
getVisualLayouts()
Deprecated.UsegetVisualLayout()
instead.java.lang.String
toString()
PlantModelCreationTO
withBlock(BlockCreationTO block)
Creates a copy of this object that includes the given block in the list of blocks.PlantModelCreationTO
withBlocks(java.util.List<BlockCreationTO> blocks)
Creates a copy of this object with the given blocks.PlantModelCreationTO
withGroup(GroupCreationTO group)
Deprecated.PlantModelCreationTO
withGroups(java.util.List<GroupCreationTO> groups)
Deprecated.PlantModelCreationTO
withLocation(LocationCreationTO location)
Creates a copy of this object that includes the given block in the list of locations.PlantModelCreationTO
withLocations(java.util.List<LocationCreationTO> locations)
Creates a copy of this object with the given locations.PlantModelCreationTO
withLocationType(LocationTypeCreationTO locationType)
Creates a copy of this object that includes the given path in the list of location types.PlantModelCreationTO
withLocationTypes(java.util.List<LocationTypeCreationTO> locationTypes)
Creates a copy of this object with the given location type.PlantModelCreationTO
withPath(PathCreationTO path)
Creates a copy of this object that includes the given path in the list of paths.PlantModelCreationTO
withPaths(java.util.List<PathCreationTO> paths)
Creates a copy of this object with the given paths.PlantModelCreationTO
withPoint(PointCreationTO point)
Creates a copy of this object that includes the given point in the list of points.PlantModelCreationTO
withPoints(java.util.List<PointCreationTO> points)
Creates a copy of this object with the given points.PlantModelCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.PlantModelCreationTO
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object and adds the given property.PlantModelCreationTO
withVehicle(VehicleCreationTO vehicle)
Creates a copy of this object that includes the given vehicle in the list of vehicles.PlantModelCreationTO
withVehicles(java.util.List<VehicleCreationTO> vehicles)
Creates a copy of this object with the given vehicles.PlantModelCreationTO
withVisualLayout(VisualLayoutCreationTO visualLayout)
Creates a copy of this object that includes the given visual layout in the list of visual layout elements.PlantModelCreationTO
withVisualLayouts(java.util.List<VisualLayoutCreationTO> visualLayouts)
Deprecated.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith, withName
-
Constructor Details
-
PlantModelCreationTO
public PlantModelCreationTO(java.lang.String name)Creates a new instance.- Parameters:
name
- The name of this plant model.
-
-
Method Details
-
getPoints
Returns this plant model's points.- Returns:
- This plant model's points.
-
withPoints
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
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
Returns this plant model's paths.- Returns:
- This plant model's paths.
-
withPaths
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
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
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
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
Returns this plant model's locations.- Returns:
- This plant model's locations.
-
withLocations
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
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
Returns this plant model's blocks.- Returns:
- This plant model's blocks.
-
withBlocks
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
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
Returns this plant model's vehicles.- Returns:
- This plant model's vehicles.
-
withVehicles
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
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
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)Deprecated.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 classCreationTO
- 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 classCreationTO
- 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 classjava.lang.Object
-