|
MATSIM
|

Public Member Functions | |
| EventsConverterXML (final EventsManager events) | |
| void | startTag (String name, Attributes atts, Stack< String > context) |
| void | endTag (String name, String content, Stack< String > context) |
| final void | setValidating (final boolean validateXml) |
| final void | setNamespaceAware (final boolean awareness) |
| final void | setLocalDtdDirectory (final String localDtdDirectory) |
| final void | readFile (final String filename) throws UncheckedIOException |
| final void | readURL (final URL url) throws UncheckedIOException |
| final void | readStream (InputStream stream) throws UncheckedIOException |
| final void | parse (final URL url) throws UncheckedIOException |
| final void | parse (final InputStream stream) throws UncheckedIOException |
| final void | parse (final InputSource input) throws UncheckedIOException |
| final String | getDoctype () |
| final InputSource | resolveEntity (final String publicId, final String systemId) |
| void | characters (final char[] ch, final int start, final int length) throws SAXException |
| final void | startElement (final String uri, final String localName, final String qName, Attributes atts) |
| final void | endElement (final String uri, final String localName, final String qName) throws SAXException |
| final void | error (final SAXParseException ex) throws SAXException |
| final void | fatalError (final SAXParseException ex) throws SAXException |
| final void | warning (final SAXParseException ex) throws SAXException |
Static Public Member Functions | |
| static double | parseDouble (String value) throws NumberFormatException |
Protected Member Functions | |
| void | setDoctype (final String doctype) |
Private Attributes | |
| final EventsManager | events |
| final EventsReaderXMLv1 | basicEventsReader |
| boolean | containsVehicleLeavesTrafficEvents = false |
| Map< Id< Person >, Id< Vehicle > > | driverToVeh = new HashMap<>() |
| Map< Id< Person >, String > | personToLegMode = new HashMap<>() |
Static Private Attributes | |
| static final String | EVENT = "event" |
| static final String | ATTRIBUTE_PERSON = "person" |
This class reads and completes event files regarding vehicle ids.
If the Wait2LinkEvents contain vehicle ids different from null, this ids are added to the LinkEnter- and LinkLeaveEvents. If not, the person id is used as vehicle id in Wait2Link-, LinkLeave- and LinkEnterEvents.
Additionally, this class adds VehicleLeavesTrafficEvents if they are not existing.
Definition at line 55 of file EventsConverterXML.java.
| org.matsim.core.events.EventsConverterXML.EventsConverterXML | ( | final EventsManager | events | ) |
Definition at line 66 of file EventsConverterXML.java.
References org.matsim.core.events.EventsConverterXML.events, org.matsim.core.utils.io.MatsimXmlParser.ValidationType.NO_VALIDATION, and org.matsim.core.utils.io.MatsimXmlParser.setValidating().

| void org.matsim.core.events.EventsConverterXML.startTag | ( | String | name, |
| Attributes | atts, | ||
| Stack< String > | context | ||
| ) |
Definition at line 75 of file EventsConverterXML.java.
References org.matsim.api.core.v01.events.PersonDepartureEvent.ATTRIBUTE_LEGMODE, org.matsim.api.core.v01.events.PersonArrivalEvent.ATTRIBUTE_LEGMODE, org.matsim.api.core.v01.events.HasLinkId.ATTRIBUTE_LINK, org.matsim.api.core.v01.events.LinkLeaveEvent.ATTRIBUTE_LINK, org.matsim.api.core.v01.events.PersonArrivalEvent.ATTRIBUTE_LINK, org.matsim.api.core.v01.events.VehicleEntersTrafficEvent.ATTRIBUTE_NETWORKMODE, org.matsim.api.core.v01.events.HasPersonId.ATTRIBUTE_PERSON, org.matsim.api.core.v01.events.PersonDepartureEvent.ATTRIBUTE_PERSON, org.matsim.api.core.v01.events.PersonArrivalEvent.ATTRIBUTE_PERSON, org.matsim.api.core.v01.events.PersonLeavesVehicleEvent.ATTRIBUTE_PERSON, org.matsim.api.core.v01.events.HasVehicleId.ATTRIBUTE_VEHICLE, org.matsim.core.events.EventsConverterXML.containsVehicleLeavesTrafficEvents, org.matsim.api.core.v01.Id< T >.create(), org.matsim.api.core.v01.Id< T >.createLinkId(), org.matsim.api.core.v01.Id< T >.createPersonId(), org.matsim.api.core.v01.events.LinkEnterEvent.EVENT_TYPE, org.matsim.api.core.v01.events.LinkLeaveEvent.EVENT_TYPE, org.matsim.api.core.v01.events.PersonDepartureEvent.EVENT_TYPE, org.matsim.api.core.v01.events.VehicleLeavesTrafficEvent.EVENT_TYPE, org.matsim.api.core.v01.events.VehicleEntersTrafficEvent.EVENT_TYPE, org.matsim.api.core.v01.events.PersonArrivalEvent.EVENT_TYPE, org.matsim.api.core.v01.events.PersonLeavesVehicleEvent.EVENT_TYPE, org.matsim.api.core.v01.Id< T >.get(), org.matsim.core.api.experimental.events.EventsManager.processEvent(), and org.matsim.core.events.EventsReaderXMLv1.startTag().

