/** * Prepares the target importer's input using the specified source. * @param type class of data model * @param description target importer * @param source test data * @throws IOException if failed to prepare the importer * @throws IllegalArgumentException if some parameters were {@code null} */ public void prepare(Class<?> type, ImporterDescription description, URI source) throws IOException { if (type == null) { throw new IllegalArgumentException("type must not be null"); //$NON-NLS-1$ } if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } if (source == null) { throw new IllegalArgumentException("source must not be null"); //$NON-NLS-1$ } DataModelDefinition<?> definition = findDefinition(type); prepare(definition, description, source); }
private <T> void prepare( DataModelDefinition<T> definition, ImporterDescription desctipion, URI source) throws IOException { assert definition != null; assert desctipion != null; assert source != null; ModelOutput<T> output = importers.createOutput(definition, desctipion, context); prepare(definition, output, source); }
/** * Opens the target importer's input to prepare it. * @param <T> type of data model * @param type class of data model * @param description target importer * @return model object sink to prepare the importer's input * @throws IOException if failed to open the importer * @throws IllegalArgumentException if some parameters were {@code null} */ public <T> ModelOutput<T> prepare(Class<T> type, ImporterDescription description) throws IOException { if (type == null) { throw new IllegalArgumentException("type must not be null"); //$NON-NLS-1$ } if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } if (type != description.getModelType()) { throw new IllegalArgumentException( "invalid model type: type must be = description.getModelType()"); //$NON-NLS-1$ } DataModelDefinition<T> definition = findDefinition(type); return importers.createOutput(definition, description, context); }
private <T> void prepare( DataModelDefinition<T> definition, ExporterDescription desctipion, URI source) throws IOException { assert definition != null; assert desctipion != null; assert source != null; ModelOutput<T> output = exporters.createOutput(definition, desctipion, context); prepare(definition, output, source); }
/** * Opens the target exporter's output to prepare it. * @param <T> type of data model * @param type class of data model * @param description target exporter * @return model object sink to prepare the importer's input * @throws IOException if failed to open the importer * @throws IllegalArgumentException if some parameters were {@code null} */ public <T> ModelOutput<T> prepare(Class<T> type, ExporterDescription description) throws IOException { if (type == null) { throw new IllegalArgumentException("type must not be null"); //$NON-NLS-1$ } if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } if (type != description.getModelType()) { throw new IllegalArgumentException( "invalid model type: type must be = description.getModelType()"); //$NON-NLS-1$ } DataModelDefinition<T> definition = findDefinition(type); return exporters.createOutput(definition, description, context); }
/** * Prepares the target exporter's output using the specified source. * @param type class of data model * @param description target importer * @param source test data * @throws IOException if failed to prepare the importer * @throws IllegalArgumentException if some parameters were {@code null} */ public void prepare(Class<?> type, ExporterDescription description, URI source) throws IOException { if (type == null) { throw new IllegalArgumentException("type must not be null"); //$NON-NLS-1$ } if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } if (source == null) { throw new IllegalArgumentException("source must not be null"); //$NON-NLS-1$ } DataModelDefinition<?> definition = findDefinition(type); prepare(definition, description, source); }