use of eu.esdihumboldt.hale.io.oml.OmlReader in project hale by halestudio.
the class OMLReaderTest method loadAlignment.
private static Alignment loadAlignment(URI sourceSchemaLocation, URI targetSchemaLocation, final URI alignmentLocation) throws IOProviderConfigurationException, IOException {
// load source schema
Schema source = readXMLSchema(new DefaultInputSupplier(sourceSchemaLocation));
// load target schema
Schema target = readXMLSchema(new DefaultInputSupplier(targetSchemaLocation));
OmlReader reader = new OmlReader();
reader.setSourceSchema(source);
reader.setTargetSchema(target);
reader.setSource(new DefaultInputSupplier(alignmentLocation));
reader.validate();
IOReport report = reader.execute(null);
assertTrue(report.isSuccess());
return reader.getAlignment();
}
Aggregations