|
MATSIM
|

Public Member Functions | |
| MatsimVehicleWriter (Vehicles vehicles) | |
| void | writeFile (String filename) |
| final void | setPrettyPrint (boolean doPrettyPrint) |
| final void | setIndentationString (String indentationString) |
| final void | useCompression (final boolean useCompression) |
Static Public Attributes | |
| static final String | DEFAULT_DTD_LOCATION = "http://www.matsim.org/files/dtd/" |
| static final String | MATSIM_NAMESPACE = "http://www.matsim.org/files/dtd" |
| static final String | XMLNS = "xmlns" |
| static final String | DEFAULTSCHEMANAMESPACELOCATION = "http://www.w3.org/2001/XMLSchema-instance" |
Protected Member Functions | |
| final void | setIndentationLevel (int level) |
| final void | writeXmlHead () throws UncheckedIOException |
| final void | writeDoctype (String rootTag, String dtdUrl) throws UncheckedIOException |
| final void | writeStartTag (String tagname, List< Tuple< String, String >> attributes) throws UncheckedIOException |
| final void | writeStartTag (String tagname, List< Tuple< String, String >> attributes, boolean closeElement) throws UncheckedIOException |
| final void | writeStartTag (String tagname, List< Tuple< String, String >> attributes, boolean closeElement, boolean emptyLineAfter) throws UncheckedIOException |
| final void | writeContent (String content, boolean allowWhitespaces) throws UncheckedIOException |
| final void | writeEndTag (String tagname) throws UncheckedIOException |
| final void | writeElement (String tagname, String content) throws UncheckedIOException |
| final void | openFile (final String filename) throws UncheckedIOException |
| final void | openOutputStream (OutputStream outputStream) |
| final void | close () throws UncheckedIOException |
Static Protected Member Functions | |
| static Tuple< String, String > | createTuple (String one, String two) |
| static Tuple< String, String > | createTuple (String one, int two) |
| static Tuple< String, String > | createTuple (String one, double two) |
| static Tuple< String, String > | createTuple (String one, boolean two) |
| static Tuple< String, String > | createTimeTuple (String one, double sec) |
Protected Attributes | |
| BufferedWriter | writer = null |
| Boolean | useCompression = null |
Static Protected Attributes | |
| static final String | NL = "\n" |
Private Attributes | |
| VehicleWriterV2 | delegate |
Static Private Attributes | |
| static final Logger | log = LogManager.getLogger(MatsimVehicleWriter.class) |
This is the new default Writer for the vehicles file. It can easy pointed to the current version of VehicleReader (which is now V2)
Definition at line 34 of file MatsimVehicleWriter.java.
| org.matsim.vehicles.MatsimVehicleWriter.MatsimVehicleWriter | ( | Vehicles | vehicles | ) |
Definition at line 40 of file MatsimVehicleWriter.java.
| void org.matsim.vehicles.MatsimVehicleWriter.writeFile | ( | String | filename | ) |
Writes the vehicles in the current default format (currently vehicleDefinitions_v2.0.dtd).
Definition at line 48 of file MatsimVehicleWriter.java.
References org.matsim.core.gbl.Gbl.aboutToWrite().
Referenced by org.matsim.vehicles.VehicleUtils.writeVehicles().

