faa.tg.scenario.importer
Class XmlRouteImporter
java.lang.Object
faa.tg.scenario.importer.XmlDomImporter
faa.tg.scenario.importer.ImporterBase<T>
faa.tg.scenario.importer.XmlRouteImporterBase<Route>
faa.tg.scenario.importer.XmlRouteImporter
- All Implemented Interfaces:
- Importer<Route>, org.xml.sax.ErrorHandler
public class XmlRouteImporter
- extends XmlRouteImporterBase<Route>
- implements Importer<Route>
XmlRouteImporter reads Route data from an XML file.
See the source: XmlRouteImporter.java
- Version:
- $Id: XmlRouteImporter.java,v 3.16 2009/01/17 19:46:33 danaw Exp $, $Id: XmlRouteImporter.java,v 3.16 2009/01/17 19:46:33 danaw Exp $
- Author:
- Michael E. Ross, Dan Warburton, FAA/ACB-860
- See Also:
XmlDomImporter,
Importer
|
Field Summary |
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
|
Constructor Summary |
XmlRouteImporter(Airspace airspace)
|
XmlRouteImporter(java.util.Properties scenProp)
Import Routes based on the pointer in Scenario Properties, the constructor
creates an enumeration of Route objects. |
XmlRouteImporter(java.lang.String url)
Import routes based on a string URL. |
|
Method Summary |
java.util.Iterator<Route> |
importObjects(org.w3c.dom.Element rootRouteElement)
This method creates a list of all routes found in a given file. |
static void |
main(java.lang.String[] args)
For testing purposes only. |
void |
parse(java.util.Properties scenProp)
|
| Methods inherited from class faa.tg.scenario.importer.XmlDomImporter |
error, fatalError, getBoolean, getElementNamed, getText, getXmlDocument, getXmlDocument, getXmlDocument, getXmlDocument, getXmlDocumentUsingSchema, makeSimpleElement, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CVS_VERSION_ID
public static final java.lang.String CVS_VERSION_ID
- The CVS Version ID
- See Also:
- Constant Field Values
XmlRouteImporter
public XmlRouteImporter(java.util.Properties scenProp)
throws java.net.MalformedURLException,
XmlUrlException
- Import Routes based on the pointer in Scenario Properties, the constructor
creates an enumeration of Route objects. Then getNext() is called for
each Route to add it to the scenario. Out-of-Memory problems can occur, since the
Dom Document used is an in- memory structure.
- Parameters:
scenProp - A pointer in the scenario properties file
that points to an xml file.
- Throws:
java.net.MalformedURLException - URL was malformed.
XmlUrlException - Was unable to find file or its dtd/schema.
XmlRouteImporter
public XmlRouteImporter(Airspace airspace)
XmlRouteImporter
public XmlRouteImporter(java.lang.String url)
throws java.net.MalformedURLException,
XmlUrlException
- Import routes based on a string URL. Seems to be used by the main only.
- Parameters:
url - The URL of an xml file as a string.
- Throws:
java.net.MalformedURLException - - Thrown when a malformed URL occurres.
XmlUrlException - is unable to find file or its dtd/schema
parse
public void parse(java.util.Properties scenProp)
throws java.net.MalformedURLException,
XmlUrlException
- Throws:
java.net.MalformedURLException
XmlUrlException
importObjects
public java.util.Iterator<Route> importObjects(org.w3c.dom.Element rootRouteElement)
- This method creates a list of all routes found in a given file.
- Specified by:
importObjects in class ImporterBase<Route>
- Parameters:
rootRouteElement - Element to look for routes in, or null.
- Returns:
- A route iterator containing the routes found, or a blank list.
main
public static void main(java.lang.String[] args)
- For testing purposes only.
- Parameters:
args - Description of the Parameter