List<ImportTask> initForDatabase(ImportContext context, Database db) throws IOException { //JD: we use check for direct vs non-direct in order to determine if there should be // one task with many items, or one task per table... can;t think of the use case for //many tasks //tasks.add(createTask(db, context, targetStore)); return createTasks(db, context); }
List<ImportTask> initForDatabase(ImportContext context, Database db) throws IOException { // JD: we use check for direct vs non-direct in order to determine if there should be // one task with many items, or one task per table... can;t think of the use case for // many tasks // tasks.add(createTask(db, context, targetStore)); return createTasks(db, context); }
List<ImportTask> createTasks(ImportData data, DataFormat format, ImportContext context) throws IOException { return createTasks(data, format, context, true); }
List<ImportTask> initForFile(ImportContext context, FileData file) throws IOException { return createTasks(file, context); }
List<ImportTask> initForFile(ImportContext context, FileData file) throws IOException { return createTasks(file, context); }
/** * Initializes the import for a mosaic. * * <p>Mosaics only support direct import (context.targetStore must be null) and */ List<ImportTask> initForMosaic(ImportContext context, Mosaic mosaic) throws IOException { if (context.getTargetStore() != null) { throw new IllegalArgumentException("ingest not supported for mosaics"); } return createTasks(mosaic, context); // tasks.add(createTask(mosaic, context, context.getTargetStore())); }
/** * Initializes the import for a mosaic. * <p> * Mosaics only support direct import (context.targetStore must be null) and * </p> */ List<ImportTask> initForMosaic(ImportContext context, Mosaic mosaic) throws IOException { if (context.getTargetStore() != null) { throw new IllegalArgumentException("ingest not supported for mosaics"); } return createTasks(mosaic, context); //tasks.add(createTask(mosaic, context, context.getTargetStore())); }
List<ImportTask> createTasks(ImportData data, ImportContext context) throws IOException { return createTasks(data, data.getFormat(), context); }
List<ImportTask> createTasks(ImportData data, ImportContext context) throws IOException { return createTasks(data, data.getFormat(), context); }
tasks.addAll(createTasks(files.get(0), format, context)); } else { tasks.addAll(createTasks(dir.filter(files), format, context)); for (FileData file : files) { tasks.addAll(createTasks(file, file.getFormat(), context, skipNoFormat)); tasks.addAll(createTasks(file, file.getFormat(), context, skipNoFormat));
tasks.addAll(createTasks(files.get(0), format, context)); tasks.addAll(createTasks(dir.filter(files), format, context)); for (FileData file : files) { tasks.addAll(createTasks(file, file.getFormat(), context, skipNoFormat)); tasks.addAll(createTasks(file, file.getFormat(), context, skipNoFormat));
List<ImportTask> createTasks( ImportData data, DataFormat format, ImportContext context, boolean skipNoFormat) throws IOException { List<ImportTask> tasks = new ArrayList<ImportTask>(); boolean direct = false; StoreInfo targetStore = context.getTargetStore(); if (targetStore == null) { // direct import, use the format to create a store direct = true; if (format != null) { targetStore = format.createStore(data, context.getTargetWorkspace(), catalog); } if (targetStore == null) { // format unable to create store, switch to indirect import and use // default store from catalog targetStore = lookupDefaultStore(); direct = targetStore == null; } } // are we setting up an harvest against an existing store, and the input is also // multi-coverage? if (targetStore instanceof CoverageStoreInfo && targetStore.getId() != null