Package jmri.jmrit.operations.trains
Class JsonManifest
- java.lang.Object
-
- jmri.jmrit.operations.trains.TrainCommon
-
- jmri.jmrit.operations.trains.JsonManifest
-
public class JsonManifest extends TrainCommon
A minimal manifest in JSON. This manifest is intended to be read by machines for building manifests in other, human-readable outputs. This manifest is retained at build time so that manifests can be endlessly recreated in other formats, even if the operations database state has changed. It is expected that the parsers for this manifest will be capable of querying operations for more specific information while transforming this manifest into other formats.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Locale
locale
protected Train
train
-
Fields inherited from class jmri.jmrit.operations.trains.TrainCommon
_dropCars, _pickupCars, _printLocalMoveHeader, _printPickupHeader, _printSetoutHeader, BLANK_LINE, BUILD_REPORT_CHAR, carManager, doneCars, ENGINE, engineManager, HORIZONTAL_LINE_CHAR, HYPHEN, index, IS_MANIFEST, IS_TWO_COLUMN_TRACK, LOCAL, locationManager, NEW_LINE, PAPER_MARGINS, PICKUP, SPACE, TAB, TEXT_COLOR_DONE, TEXT_COLOR_END, TEXT_COLOR_START, utilityCarTypes, VERTICAL_LINE_CHAR
-
-
Constructor Summary
Constructors Constructor Description JsonManifest(Train train)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
build()
protected com.fasterxml.jackson.databind.node.ArrayNode
dropEngines(java.util.List<Engine> engines, RouteLocation routeLocation)
java.io.File
getFile()
com.fasterxml.jackson.databind.node.ArrayNode
getLocations()
protected com.fasterxml.jackson.databind.node.ArrayNode
pickupEngines(java.util.List<Engine> engines, RouteLocation routeLocation)
-
Methods inherited from class jmri.jmrit.operations.trains.TrainCommon
addCarsLocationUnknown, addLine, addLine, blockCarsByTrack, blockCarsByTrackNameTwoColumn, blockCarsTwoColumn, blockLocosTwoColumn, clearUtilityCarTypes, convertStringToDate, countPickupUtilityCars, countSetoutUtilityCars, countUtilityCars, createTabIfNeeded, dropCar, dropCar, dropEngine, dropEngines, formatColorString, formatStringToCommaSeparated, getDate, getDate, getDropCarHeader, getDropEngineHeader, getISO8601Date, getLineLength, getLocalMoveHeader, getManifestHeaderLineLength, getPageSize, getPickupCarHeader, getPickupEngineHeader, getTextColor, getTextColorName, getTextColorString, isNextCar, isNextCar, isThereWorkAtLocation, isThereWorkAtLocation, localMoveCar, newLine, newLine, padAndTruncate, padAndTruncateIfNeeded, padString, pickupCar, pickUpCar, pickUpCarTruncated, pickupEngine, pickupEngines, pickupUtilityCars, pickupUtilityCars, printCarHeader, printDropCarHeader, printDropEngineHeader, printEngineHeader, printHorizontalLine, printHorizontalLine, printLocalCarMoveHeader, printPickupCarHeader, printPickupEngineHeader, printTrackComments, printTrackNameHeader, setoutUtilityCars, setoutUtilityCars, setoutUtilityCars, splitString, tabString, truncatedDropCar
-
-
-
-
Constructor Detail
-
JsonManifest
public JsonManifest(Train train)
-
-
Method Detail
-
getFile
public java.io.File getFile()
-
build
public void build() throws java.io.IOException
- Throws:
java.io.IOException
-
getLocations
public com.fasterxml.jackson.databind.node.ArrayNode getLocations()
-
dropEngines
protected com.fasterxml.jackson.databind.node.ArrayNode dropEngines(java.util.List<Engine> engines, RouteLocation routeLocation)
-
pickupEngines
protected com.fasterxml.jackson.databind.node.ArrayNode pickupEngines(java.util.List<Engine> engines, RouteLocation routeLocation)
-
-