Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.service.instance.internal
Class AbstractInstanceService

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.service.instance.internal.AbstractInstanceService
All Implemented Interfaces:
InstanceResolver, InstanceService
Direct Known Subclasses:
OrientInstanceService

public abstract class AbstractInstanceService
extends Object
implements InstanceService

Notification handling for InstanceServices that support InstanceServiceListeners

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.ui.service.instance.InstanceService
ACTION_READ_SOURCEDATA
 
Constructor Summary
AbstractInstanceService(ProjectService projectService, AlignmentService alignmentService)
          Create an instance service.
 
Method Summary
 void addListener(InstanceServiceListener listener)
          Adds an instance service listener
protected abstract  void clearTransformedInstances()
          Clear the transformed instances
protected abstract  void doRetransform()
          Retransform all instances.
protected  AlignmentService getAlignmentService()
           
protected  ProjectService getProjectService()
           
protected  TransformationService getTransformationService()
           
 boolean isTransformationEnabled()
          Get if live transformation of source data is enabled.
protected  void notifyDatasetAboutToChange(DataSet type)
          Notify listeners that a data set is about to be changed
protected  void notifyDatasetChanged(DataSet type)
          Notify listeners that a data set has changed
 void notifyTransformationToggled(boolean enabled)
          Called when the transformation has been enabled or disabled.
 void removeListener(InstanceServiceListener listener)
          Removes an instance service listener
protected  void retransform()
          Retransform all instances.
 void setTransformationEnabled(boolean enabled)
          Set if live transformation of source data is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.esdihumboldt.hale.ui.service.instance.InstanceService
addSourceInstances, clearInstances, getInstances, getInstanceTypes
 
Methods inherited from interface eu.esdihumboldt.hale.common.instance.model.InstanceResolver
getInstance, getReference
 

Constructor Detail

AbstractInstanceService

public AbstractInstanceService(ProjectService projectService,
                               AlignmentService alignmentService)
Create an instance service.

Parameters:
projectService - the project service. The instances will be cleared when the project is cleaned.
alignmentService - the alignment service
Method Detail

setTransformationEnabled

public void setTransformationEnabled(boolean enabled)
Description copied from interface: InstanceService
Set if live transformation of source data is enabled.

Specified by:
setTransformationEnabled in interface InstanceService
Parameters:
enabled - if transformation is enabled
See Also:
InstanceService.setTransformationEnabled(boolean)

isTransformationEnabled

public boolean isTransformationEnabled()
Description copied from interface: InstanceService
Get if live transformation of source data is enabled.

Specified by:
isTransformationEnabled in interface InstanceService
Returns:
if live transformation is enabled
See Also:
InstanceService.isTransformationEnabled()

retransform

protected final void retransform()
Retransform all instances. Decides if a transformation should be done or not.


doRetransform

protected abstract void doRetransform()
Retransform all instances.


clearTransformedInstances

protected abstract void clearTransformedInstances()
Clear the transformed instances


getTransformationService

protected TransformationService getTransformationService()
Returns:
the transformationService

getAlignmentService

protected AlignmentService getAlignmentService()
Returns:
the alignmentService

getProjectService

protected ProjectService getProjectService()
Returns:
the projectService

notifyTransformationToggled

public void notifyTransformationToggled(boolean enabled)
Called when the transformation has been enabled or disabled.

Parameters:
enabled - if the transformation is enabled now

notifyDatasetChanged

protected void notifyDatasetChanged(DataSet type)
Notify listeners that a data set has changed

Parameters:
type - the data set type, null if both sets have changed

notifyDatasetAboutToChange

protected void notifyDatasetAboutToChange(DataSet type)
Notify listeners that a data set is about to be changed

Parameters:
type - the data set type, null if both sets will change

addListener

public void addListener(InstanceServiceListener listener)
Description copied from interface: InstanceService
Adds an instance service listener

Specified by:
addListener in interface InstanceService
Parameters:
listener - the listener to add

removeListener

public void removeListener(InstanceServiceListener listener)
Description copied from interface: InstanceService
Removes an instance service listener

Specified by:
removeListener in interface InstanceService
Parameters:
listener - the listener to remove

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d