Package org.entur.netex
Class NetexParser
java.lang.Object
org.entur.netex.NetexParser
Main entry point to the library. Used to parse a NeTEx publication
delivery into a queryable index.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a default NetexParser.NetexParser(XmlStreamReaderFactory xmlStreamReaderFactory) Create a NeTexParser that parses a NeTEx document through an XML stream reader (StAX). -
Method Summary
Modifier and TypeMethodDescriptionparse(InputStream inputStream) Parse an input stream of a single NeTEx public deliveryparse(InputStream inputStream, NetexEntitiesIndex index) Parse an input stream of a single NeTEx publication delivery into an existing index Existing entities with same id will be overwritten.Parse a NeTEx publication delivery from one or more files in a zip archiveparse(String pathToZip, NetexEntitiesIndex index) Parse a NeTEx publication delivery from one or more files in a zip archive into an existing index.
-
Constructor Details
-
NetexParser
public NetexParser()Create a default NetexParser. The default implementation relies on a SAX parser. -
NetexParser
Create a NeTexParser that parses a NeTEx document through an XML stream reader (StAX).
-
-
Method Details
-
parse
Parse a NeTEx publication delivery from one or more files in a zip archive- Parameters:
pathToZip- Path to zip file- Returns:
- A queryable index of NeTEx entities
- Throws:
IOException
-
parse
Parse a NeTEx publication delivery from one or more files in a zip archive into an existing index. Existing entities with same id will be overwritten.- Parameters:
pathToZip- Path to zip fileindex- An instance of NetexEntitiesIndex- Returns:
- The mutated index
- Throws:
IOException
-
parse
Parse an input stream of a single NeTEx public delivery- Parameters:
inputStream-- Returns:
- A queryable index of NeTEx entities
-
parse
Parse an input stream of a single NeTEx publication delivery into an existing index Existing entities with same id will be overwritten.- Parameters:
inputStream- An InputStreamindex- An instance of NetexEntitiesIndex- Returns:
- The mutated index
-