io.annot8.common.implementations.pipelines.PipelineBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annot8-common-implementations Show documentation
Show all versions of annot8-common-implementations Show documentation
Common functionality used by Annot8 implementations
/* Annot8 (annot8.io) - Licensed under Apache-2.0. */
package io.annot8.common.implementations.pipelines;
import java.util.Arrays;
import java.util.Collection;
import io.annot8.common.implementations.factories.ItemCreator;
import io.annot8.core.components.Processor;
import io.annot8.core.components.Resource;
import io.annot8.core.components.Source;
import io.annot8.core.exceptions.IncompleteException;
import io.annot8.core.settings.Settings;
public interface PipelineBuilder {
PipelineBuilder withItemQueue(ItemQueue itemQueue);
PipelineBuilder withItemCreator(ItemCreator itemCreator);
default PipelineBuilder addResource(
final String id, final Resource resource, final Settings... settings) {
addResource(id, resource, Arrays.asList(settings));
return this;
}
default PipelineBuilder addSource(final Source source, final Settings... settings) {
addSource(source, Arrays.asList(settings));
return this;
}
default PipelineBuilder addProcessor(final Processor processor, final Settings... settings) {
addProcessor(processor, Arrays.asList(settings));
return this;
}
PipelineBuilder addResource(
final String id, final Resource resource, final Collection settings);
PipelineBuilder addSource(final Source source, final Collection settings);
PipelineBuilder addProcessor(final Processor processor, final Collection settings);
Pipeline build() throws IncompleteException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy