Search in sources :

Example 26 with SchemaService

use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.

the class EditMappableTypesWizard method performFinish.

/**
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@Override
public boolean performFinish() {
    SchemaService schemaService = PlatformUI.getWorkbench().getService(SchemaService.class);
    schemaService.toggleMappable(spaceID, page.getSelectedTypes());
    return true;
}
Also used : SchemaService(eu.esdihumboldt.hale.ui.service.schema.SchemaService)

Example 27 with SchemaService

use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.

the class SchemaServiceSource method getCurrentState.

/**
 * @see ISourceProvider#getCurrentState()
 */
@Override
public Map<String, Object> getCurrentState() {
    SchemaService ss = PlatformUI.getWorkbench().getService(SchemaService.class);
    Map<String, Object> result = new HashMap<String, Object>();
    result.put(HAS_MAPPABLE_SOURCE_SCHEMA, hasMappableType(ss, SchemaSpaceID.SOURCE));
    result.put(HAS_MAPPABLE_TARGET_SCHEMA, hasMappableType(ss, SchemaSpaceID.TARGET));
    result.put(HAS_SOURCE_SCHEMA, hasSchema(ss, SchemaSpaceID.SOURCE));
    result.put(HAS_TARGET_SCHEMA, hasSchema(ss, SchemaSpaceID.TARGET));
    return result;
}
Also used : SchemaService(eu.esdihumboldt.hale.ui.service.schema.SchemaService) HashMap(java.util.HashMap)

Example 28 with SchemaService

use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.

the class SchemaServiceSource method dispose.

/**
 * @see ISourceProvider#dispose()
 */
@Override
public void dispose() {
    SchemaService ss = PlatformUI.getWorkbench().getService(SchemaService.class);
    ss.removeSchemaServiceListener(schemaListener);
}
Also used : SchemaService(eu.esdihumboldt.hale.ui.service.schema.SchemaService)

Example 29 with SchemaService

use of eu.esdihumboldt.hale.ui.service.schema.SchemaService in project hale by halestudio.

the class TransformDataWizard method performFinish.

/**
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@Override
public boolean performFinish() {
    InstanceCollection rawSources = new MultiInstanceCollection(sourceSelectionPage.getSourceInstances());
    // Create a copy of the current alignment to be independent and run
    // everything in a job.
    AlignmentService alignmentService = PlatformUI.getWorkbench().getService(AlignmentService.class);
    Alignment alignment = new DefaultAlignment(alignmentService.getAlignment());
    // schema service for getting source schema
    SchemaService ss = PlatformUI.getWorkbench().getService(SchemaService.class);
    Transformation.transform(rawSources, targetSink, sourceSelectionPage.getExportJob(), sourceSelectionPage.getValidationJob(), alignment, ss.getSchemas(SchemaSpaceID.SOURCE), DefaultReportHandler.getInstance(), HaleUI.getServiceProvider(), null);
    return true;
}
Also used : MultiInstanceCollection(eu.esdihumboldt.hale.common.instance.model.impl.MultiInstanceCollection) DefaultAlignment(eu.esdihumboldt.hale.common.align.model.impl.DefaultAlignment) Alignment(eu.esdihumboldt.hale.common.align.model.Alignment) SchemaService(eu.esdihumboldt.hale.ui.service.schema.SchemaService) AlignmentService(eu.esdihumboldt.hale.ui.service.align.AlignmentService) InstanceCollection(eu.esdihumboldt.hale.common.instance.model.InstanceCollection) MultiInstanceCollection(eu.esdihumboldt.hale.common.instance.model.impl.MultiInstanceCollection) DefaultAlignment(eu.esdihumboldt.hale.common.align.model.impl.DefaultAlignment)

Aggregations

SchemaService (eu.esdihumboldt.hale.ui.service.schema.SchemaService)29 TypeDefinition (eu.esdihumboldt.hale.common.schema.model.TypeDefinition)8 TypeEntityDefinition (eu.esdihumboldt.hale.common.align.model.impl.TypeEntityDefinition)4 SchemaSpace (eu.esdihumboldt.hale.common.schema.model.SchemaSpace)3 ProjectService (eu.esdihumboldt.hale.ui.service.project.ProjectService)3 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)3 EntityDefinition (eu.esdihumboldt.hale.common.align.model.EntityDefinition)2 XmlElement (eu.esdihumboldt.hale.io.xsd.model.XmlElement)2 StyledDefinitionLabelProvider (eu.esdihumboldt.hale.ui.common.definition.viewer.StyledDefinitionLabelProvider)2 AlignmentService (eu.esdihumboldt.hale.ui.service.align.AlignmentService)2 EntityDefinitionService (eu.esdihumboldt.hale.ui.service.entity.EntityDefinitionService)2 EntityTypeIndexContentProvider (eu.esdihumboldt.hale.ui.service.entity.util.EntityTypeIndexContentProvider)2 EntityTypeIndexHierarchy (eu.esdihumboldt.hale.ui.service.entity.util.EntityTypeIndexHierarchy)2 TreePathProviderAdapter (eu.esdihumboldt.hale.ui.util.viewer.tree.TreePathProviderAdapter)2 QName (javax.xml.namespace.QName)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)2 GridData (org.eclipse.swt.layout.GridData)2 Label (org.eclipse.swt.widgets.Label)2 EntityAccessor (eu.esdihumboldt.hale.common.align.groovy.accessor.EntityAccessor)1 Alignment (eu.esdihumboldt.hale.common.align.model.Alignment)1