本文整理汇总了Java中at.punkt.lodms.spi.load.Loader类的典型用法代码示例。如果您正苦于以下问题:Java Loader类的具体用法?Java Loader怎么用?Java Loader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Loader类属于at.punkt.lodms.spi.load包,在下文中一共展示了Loader类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
private void runLoaders(String runId, URI pipelineId, Map<String, Object> customData) {
for (Loader loader : loaders) {
if (loader instanceof Disableable && ((Disableable) loader).isDisabled()) {
continue;
}
LoadContext context = new LoadContext(runId, customData);
context.setPipeline(this);
try {
long start = System.currentTimeMillis();
loader.load(repository, pipelineId, context);
context.setDuration(System.currentTimeMillis() - start);
eventPublisher.publishEvent(new LoadCompletedEvent(loader, context, this));
} catch (LoadException ex) {
eventPublisher.publishEvent(new LoadFailedEvent(ex, loader, context, this));
}
if (cancelAllowed && context.isCancelPipeline()) {
eventPublisher.publishEvent(new PipelineAbortedEvent(context.getCancelMessage(), this, runId, loader));
return;
}
}
}
示例2: init
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public void init() {
TabSheet tabsheet = new TabSheet();
tabsheet.setWidth("100%");
selectedExtractors = new BeanItemContainer<Extractor>(Extractor.class, job.getPipeline().getExtractors());
selectedTransformers = new BeanItemContainer<Transformer>(Transformer.class, job.getPipeline().getTransformers());
selectedLoaders = new BeanItemContainer<Loader>(Loader.class, job.getPipeline().getLoaders());
initGenericDialog(Extractor.class, extractorDialog, provider.getAvailableExtractors(), job.getPipeline().getExtractors(), selectedExtractors);
initGenericDialog(Loader.class, loaderDialog, provider.getAvailableLoaders(), job.getPipeline().getLoaders(), selectedLoaders);
initGenericDialog(Transformer.class, transformerDialog, provider.getAvailableTransformers(), job.getPipeline().getTransformers(), selectedTransformers);
initJobDialog(job);
addComponent(jobDialog);
tabsheet.addTab(extractorDialog, "Extractors", null, 0);
tabsheet.addTab(transformerDialog, "Transformers", null, 1);
tabsheet.addTab(loaderDialog, "Loaders", null, 2);
tabsheet.setSizeFull();
addComponent(tabsheet);
setExpandRatio(tabsheet, 0.75f);
setSizeFull();
}
示例3: testSetAndGetLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
/**
* Test of getLoaders method, of class ETLPipelineImpl.
*/
@Test
public void testSetAndGetLoaders() {
List<Loader> loaders = new ArrayList<Loader>();
loaders.add(new MockLoader());
ETLPipelineImpl instance = new ETLPipelineImpl();
instance.setLoaders(loaders);
assertEquals(loaders, instance.getLoaders());
}
示例4: testRunExecuteLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Test
public void testRunExecuteLoaders() {
ETLPipelineImpl instance = new ETLPipelineImpl(id, new MockApplicationEventPublisher(), repository);
instance.setLoaders(getMockLoaders(2));
instance.run();
for (Loader loader : instance.getLoaders()) {
assertTrue(((MockLoader) loader).executed);
}
}
示例5: testRunLoadCompletedEventFired
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Test
public void testRunLoadCompletedEventFired() {
MockApplicationEventPublisher eventPublisher = new MockApplicationEventPublisher();
ETLPipelineImpl instance = new ETLPipelineImpl(id, eventPublisher, repository);
Loader loader = new MockLoader();
instance.setLoaders(Arrays.asList(loader));
instance.run();
LoadCompletedEvent completedEvent = eventPublisher.getPublishedEventsOfType(LoadCompletedEvent.class).get(0);
Assert.assertEquals(loader, completedEvent.getLoader());
}
示例6: getMockLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
private List<Loader> getMockLoaders(int i) {
List<Loader> loaders = new ArrayList<Loader>(i);
for (int j = 0; j < i; j++) {
loaders.add(new MockLoader());
}
return loaders;
}
示例7: getLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Override
public List<Loader> getLoaders() {
return loaders;
}
示例8: setLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Override
public void setLoaders(List<Loader> loaders) {
this.loaders = loaders;
}
示例9: getLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public List<ComponentBlueprint<Loader>> getLoaders() {
return loaders;
}
示例10: setLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public void setLoaders(List<ComponentBlueprint<Loader>> loaders) {
this.loaders = loaders;
}
示例11: getAvailableLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public List<Loader> getAvailableLoaders() {
return loaders;
}
示例12: getLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
/**
* Returns the list of loaders defined for this pipeline
*
* @return
*/
public List<Loader> getLoaders();
示例13: setLoaders
import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
/**
* Sets the list of loaders defined for this pipeline
*
* @param loaders
*/
public void setLoaders(List<Loader> loaders);