| void org.matsim.core.events.EventsConverterXML.endTag | ( | String | name, |
| String | content, | ||
| Stack< String > | context | ||
| ) |
Definition at line 177 of file EventsConverterXML.java.
|
inherited |
Sets, if this parser should validate the read XML or not. Not validating is sometimes useful during development or during some tests with format-extensions that are not yet part of the DTD, but it is strongly discouraged not to validate during production use.
| validateXml | Whether the parsed XML should be validated or not. |
Definition at line 117 of file MatsimXmlParser.java.
Referenced by org.matsim.core.events.EventsConverterXML.EventsConverterXML(), and org.matsim.core.events.EventsReaderXMLv1.EventsReaderXMLv1().
|
inherited |
Specifies that the parser produced by this code will provide support for XML namespaces. By default the value of this is set to false.
| awareness | true if the parser produced by this code will provide support for XML namespaces; false otherwise. |
Definition at line 128 of file MatsimXmlParser.java.
|
inherited |
Sets the directory where to look for DTD and XSD files if they are not found at the location specified in the XML.
| localDtdDirectory |
Definition at line 138 of file MatsimXmlParser.java.
|
inherited |
Parses the specified file. The file can be gzip-compressed and is decompressed on-the-fly while parsing. A gzip-compressed file must have the ending ".gz" to be correctly recognized. The passed filename may or may not contain the ending ".gz". If no uncompressed file is found with the specified name, the ending ".gz" will be added to the filename and a compressed file will be searched for and read if found.
| filename | The filename of the file to read, optionally ending with ".gz" to force reading a gzip-compressed file. |
| UncheckedIOException |
Implements org.matsim.core.api.internal.MatsimReader.
Definition at line 152 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.IOUtils.getBufferedReader(), and org.matsim.core.utils.io.MatsimXmlParser.parse().
Referenced by org.matsim.utils.gis.matsim2esri.plans.SelectedPlans2ESRIShape.main(), org.matsim.core.utils.io.OsmNetworkReader.parse(), org.matsim.vehicles.MatsimVehicleReader.readFile(), org.matsim.pt.transitSchedule.api.TransitScheduleReader.readFile(), org.matsim.core.events.MatsimEventsReader.readFile(), org.matsim.core.population.io.StreamingPopulationReader.readFile(), org.matsim.core.network.NetworkUtils.readNetwork(), org.matsim.core.population.PopulationUtils.readPopulation(), org.matsim.core.network.algorithms.intersectionSimplifier.RunIntersectionSimplifier.run(), and org.matsim.run.gui.ScheduleValidatorWindow.run().

|
inherited |
Implements org.matsim.core.api.internal.MatsimReader.
Definition at line 159 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.parse().
Referenced by org.matsim.vehicles.MatsimVehicleReader.readURL(), and org.matsim.core.events.MatsimEventsReader.readURL().

|
inherited |
Definition at line 163 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.parse().

|
inherited |
Definition at line 167 of file MatsimXmlParser.java.
References org.matsim.core.gbl.Gbl.assertNotNull(), and org.matsim.core.utils.io.IOUtils.getBufferedReader().
Referenced by org.matsim.core.config.ConfigUtils.loadConfig(), org.matsim.core.population.io.StreamingPopulationReader.parse(), org.matsim.core.utils.io.MatsimXmlParser.parse(), org.matsim.core.utils.io.OsmNetworkReader.parse(), org.matsim.core.utils.io.MatsimXmlParser.readFile(), org.matsim.vehicles.MatsimVehicleReader.readStream(), org.matsim.pt.transitSchedule.api.TransitScheduleReader.readStream(), org.matsim.core.events.MatsimEventsReader.readStream(), org.matsim.core.utils.io.MatsimXmlParser.readStream(), org.matsim.pt.transitSchedule.api.TransitScheduleReader.readURL(), org.matsim.core.population.io.StreamingPopulationReader.readURL(), and org.matsim.core.utils.io.MatsimXmlParser.readURL().

|
inherited |
Definition at line 175 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.parse().

|
inherited |
Definition at line 180 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.ValidationType.DTD_ONLY, and org.matsim.core.utils.io.MatsimXmlParser.ValidationType.NO_VALIDATION.
|
inherited |
Definition at line 235 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.doctype.
|
protectedinherited |
Definition at line 239 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.doctype.
Referenced by org.matsim.core.utils.io.MatsimXmlParser.resolveEntity().
|
inherited |
Definition at line 248 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.findDtdInClasspath(), org.matsim.core.utils.io.MatsimXmlParser.findDtdInDefaultLocation(), org.matsim.core.utils.io.MatsimXmlParser.findDtdInLocalFilesystem(), org.matsim.core.utils.io.MatsimXmlParser.findDtdInRemoteLocation(), and org.matsim.core.utils.io.MatsimXmlParser.setDoctype().

|
inherited |
Definition at line 352 of file MatsimXmlParser.java.
|
inherited |
Definition at line 362 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.startTag().

|
inherited |
Definition at line 372 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.endTag(), and org.matsim.core.utils.io.MatsimXmlParser.theContext.

|
inherited |
Definition at line 384 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.getInputSource().

|
inherited |
Definition at line 394 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.getInputSource().

|
inherited |
Definition at line 401 of file MatsimXmlParser.java.
References org.matsim.core.utils.io.MatsimXmlParser.getInputSource().

|
staticinherited |
Parses a String into a double, taking into account the special encoding for Infinity according to the xsd-specifications for the xs:double data type
Definition at line 426 of file MatsimXmlParser.java.
|
staticprivate |
Definition at line 57 of file EventsConverterXML.java.
|
staticprivate |
Definition at line 58 of file EventsConverterXML.java.
|
private |
Definition at line 60 of file EventsConverterXML.java.
Referenced by org.matsim.core.events.EventsConverterXML.EventsConverterXML().
|
private |
Definition at line 61 of file EventsConverterXML.java.
|
private |
Definition at line 62 of file EventsConverterXML.java.
Referenced by org.matsim.core.events.EventsConverterXML.startTag().
|
private |
Definition at line 63 of file EventsConverterXML.java.
|
private |
Definition at line 64 of file EventsConverterXML.java.
1.8.13