Codota Logo
MatsimXmlParser
Code IndexAdd Codota to your IDE (free)

How to use
MatsimXmlParser
in
org.matsim.core.utils.io

Best Java code snippets using org.matsim.core.utils.io.MatsimXmlParser (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: matsim-org/matsim

@Override
public void endTag(final String name, final String content, final Stack<String> context) {
  this.delegate.endTag(name, content, context);
}
origin: matsim-org/matsim

@Override
public void startTag(final String name, final Attributes atts, final Stack<String> context) {
  this.delegate.startTag(name, atts, context);
}
origin: matsim-org/matsim

@Override
public void characters(char[] ch, int start, int length) throws SAXException {
  if (this.readCharacters) {
    super.characters(ch, start, length);
  }
  // ignore characters to prevent OutOfMemoryExceptions
  /* non-validating files contain empty tags with attributes,
   * but without the dtd or schema, all whitespace between tags is handled
   * by characters and added up by super.characters, consuming huge
   * amount of memory when large files are read in.
   */
}
origin: matsim-org/matsim

setDoctype(shortSystemId);
source = findDtdInLocalFilesystem(shortSystemId);
if (source == null) {
  source = findDtdInClasspath(shortSystemId);
  source = findDtdInDefaultLocation(shortSystemId);
  source = findDtdInRemoteLocation(systemId);
source = findDtdInRemoteLocation(systemId);
if (source == null) {
  source = findDtdInLocalFilesystem(shortSystemId);
  source = findDtdInClasspath(shortSystemId);
  source = findDtdInDefaultLocation(shortSystemId);
origin: matsim-org/matsim

@Override
public void endDocument() {
  try {
    this.delegate.endDocument();
  } catch (SAXException e) {
    throw new RuntimeException(e);
  }
  if (targetCRS != null) {
    ProjectionUtils.putCRS(network, targetCRS);
  }
}
origin: matsim-org/matsim

@Override
public final void warning(final SAXParseException ex) throws SAXException {
  System.err.println("XML-WARNING: " + getInputSource(ex) + ", line " + ex.getLineNumber() + ", column " + ex.getColumnNumber() + ":");
  System.err.println(ex.getMessage());
}
origin: matsim-org/matsim

  @Override
  public void endDocument() {
    try {
      this.delegate.endDocument();
    } catch (SAXException e) {
      throw new RuntimeException(e);
    }
    if (targetCRS != null) {
      ProjectionUtils.putCRS(scenario.getTransitSchedule(), targetCRS);
    }
  }
}
origin: matsim-org/matsim

@Override
public final void fatalError(final SAXParseException ex) throws SAXException {
  System.err.println("XML-FATAL: " + getInputSource(ex) + ", line " + ex.getLineNumber() + ", column " + ex.getColumnNumber() + ":");
  System.err.println(ex.toString());
  throw ex;
}
origin: matsim-org/matsim

@Override
public void endTag(final String name, final String content, final Stack<String> context) {
  this.delegate.endTag(name, content, context);
}
origin: matsim-org/matsim

@Override
public void startTag(final String name, final Attributes atts, final Stack<String> context) {
  this.delegate.startTag(name, atts, context);
}
origin: matsim-org/matsim

@Override
public void characters(char[] ch, int start, int length) throws SAXException {
  this.delegate.characters(ch, start, length);
}
origin: matsim-org/matsim

  @Override
  public void endDocument() {
    try {
      this.delegate.endDocument();
    } catch (SAXException e) {
      throw new RuntimeException(e);
    }
    if (targetCRS != null) {
      ProjectionUtils.putCRS(scenario.getPopulation(), targetCRS);
    }
  }
}
origin: matsim-org/matsim

@Override
public final void error(final SAXParseException ex) throws SAXException {
  if (this.theContext.isEmpty()) {
    System.err.println("Missing DOCTYPE.");
  }
  System.err.println("XML-ERROR: " + getInputSource(ex) + ", line " + ex.getLineNumber() + ", column " + ex.getColumnNumber() + ":");
  System.err.println(ex.toString());
  throw ex;
}
origin: matsim-org/matsim

@Override
public void endTag(String name, String content, Stack<String> context) {
  this.delegate.endTag(name, content, context);
}
origin: matsim-org/matsim

@Override
public void startTag(final String name, final Attributes atts, final Stack<String> context) {
  this.delegate.startTag(name, atts, context);
}
origin: matsim-org/matsim

  @Override
  public void characters(char[] ch, int start, int length) throws SAXException {
    this.defaultEventsReader.characters(ch, start, length);
    this.personLinkMoneyEventsReader.characters(ch, start, length);
  }
}
origin: matsim-org/matsim

@Override
public void endTag(final String name, final String content, final Stack<String> context) {
  this.delegate.endTag(name, content, context);
}
origin: matsim-org/matsim

@Override
public void startTag(final String name, final Attributes atts, final Stack<String> context) {
  this.delegate.startTag(name, atts, context);
}
origin: matsim-org/matsim

@Override
public void endTag(final String name, final String content, final Stack<String> context) {
  this.delegate.endTag(name, content, context);
}
origin: matsim-org/matsim

@Override
public void startTag(String name, Attributes atts, Stack<String> context) {
  this.delegate.startTag(name, atts, context);
}
org.matsim.core.utils.ioMatsimXmlParser

Javadoc

An abstract XML-Parser which can be easily extended for reading custom XML-formats. This class handles all the low level functionality required to parse xml-files. Extending classes have only to implement #startTag and #endTagto implement a custom parser.
The parser implements a custom EntityResolver to look for DTDs in the MATSim world.

Notes:
  • If implementing classes want to override the final methods, the will have to resort to delegation.

Most used methods

  • endTag
    Called for each closing xml-tag.
  • startTag
    Called for each opening xml-tag.
  • characters
  • endDocument
  • findDtdInClasspath
  • findDtdInDefaultLocation
  • findDtdInLocalFilesystem
  • findDtdInRemoteLocation
  • getInputSource
  • parse
  • setDoctype
  • setValidating
    Sets, if this parser should validate the read XML or not. Not validating is sometimes useful during
  • setDoctype,
  • setValidating

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • JButton (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now