|
inherited |
Set the pretty print flag of the XMLWriter, see comment of flag.
| doPrettyPrint |
Definition at line 74 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.doPrettyPrint.
|
inherited |
Set the String used for indentation in the pretty print xml mode.
| indentationString |
Definition at line 81 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.indentationString.
|
protectedinherited |
Set the indentation level of the writer for pretty print option
| level |
Definition at line 90 of file MatsimXmlWriter.java.
|
protectedinherited |
Writes the standard xml 1.0 header to the output.
| UncheckedIOException |
Definition at line 103 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.AbstractMatsimWriter.NL, and org.matsim.core.utils.io.AbstractMatsimWriter.writer.
Referenced by org.matsim.matrices.MatricesWriter.write(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.write(), org.matsim.core.config.ConfigWriter.write(), org.matsim.core.network.io.NetworkWriter.writeContent(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile(), org.matsim.vehicles.VehicleWriterV1.writeFile(), and org.matsim.households.HouseholdsWriterV10.writeFile().
|
protectedinherited |
Writes the doctype declaration to the output.
| rootTag | The root tag of the written XML document. |
| dtdUrl | The location of the document type definition of this XML document. |
| UncheckedIOException |
Definition at line 121 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.AbstractMatsimWriter.NL, and org.matsim.core.utils.io.AbstractMatsimWriter.writer.
Referenced by org.matsim.matrices.MatricesWriter.write(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.write(), org.matsim.core.config.ConfigWriter.write(), org.matsim.core.network.io.NetworkWriter.writeContent(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), and org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile().
|
staticprotectedinherited |
Convenience method to create XML Attributes written by startTag()
Definition at line 132 of file MatsimXmlWriter.java.
Referenced by org.matsim.core.utils.io.MatsimXmlWriter.createTimeTuple(), org.matsim.core.utils.io.MatsimXmlWriter.createTuple(), org.matsim.vehicles.VehicleWriterV1.writeCapacity(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeDepartures(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeDepartures(), org.matsim.vehicles.VehicleWriterV1.writeEngineInformation(), org.matsim.vehicles.VehicleWriterV1.writeFreightCapacity(), org.matsim.households.HouseholdsWriterV10.writeHeader(), org.matsim.households.HouseholdsWriterV10.writeHouseholds(), org.matsim.households.HouseholdsWriterV10.writeIncome(), org.matsim.households.HouseholdsWriterV10.writeMembers(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeMinimalTransferTimes(), org.matsim.vehicles.VehicleWriterV1.writeRootElement(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRouteProfile(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRouteProfile(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitStops(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitStops(), org.matsim.vehicles.VehicleWriterV1.writeVehicles(), and org.matsim.vehicles.VehicleWriterV1.writeVehicleTypes().
|
staticprotectedinherited |
Convenience method to create XML Attributes written by startTag()
Definition at line 138 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.createTuple().

|
staticprotectedinherited |
Convenience method to create XML Attributes written by startTag()
Definition at line 145 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.createTuple().

|
staticprotectedinherited |
Convenience method to create XML Attributes written by startTag()
Definition at line 161 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.createTuple().

|
staticprotectedinherited |
Convenience method to create XML Attributes written by startTag()
Definition at line 168 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.createTuple(), and org.matsim.core.utils.misc.Time.writeTime().
Referenced by org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeDepartures(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeDepartures(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRouteProfile(), and org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRouteProfile().

|
protectedinherited |
Writes a start tag with all attributes on the writer
| tagname | |
| attributes |
| UncheckedIOException |
Definition at line 184 of file MatsimXmlWriter.java.
Referenced by org.matsim.pt.transitSchedule.TransitScheduleWriterV1.write(), org.matsim.vehicles.VehicleWriterV1.writeCapacity(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeDepartures(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeDepartures(), org.matsim.vehicles.VehicleWriterV1.writeEngineInformation(), org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile(), org.matsim.vehicles.VehicleWriterV1.writeFreightCapacity(), org.matsim.households.HouseholdsWriterV10.writeHeader(), org.matsim.households.HouseholdsWriterV10.writeHouseholds(), org.matsim.households.HouseholdsWriterV10.writeIncome(), org.matsim.households.HouseholdsWriterV10.writeMembers(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeMinimalTransferTimes(), org.matsim.vehicles.VehicleWriterV1.writeRootElement(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRouteProfile(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRouteProfile(), org.matsim.core.utils.io.MatsimXmlWriter.writeStartTag(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitStops(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitStops(), org.matsim.vehicles.VehicleWriterV1.writeVehicles(), and org.matsim.vehicles.VehicleWriterV1.writeVehicleTypes().
|
protectedinherited |
Definition at line 188 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.writeStartTag().

|
protectedinherited |
Definition at line 192 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.indent(), org.matsim.core.utils.io.AbstractMatsimWriter.NL, and org.matsim.core.utils.io.AbstractMatsimWriter.writer.

|
protectedinherited |
Definition at line 223 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.indent(), org.matsim.core.utils.io.AbstractMatsimWriter.NL, and org.matsim.core.utils.io.AbstractMatsimWriter.writer.
Referenced by org.matsim.vehicles.VehicleWriterV1.writeEngineInformation(), org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile(), org.matsim.households.HouseholdsWriterV10.writeIncome(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitRoute(), and org.matsim.vehicles.VehicleWriterV1.writeVehicleTypes().

|
protectedinherited |
Writes a XML end tag with the given name to the given writer instance
| tagname |
| UncheckedIOException |
Definition at line 247 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.indent(), org.matsim.core.utils.io.AbstractMatsimWriter.NL, and org.matsim.core.utils.io.AbstractMatsimWriter.writer.
Referenced by org.matsim.pt.transitSchedule.TransitScheduleWriterV1.write(), org.matsim.vehicles.VehicleWriterV1.writeCapacity(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeDepartures(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeDepartures(), org.matsim.vehicles.VehicleWriterV1.writeEngineInformation(), org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile(), org.matsim.households.HouseholdsWriterV10.writeFile(), org.matsim.vehicles.VehicleWriterV1.writeFreightCapacity(), org.matsim.households.HouseholdsWriterV10.writeHouseholds(), org.matsim.households.HouseholdsWriterV10.writeIncome(), org.matsim.households.HouseholdsWriterV10.writeMembers(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeMinimalTransferTimes(), org.matsim.vehicles.VehicleWriterV1.writeRootElement(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeRouteProfile(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeRouteProfile(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.writeTransitStops(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitStops(), and org.matsim.vehicles.VehicleWriterV1.writeVehicleTypes().

|
protectedinherited |
Writes an element including start and end tag on the writer
| tagname | |
| content |
| UncheckedIOException |
Definition at line 271 of file MatsimXmlWriter.java.
References org.matsim.core.utils.io.MatsimXmlWriter.indent(), org.matsim.core.utils.io.AbstractMatsimWriter.NL, and org.matsim.core.utils.io.AbstractMatsimWriter.writer.

|
inherited |
Sets whether the file should be gzip-compressed or not. Must be set before the file is opened for writing. If not set explicitly, the usage of compression is defined by the ending of the filename.
| useCompression |
Definition at line 58 of file AbstractMatsimWriter.java.
References org.matsim.core.utils.io.AbstractMatsimWriter.useCompression.
|
protectedinherited |
Opens the specified file for writing.
| filename |
| UncheckedIOException |
Definition at line 68 of file AbstractMatsimWriter.java.
References org.matsim.core.utils.io.AbstractMatsimWriter.assertNotAlreadyOpen(), and org.matsim.core.utils.io.IOUtils.getBufferedWriter().
Referenced by org.matsim.matrices.MatricesWriter.write(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.write(), org.matsim.core.network.io.NetworkChangeEventsWriter.write(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.write(), org.matsim.core.config.ConfigWriter.write(), org.matsim.core.population.io.PopulationWriter.write(), org.matsim.vehicles.VehicleWriterV1.writeFile(), org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile(), org.matsim.households.HouseholdsWriterV10.writeFile(), and org.matsim.core.network.io.NetworkWriter.writeFile().

|
protectedinherited |
Uses the specified OutputStream for writing.
Definition at line 81 of file AbstractMatsimWriter.java.
References org.matsim.core.utils.io.AbstractMatsimWriter.assertNotAlreadyOpen().
Referenced by org.matsim.pt.transitSchedule.TransitScheduleWriterV2.write(), org.matsim.core.population.io.PopulationWriter.write(), and org.matsim.core.network.io.NetworkWriter.writeStream().

|
protectedinherited |
Closes the file if it is still open.
| UncheckedIOException |
Definition at line 105 of file AbstractMatsimWriter.java.
Referenced by org.matsim.matrices.MatricesWriter.write(), org.matsim.pt.transitSchedule.TransitScheduleWriterV1.write(), org.matsim.core.network.io.NetworkChangeEventsWriter.write(), org.matsim.core.config.ConfigWriter.write(), org.matsim.core.population.io.PopulationWriter.write(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), org.matsim.vehicles.VehicleWriterV1.writeFile(), org.matsim.utils.objectattributes.ObjectAttributesXmlWriter.writeFile(), and org.matsim.households.HouseholdsWriterV10.writeFile().
|
staticprivate |
Definition at line 36 of file MatsimVehicleWriter.java.
|
private |
Definition at line 38 of file MatsimVehicleWriter.java.
|
staticinherited |
The default location where dtds are stored on the internet.
Definition at line 41 of file MatsimXmlWriter.java.
Referenced by org.matsim.households.HouseholdsWriterV10.writeHeader(), org.matsim.core.population.io.ParallelPopulationWriterHandlerV6.writeHeaderAndStartElement(), and org.matsim.vehicles.VehicleWriterV1.writeRootElement().
|
staticinherited |
The namespace used in the matsim xml formats
Definition at line 45 of file MatsimXmlWriter.java.
Referenced by org.matsim.core.utils.io.MatsimJaxbXmlWriter.setMarshallerProperties(), org.matsim.households.HouseholdsWriterV10.writeHeader(), and org.matsim.vehicles.VehicleWriterV1.writeRootElement().
|
staticinherited |
Constant for the xml namespace attribute
Definition at line 49 of file MatsimXmlWriter.java.
Referenced by org.matsim.households.HouseholdsWriterV10.writeHeader(), and org.matsim.vehicles.VehicleWriterV1.writeRootElement().
|
staticinherited |
Default location of the namespace of xml schema
Definition at line 53 of file MatsimXmlWriter.java.
Referenced by org.matsim.households.HouseholdsWriterV10.writeHeader(), and org.matsim.vehicles.VehicleWriterV1.writeRootElement().
|
staticprotectedinherited |
The Unix newline character.
Definition at line 41 of file AbstractMatsimWriter.java.
Referenced by org.matsim.core.network.io.NetworkChangeEventsWriter.write(), org.matsim.core.utils.io.MatsimXmlWriter.writeContent(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeDepartures(), org.matsim.core.utils.io.MatsimXmlWriter.writeDoctype(), org.matsim.core.utils.io.MatsimXmlWriter.writeElement(), org.matsim.core.utils.io.MatsimXmlWriter.writeEndTag(), org.matsim.core.network.io.NetworkChangeEventsWriter.writeEvent(), org.matsim.households.HouseholdsWriterV10.writeHouseholds(), org.matsim.core.utils.io.MatsimXmlWriter.writeStartTag(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitStops(), and org.matsim.core.utils.io.MatsimXmlWriter.writeXmlHead().
|
protectedinherited |
The writer output can be written to.
Definition at line 44 of file AbstractMatsimWriter.java.
Referenced by org.matsim.core.utils.io.MatsimXmlWriter.indent(), org.matsim.matrices.MatricesWriter.write(), org.matsim.core.network.io.NetworkChangeEventsWriter.write(), org.matsim.core.config.ConfigWriter.write(), org.matsim.core.population.io.PopulationWriter.write(), org.matsim.core.network.io.NetworkChangeEventsWriter.writeChangeValue(), org.matsim.core.network.io.NetworkWriter.writeContent(), org.matsim.core.utils.io.MatsimXmlWriter.writeContent(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeData(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeDepartures(), org.matsim.core.utils.io.MatsimXmlWriter.writeDoctype(), org.matsim.core.utils.io.MatsimXmlWriter.writeElement(), org.matsim.core.utils.io.MatsimXmlWriter.writeEndTag(), org.matsim.core.network.io.NetworkChangeEventsWriter.writeEvent(), org.matsim.households.HouseholdsWriterV10.writeHouseholds(), org.matsim.core.population.io.PopulationWriter.writePerson(), org.matsim.core.utils.io.MatsimXmlWriter.writeStartTag(), org.matsim.core.config.ConfigWriter.writeStream(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitLine(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitRoute(), org.matsim.pt.transitSchedule.TransitScheduleWriterV2.writeTransitStops(), and org.matsim.core.utils.io.MatsimXmlWriter.writeXmlHead().
|
protectedinherited |
Whether or not the output is gzip-compressed. If null, the usage of compression is decided by the filename (whether it ends with .gz or not).
Definition at line 49 of file AbstractMatsimWriter.java.
Referenced by org.matsim.core.utils.io.AbstractMatsimWriter.useCompression().
1.8.13