use of eu.esdihumboldt.hale.common.schema.persist.hsd.HaleSchemaReader in project hale by halestudio.
the class AppSchemaIsolatedWorkspacesMappingTest method init.
@BeforeClass
public static void init() throws Exception {
TestUtil.startConversionService();
sourceSchemaSpace = new DefaultSchemaSpace();
targetSchemaSpace = new DefaultSchemaSpace();
Schema source = loadSchema(new HaleSchemaReader(), SOURCE_SCHEMA_PATH);
assertNotNull(source);
sourceSchemaSpace.addSchema(source);
Schema target = loadSchema(new XmlSchemaReader(), TARGET_SCHEMA_STATIONS_PATH);
assertNotNull(target);
targetSchemaSpace.addSchema(target);
// make sure MeasurementsType is included in the mapping relevant types
List<TypeDefinition> mappingRelevantTypes = new ArrayList<>();
mappingRelevantTypes.add(targetSchemaSpace.getType(MEASUREMENTS_QNAME));
targetSchemaSpace.toggleMappingRelevant(mappingRelevantTypes);
assertEquals(3, targetSchemaSpace.getMappingRelevantTypes().size());
alignment = loadAlignment(new JaxbAlignmentReader(), ALIGNMENT_PATH);
assertNotNull(alignment);
}
Aggregations