Search in sources :

Example 16 with InstanceService

use of eu.esdihumboldt.hale.ui.service.instance.InstanceService 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));
}
Also used : SchemaService(eu.esdihumboldt.hale.ui.service.schema.SchemaService) InstanceService(eu.esdihumboldt.hale.ui.service.instance.InstanceService)

Example 17 with InstanceService

use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.

the class InstanceServiceSource method getCurrentState.

/**
 * @see ISourceProvider#getCurrentState()
 */
@Override
public Map<String, Object> getCurrentState() {
    InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
    ProjectService ps = PlatformUI.getWorkbench().getService(ProjectService.class);
    Map<String, Object> result = new HashMap<String, Object>();
    result.put(HAS_TRANSFORMED_INSTANCES, hasTransformedInstances(is));
    result.put(HAS_SOURCE_INSTANCES, hasSourceInstances(is));
    result.put(HAS_SOURCE_RESOURCES, hasSourceResources(ps));
    return result;
}
Also used : HashMap(java.util.HashMap) InstanceService(eu.esdihumboldt.hale.ui.service.instance.InstanceService) ProjectService(eu.esdihumboldt.hale.ui.service.project.ProjectService)

Example 18 with InstanceService

use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.

the class InstanceServiceSource method dispose.

/**
 * @see ISourceProvider#dispose()
 */
@Override
public void dispose() {
    InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
    is.removeListener(instanceListener);
    ProjectService ps = PlatformUI.getWorkbench().getService(ProjectService.class);
    ps.removeListener(projectServiceListener);
}
Also used : InstanceService(eu.esdihumboldt.hale.ui.service.instance.InstanceService) ProjectService(eu.esdihumboldt.hale.ui.service.project.ProjectService)

Example 19 with InstanceService

use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.

the class ToggleTransformationHandler method execute.

/**
 * @see IHandler#execute(ExecutionEvent)
 */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
    is.setTransformationEnabled(!is.isTransformationEnabled());
    return null;
}
Also used : InstanceService(eu.esdihumboldt.hale.ui.service.instance.InstanceService)

Example 20 with InstanceService

use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.

the class TransformationToggleState method dispose.

/**
 * @see org.eclipse.core.commands.State#dispose()
 */
@Override
public void dispose() {
    InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
    is.removeListener(instanceListener);
}
Also used : InstanceService(eu.esdihumboldt.hale.ui.service.instance.InstanceService)

Aggregations

InstanceService (eu.esdihumboldt.hale.ui.service.instance.InstanceService)21 Instance (eu.esdihumboldt.hale.common.instance.model.Instance)6 InstanceReference (eu.esdihumboldt.hale.common.instance.model.InstanceReference)5 GeometrySchemaService (eu.esdihumboldt.hale.ui.geometry.service.GeometrySchemaService)5 InstanceCollection (eu.esdihumboldt.hale.common.instance.model.InstanceCollection)4 DataSet (eu.esdihumboldt.hale.common.instance.model.DataSet)3 StyleService (eu.esdihumboldt.hale.ui.common.service.style.StyleService)3 ProjectService (eu.esdihumboldt.hale.ui.service.project.ProjectService)3 SchemaService (eu.esdihumboldt.hale.ui.service.schema.SchemaService)3 EntityDefinition (eu.esdihumboldt.hale.common.align.model.EntityDefinition)2 TypeDefinition (eu.esdihumboldt.hale.common.schema.model.TypeDefinition)2 InstanceServiceAdapter (eu.esdihumboldt.hale.ui.service.instance.InstanceServiceAdapter)2 ISelectionService (org.eclipse.ui.ISelectionService)2 MultiPoint (com.vividsolutions.jts.geom.MultiPoint)1 Point (com.vividsolutions.jts.geom.Point)1 ITileOverlayService (de.fhg.igd.mapviewer.view.overlay.ITileOverlayService)1 TileOverlayFactory (de.fhg.igd.mapviewer.view.overlay.TileOverlayFactory)1 SelectableWaypoint (de.fhg.igd.mapviewer.waypoints.SelectableWaypoint)1 PropertyParameter (eu.esdihumboldt.hale.common.align.extension.function.PropertyParameter)1 PropertyParameterDefinition (eu.esdihumboldt.hale.common.align.extension.function.PropertyParameterDefinition)1