/** * {@inheritDoc} */ public void initialize(Map<String, Object> metaData) { sink.initialize(metaData); }
/** * {@inheritDoc} */ @Override public void run() { try { sink.initialize(Collections.<String, Object>emptyMap()); sink.complete(); } finally { sink.close(); } } }
@Override public void run() { try { sink.initialize(Collections.<String, Object>emptyMap()); if (publishBound) { sink.process(new BoundContainer(bound)); } sink.process(new NodeContainer(createNode())); sink.complete(); } finally { sink.close(); } }
/** * {@inheritDoc} */ public void complete() { sink.complete(); }
/** * {@inheritDoc} */ @Override public void process(BoundContainer boundContainer) { sink.process(boundContainer); }
/** * {@inheritDoc} */ public void close() { sink.close(); } }
SAXParser parser; sink.initialize(Collections.<String, Object> emptyMap()); sink.complete(); throw new OsmosisRuntimeException("Unable to read XML file " + file + ".", e); } finally { sink.release();
@Override public void run() { this.sink.initialize(new HashMap<>()); // Call the nodes this.source.getNodes().forEach((identifier, node) -> this.sink.process(new NodeContainer( new AtlasPrimitiveLocationItemToOsmosisNodeConverter().convert(node)))); this.source.getPoints().forEach((identifier, point) -> this.sink.process(new NodeContainer( new AtlasPrimitiveLocationItemToOsmosisNodeConverter().convert(point)))); // Call the ways this.source.getEdges().forEach((identifier, edge) -> this.sink.process( new WayContainer(new AtlasPrimitiveLineItemToOsmosisWayConverter().convert(edge)))); this.source.getLines().forEach((identifier, line) -> this.sink.process( new WayContainer(new AtlasPrimitiveLineItemToOsmosisWayConverter().convert(line)))); this.source.getAreas().forEach((identifier, area) -> this.sink.process( new WayContainer(new AtlasPrimitiveAreaToOsmosisWayConverter().convert(area)))); // Call the relations this.source.getRelations() .forEach((identifier, relation) -> this.sink.process(new RelationContainer( new AtlasPrimitiveRelationToOsmosisRelationConverter().convert(relation)))); // Close this.sink.release(); this.sink.complete(); }
@Override public void run() { try { sink.initialize(Collections.<String, Object>emptyMap()); (new BlockInputStream(input, parser)).process(); } catch (IOException e) { throw new OsmosisRuntimeException("Unable to process PBF stream", e); } finally { sink.close(); } } /** Store the input stream we're using. */
/** * {@inheritDoc} */ public void complete() { sink.complete(); }
/** * {@inheritDoc} */ public void process(NodeContainer container) { sink.process(container); }
/** * {@inheritDoc} */ public void close() { sink.close(); }
SAXParser parser; sink.initialize(Collections.<String, Object> emptyMap()); sink.complete(); throw new OsmosisRuntimeException("Unable to read XML file " + file + ".", e); } finally { sink.release();
/** * {@inheritDoc} */ public void initialize(Map<String, Object> metaData) { sink.initialize(metaData); }
/** * {@inheritDoc} */ public void complete() { sink.complete(); }
/** * {@inheritDoc} */ public void process(RelationContainer container) { sink.process(container); }
@Override public void close() { sink.close(); } };
this.sink.initialize(Collections.<String, Object> emptyMap()); parser = createParser(); parser.parse(inputStream, new OsmHandler(this.sink, this.enableDateParsing)); this.sink.complete(); this.sink.release(); if (inputStream != null)