/** * Truncates the target importer's input. * @param description target importer * @throws IOException if failed to prepare the importer * @throws IllegalArgumentException if some parameters were {@code null} */ public void truncate(ImporterDescription description) throws IOException { if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } getDriver(description).truncate(description, context); }
/** * Truncates the target exporter's output. * @param description target importer * @throws IOException if failed to prepare the importer * @throws IllegalArgumentException if some parameters were {@code null} */ public void truncate(ExporterDescription description) throws IOException { if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } getDriver(description).truncate(description, context); }
private <T> void prepare( DataModelDefinition<T> definition, ImporterDescription description, DataModelSourceFactory source) throws IOException { assert definition != null; assert description != null; assert source != null; ModelOutput< T> output = getDriver(description).createOutput(definition, description, context); prepare(definition, output, source); }
private <T> void prepare( DataModelDefinition<T> definition, ExporterDescription desctipion, DataModelSourceFactory source) throws IOException { assert definition != null; assert desctipion != null; assert source != null; ModelOutput<T> output = getDriver(desctipion).createOutput(definition, desctipion, context); prepare(definition, output, source); }
private <T> List<Difference> inspect( DataModelDefinition<T> definition, ExporterDescription description, VerifyContext verifyContext, VerifierFactory verifier) throws IOException { assert definition != null; assert description != null; assert verifier != null; List<Difference> results; try (DataModelSource target = getDriver(description).createSource(definition, description, context); Verifier engine = verifier.createVerifier(definition, verifyContext)) { results = engine.verify(target); } Collections.sort(results, new DifferenceComparator(definition)); return results; }
try (DataModelSource source = getDriver(description).createSource(definition, description, context); DataModelSink sink = resultDataSink.createSink(definition, context);) { while (true) {