Package org.openstreetmap.osmosis.xml.v0_6.impl

Examples of org.openstreetmap.osmosis.xml.v0_6.impl.FastXmlParser


    return maximumTimestamp;
  }


  private ChangeSink buildResultWriter(long sequenceNumber) {
    XmlChangeWriter xmlChangeWriter;
    ChangeSorter changeSorter;

    xmlChangeWriter = replicationStore.saveData(sequenceNumber);

    changeSorter = new ChangeSorter(new ChangeForStreamableApplierComparator());
View Full Code Here



  @Override
  public XmlChangeWriter saveData(long sequence) {
    File changeFile = sequenceFormatter.getFormattedName(sequence, ".osc.gz");
    return new XmlChangeWriter(changeFile, CompressionMethod.GZip);
  }
View Full Code Here

        factoryMap.put("read-xml-change"new XmlChangeReaderFactory());
        factoryMap.put("upload-xml-change", new XmlChangeUploaderFactory());
    factoryMap.put("rxc", new XmlChangeReaderFactory());
    factoryMap.put("write-xml", new XmlWriterFactory());
    factoryMap.put("wx", new XmlWriterFactory());
    factoryMap.put("write-xml-change", new XmlChangeWriterFactory());
    factoryMap.put("wxc", new XmlChangeWriterFactory());
    factoryMap.put("read-api", new XmlDownloaderFactory());
    factoryMap.put("ra", new XmlDownloaderFactory());
   
    factoryMap.put("read-xml-0.6", new XmlReaderFactory());
    factoryMap.put("fast-read-xml-0.6", new FastXmlReaderFactory());
    factoryMap.put("read-xml-change-0.6", new XmlChangeReaderFactory());
    factoryMap.put("write-xml-0.6", new XmlWriterFactory());
    factoryMap.put("write-xml-change-0.6", new XmlChangeWriterFactory());
    factoryMap.put("read-api-0.6", new XmlDownloaderFactory());
   
    return factoryMap;
  }
View Full Code Here

    factoryMap.put("rxc", new XmlChangeReaderFactory());
    factoryMap.put("write-xml", new XmlWriterFactory());
    factoryMap.put("wx", new XmlWriterFactory());
    factoryMap.put("write-xml-change", new XmlChangeWriterFactory());
    factoryMap.put("wxc", new XmlChangeWriterFactory());
    factoryMap.put("read-api", new XmlDownloaderFactory());
    factoryMap.put("ra", new XmlDownloaderFactory());
   
    factoryMap.put("read-xml-0.6", new XmlReaderFactory());
    factoryMap.put("fast-read-xml-0.6", new FastXmlReaderFactory());
    factoryMap.put("read-xml-change-0.6", new XmlChangeReaderFactory());
    factoryMap.put("write-xml-0.6", new XmlWriterFactory());
    factoryMap.put("write-xml-change-0.6", new XmlChangeWriterFactory());
    factoryMap.put("read-api-0.6", new XmlDownloaderFactory());
   
    return factoryMap;
  }
View Full Code Here

   
    if (pbf) {
      reader = new crosby.binary.osmosis.OsmosisReader(
          new FileInputStream(file));
    } else {
      reader = new XmlReader(file, false, compression);
    }
   
    return reader;
   
  }
View Full Code Here

    }
  };
 
  public OSMFileDataSource(File file) throws IOException {
   
    XmlReader reader = new XmlReader(file, false, CompressionMethod.None);
    reader.setSink(sinkImplementation);
   
    Thread readerThread = new Thread(reader);
    readerThread.start();
   
    while (readerThread.isAlive()) {
View Full Code Here

    // change contains deletes which have a current timestamp
    // that cannot be reliably predicted.
    // Therefore, check all relevant attributes manually.
   
    ChangeDeriver deriver = new ChangeDeriver(1);
    RunnableSource left = new XmlReader(dataUtils.createDataFile(
        "v0_6/derive_change/simple.osm"), true, CompressionMethod.None);
    RunnableSource right = new EmptyReader();
   
    SinkChangeInspector result = RunTaskUtilities.run(deriver, left, right);
    List<ChangeContainer> changes = result.getProcessedChanges();
View Full Code Here

   *
   */
  private void mergeAndLookForException(File sourceFile, String exceptionMessagePrefix) throws Exception {
    final List<Throwable> exceptions = Collections.synchronizedList(new ArrayList<Throwable>());
   
    XmlReader reader = new XmlReader(sourceFile, false, CompressionMethod.None);

    EntityMerger merger = new EntityMerger(
        ConflictResolutionMethod.LatestSource, 1, BoundRemovedAction.Ignore);

    RunTaskUtilities.run(merger, reader, new EmptyReader(), new Thread.UncaughtExceptionHandler() {
View Full Code Here

  public Map<String, TaskManagerFactory> loadTaskFactories() {
    Map<String, TaskManagerFactory> factoryMap;
   
    factoryMap = new HashMap<String, TaskManagerFactory>();
   
    factoryMap.put("read-xml", new XmlReaderFactory());
    factoryMap.put("fast-read-xml", new FastXmlReaderFactory());
    factoryMap.put("rx", new XmlReaderFactory());
        factoryMap.put("read-xml-change"new XmlChangeReaderFactory());
        factoryMap.put("upload-xml-change", new XmlChangeUploaderFactory());
    factoryMap.put("rxc", new XmlChangeReaderFactory());
    factoryMap.put("write-xml", new XmlWriterFactory());
    factoryMap.put("wx", new XmlWriterFactory());
    factoryMap.put("write-xml-change", new XmlChangeWriterFactory());
    factoryMap.put("wxc", new XmlChangeWriterFactory());
    factoryMap.put("read-api", new XmlDownloaderFactory());
    factoryMap.put("ra", new XmlDownloaderFactory());
   
    factoryMap.put("read-xml-0.6", new XmlReaderFactory());
    factoryMap.put("fast-read-xml-0.6", new FastXmlReaderFactory());
    factoryMap.put("read-xml-change-0.6", new XmlChangeReaderFactory());
    factoryMap.put("write-xml-0.6", new XmlWriterFactory());
    factoryMap.put("write-xml-change-0.6", new XmlChangeWriterFactory());
    factoryMap.put("read-api-0.6", new XmlDownloaderFactory());
View Full Code Here

                EntityContainer entity = iterator.next();
                serializer.process(entity);
            }
            serializer.complete();
        } else {
            XmlWriter writer = new XmlWriter(file, CompressionMethod.None);
            while (iterator.hasNext()) {
                EntityContainer entity = iterator.next();
                writer.process(entity);
            }
            writer.complete();
        }

    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.xml.v0_6.impl.FastXmlParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.