use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.
the class BaseAlignmentImportAdvisor method prepareProvider.
/**
* @see eu.esdihumboldt.hale.common.core.io.impl.DefaultIOAdvisor#prepareProvider(eu.esdihumboldt.hale.common.core.io.IOProvider)
*/
@Override
public void prepareProvider(BaseAlignmentReader provider) {
super.prepareProvider(provider);
// XXX reader still needs MutableAlignment!
SchemaService ss = getService(SchemaService.class);
provider.setSourceSchema(ss.getSchemas(SchemaSpaceID.SOURCE));
provider.setTargetSchema(ss.getSchemas(SchemaSpaceID.TARGET));
ProjectService ps = getService(ProjectService.class);
provider.setProjectLocation(ps.getLoadLocation());
}
use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.
the class InstanceExportAdvisor method prepareProvider.
/**
* @see IOAdvisor#prepareProvider(IOProvider)
*/
@Override
public void prepareProvider(InstanceWriter provider) {
super.prepareProvider(provider);
// set target schema
SchemaService ss = getService(SchemaService.class);
provider.setTargetSchema(ss.getSchemas(SchemaSpaceID.TARGET));
// set instances to export
InstanceService is = getService(InstanceService.class);
provider.setInstances(is.getInstances(DataSet.TRANSFORMED));
}
use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.
the class InstanceImportAdvisor method prepareProvider.
/**
* @see IOAdvisor#prepareProvider(IOProvider)
*/
@Override
public void prepareProvider(InstanceReader provider) {
super.prepareProvider(provider);
SchemaService ss = getService(SchemaService.class);
provider.setSourceSchema(ss.getSchemas(SchemaSpaceID.SOURCE));
}
use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.
the class SchemaImportAdvisor method handleResults.
/**
* @see IOAdvisor#handleResults(IOProvider)
*/
@Override
public void handleResults(SchemaReader provider) {
// add loaded schema to schema space
Schema schema = provider.getSchema();
SchemaService ss = getService(SchemaService.class);
ss.addSchema(schema, spaceID);
if (ss.getSchemas(spaceID).getMappingRelevantTypes().isEmpty()) {
// if no types are present after loading, open editor for mapping
// relevant types
ss.editMappableTypes(spaceID);
}
super.handleResults(provider);
}
use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.
the class SchemaImportAdvisor method prepareProvider.
/**
* @see IOAdvisor#prepareProvider(IOProvider)
*/
@Override
public void prepareProvider(SchemaReader provider) {
super.prepareProvider(provider);
provider.setSchemaSpace(spaceID);
// set shared types XXX this is not fixed yet
SchemaService ss = getService(SchemaService.class);
provider.setSharedTypes(ss.getSchemas(spaceID));
}
Aggregations