Package org.openstreetmap.osmosis.core.task.v0_6

Examples of org.openstreetmap.osmosis.core.task.v0_6.Source


   *
   * @throws Exception if something goes wrong
   */
  @Test
  public void testNeitherHasBound() throws Exception {
    RunnableSource source0 = new BoundSource(new Bound(1, 2, 4, 3, "source0"), false);
    RunnableSource source1 = new BoundSource(new Bound(5, 6, 8, 7, "source1"), false);

    EntityMerger merger = new EntityMerger(ConflictResolutionMethod.LatestSource, 1,
        BoundRemovedAction.Ignore);
   
    SinkEntityInspector merged = RunTaskUtilities.run(merger, source0, source1);
View Full Code Here


   *
   * @throws Exception if something goes wrong
   */
  @Test
  public void testSource0HasBound() throws Exception {
    RunnableSource source0 = new BoundSource(new Bound(1, 2, 4, 3, "source0"), true);
    RunnableSource source1 = new BoundSource(new Bound(5, 6, 8, 7, "source1"), false);

    EntityMerger merger = new EntityMerger(ConflictResolutionMethod.LatestSource, 1,
        BoundRemovedAction.Ignore);
   
    SinkEntityInspector merged = RunTaskUtilities.run(merger, source0, source1);
View Full Code Here

   *
   * @throws Exception if something goes wrong
   */
  @Test
  public void testSource1HasBound() throws Exception {
    RunnableSource source0 = new BoundSource(new Bound(1, 2, 4, 3, "source0"), false);
    RunnableSource source1 = new BoundSource(new Bound(5, 6, 8, 7, "source1"), true);

    EntityMerger merger = new EntityMerger(ConflictResolutionMethod.LatestSource, 1,
        BoundRemovedAction.Ignore);
   
    SinkEntityInspector merged = RunTaskUtilities.run(merger, source0, source1);
View Full Code Here

   * @throws Exception if something goes wrong
   */
  @Test
  public void testBothHaveBounds() throws Exception {
    Bound bound0 = new Bound(1, 2, 4, 3, "source1");
    RunnableSource source0 = new BoundSource(bound0, true);

    Bound bound1 = new Bound(5, 6, 8, 7, "source2");
    RunnableSource source1 = new BoundSource(bound1, true);

    EntityMerger merger = new EntityMerger(ConflictResolutionMethod.LatestSource, 1,
        BoundRemovedAction.Ignore);
   
    SinkEntityInspector merged = RunTaskUtilities.run(merger, source0, source1);
View Full Code Here

   *
   * @throws Exception if something goes wrong
   */
  @Test
  public void testBothEmpty() throws Exception {
    RunnableSource source0 = new EmptyReader();
    RunnableSource source1 = new EmptyReader();

    EntityMerger merger = new EntityMerger(ConflictResolutionMethod.LatestSource, 1,
        BoundRemovedAction.Ignore);
   
    SinkEntityInspector merged = RunTaskUtilities.run(merger, source0, source1);
View Full Code Here

   *
   * @throws Exception if something goes wrong
   */
  @Test
  public void testOneSourceEmpty() throws Exception {
    RunnableSource source0 = new EmptyReader();

    Bound bound1 = new Bound(5, 6, 8, 7, "source2");
    RunnableSource source1 = new BoundSource(bound1, true);
   
    EntityMerger merger = new EntityMerger(ConflictResolutionMethod.LatestSource, 1,
        BoundRemovedAction.Ignore);
   
    SinkEntityInspector merged = RunTaskUtilities.run(merger, source0, source1);
View Full Code Here

    // Create Index
    createIndex(indexAdminService, params);
    // Get specialized index to build
    Set<AbstractIndexBuilder> indexBuilders = getSelectedIndexBuilders(endpoint, params);
    // Return the SinkManager
    Sink sink = new ElasticSearchWriterTask(endpoint, indexBuilders, params);
    return new SinkManager(taskConfig.getId(), sink, taskConfig.getPipeArgs());
  }
View Full Code Here

   
    storeContainer = new CompletableContainer();
   
    // Validate all input data to ensure it is sorted.
    sortedPipeValidator = new SortedEntityPipeValidator();
    sortedPipeValidator.setSink(new Sink() {
      @Override
        public void initialize(Map<String, Object> metaData) {
        throw new UnsupportedOperationException();
      }
      @Override
View Full Code Here

  @Override
  public void connect(PipeTasks pipeTasks) {
    // A multi sink receives multiple streams of data, so we must connect
    // them up one by one.
    for (int i = 0; i < task.getSinkCount(); i++) {
      Sink sink;
      Source source;
     
      // Retrieve the next sink.
      sink = task.getSink(i);
     
View Full Code Here

  @Override
  public void connect(PipeTasks pipeTasks) {
    // A multi sink receives multiple streams of data, so we must connect
    // them up one by one.
    for (int i = 0; i < task.getSinkCount(); i++) {
      Sink sink;
      Source source;
     
      // Retrieve the next sink.
      sink = task.getSink(i);
     
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.task.v0_6.Source

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.