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

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


   *
   * @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

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

  /**
   * {@inheritDoc}
   */
  @Override
  public void connect(PipeTasks pipeTasks) {
    Source source;
    int taskSourceCount;
   
    // Get the input task. A sink only has one input, this corresponds to
    // pipe index 0.
    source = (Source) getInputTask(pipeTasks, 0, Source.class);
   
    // Cast the input feed to the correct type.
    // Connect the tasks.
    source.setSink(task);
   
    // Register all the sources provided by this task as outputs.
    taskSourceCount = task.getSourceCount();
    for (int i = 0; i < taskSourceCount; i++) {
      setOutputTask(pipeTasks, task.getSource(i), i);
View Full Code Here

TOP

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

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.