private <T extends ImporterDescription, V> ModelOutput<V> createOutput0( DataModelDefinition<V> definition, ImporterPreparator<T> preparator, ImporterDescription description, TestContext context) throws IOException { assert definition != null; assert preparator != null; assert description != null; T desc = preparator.getDescriptionClass().cast(description); return preparator.createOutput(definition, desc, context); } }
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); }
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); }
/** * 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); }