use of eu.esdihumboldt.hale.io.appschema.model.WorkspaceConfiguration in project hale by halestudio.
the class AbstractAppSchemaConfigurator method generateMapping.
/**
* Uses a fresh {@link AppSchemaMappingGenerator} instance to generates the
* mapping configuration based on the current provider's configuration
* parameters.
*
* @param reporter the status reporter
* @throws IOProviderConfigurationException if something is wrong with the
* provider configuration
* @throws IOException if an error occurs loading the mapping template file
*/
public void generateMapping(IOReporter reporter) throws IOProviderConfigurationException, IOException {
if (getAlignment() == null) {
throw new IOProviderConfigurationException("No alignment was provided.");
}
if (getTargetSchema() == null) {
throw new IOProviderConfigurationException("No target schema was provided.");
}
if (getTarget() == null) {
throw new IOProviderConfigurationException("No target was provided.");
}
DataStore dataStoreParam = getDataStoreParameter();
FeatureChaining featureChainingParam = getFeatureChainingParameter();
// resolve property entity definitions here, could't do it on project
// loading
resolvePropertyTypes(featureChainingParam, getTargetSchema(), SchemaSpaceID.TARGET);
WorkspaceConfiguration workspaceConfParam = getWorkspaceConfigurationParameter();
generator = new AppSchemaMappingGenerator(getAlignment(), getTargetSchema(), dataStoreParam, featureChainingParam, workspaceConfParam);
generator.generateMapping(reporter);
}
use of eu.esdihumboldt.hale.io.appschema.model.WorkspaceConfiguration in project hale by halestudio.
the class AppSchemaIsolatedWorkspacesMappingTest method loadWorkspaceConf.
private WorkspaceConfiguration loadWorkspaceConf(String confResource) throws Exception {
Element root = loadXmlResource(confResource);
// read value object from XML
WorkspaceConfiguration workspaceConf = HaleIO.getComplexValue(root, WorkspaceConfiguration.class, null);
assertNotNull(workspaceConf);
return workspaceConf;
}
Aggregations