Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.service.instance.internal.orient
Class OrientInstanceService

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

public class OrientInstanceService
extends AbstractInstanceService

InstanceService implementation based on OrientDB. This must be a singleton as the references to the databases may only exist once.

Author:
Simon Templer

Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.ui.service.instance.InstanceService
ACTION_READ_SOURCEDATA
 
Method Summary
 void addSourceInstances(InstanceCollection sourceInstances)
          Add instances to the DataSet.SOURCE data set
 void clearInstances()
          This will remove all instances from the service.
protected  void clearTransformedInstances()
          Clear the transformed instances
 void dispose()
          Delete the databases.
protected  void doRetransform()
          Retransform all instances.
static OrientInstanceService getExistingInstance()
          Get the existing service instance.
 Instance getInstance(InstanceReference reference)
          Get the instance referenced by the given reference.
static OrientInstanceService getInstance(SchemaService schemaService, ProjectService projectService, AlignmentService alignmentService)
          Get the service instance
 InstanceCollection getInstances(DataSet dataset)
          Get the instances from the given data set
 Set<TypeDefinition> getInstanceTypes(DataSet dataset)
          Get the types for which instances are present in the given data set
 InstanceReference getReference(Instance instance)
          Get a reference to an instance that can be used to retrieve the given instance using InstanceResolver.getInstance(InstanceReference).
protected  boolean performTransformation()
          Perform the transformation
 
Methods inherited from class eu.esdihumboldt.hale.ui.service.instance.internal.AbstractInstanceService
addListener, getAlignmentService, getProjectService, getTransformationService, isTransformationEnabled, notifyDatasetAboutToChange, notifyDatasetChanged, notifyTransformationToggled, removeListener, retransform, setTransformationEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final OrientInstanceService getInstance(SchemaService schemaService,
                                                      ProjectService projectService,
                                                      AlignmentService alignmentService)
Get the service instance

Parameters:
schemaService - the schema service
projectService - the project service
alignmentService - the alignment service
Returns:
the service instance

getExistingInstance

public static OrientInstanceService getExistingInstance()
Get the existing service instance.

Returns:
the existing service instance or null if none was created

getInstances

public InstanceCollection getInstances(DataSet dataset)
Description copied from interface: InstanceService
Get the instances from the given data set

Parameters:
dataset - the data set
Returns:
the instance collection
See Also:
InstanceService.getInstances(DataSet)

getInstanceTypes

public Set<TypeDefinition> getInstanceTypes(DataSet dataset)
Description copied from interface: InstanceService
Get the types for which instances are present in the given data set

Parameters:
dataset - the data set
Returns:
the set of types for which instances are present
See Also:
InstanceService.getInstanceTypes(DataSet)

addSourceInstances

public void addSourceInstances(InstanceCollection sourceInstances)
Description copied from interface: InstanceService
Add instances to the DataSet.SOURCE data set

Parameters:
sourceInstances - the instances to add
See Also:
InstanceService.addSourceInstances(InstanceCollection)

clearInstances

public void clearInstances()
Description copied from interface: InstanceService
This will remove all instances from the service.

See Also:
InstanceService.clearInstances()

dispose

public void dispose()
Delete the databases.


getReference

public InstanceReference getReference(Instance instance)
Description copied from interface: InstanceResolver
Get a reference to an instance that can be used to retrieve the given instance using InstanceResolver.getInstance(InstanceReference).

Parameters:
instance - the instance, must have originated from this resolver
Returns:
the reference
See Also:
InstanceResolver.getReference(Instance)

getInstance

public Instance getInstance(InstanceReference reference)
Description copied from interface: InstanceResolver
Get the instance referenced by the given reference.

Parameters:
reference - the instance reference
Returns:
the referenced instance or null if it does not exist or the reference is invalid
See Also:
InstanceResolver.getInstance(InstanceReference)

doRetransform

protected void doRetransform()
Description copied from class: AbstractInstanceService
Retransform all instances.

Specified by:
doRetransform in class AbstractInstanceService
See Also:
AbstractInstanceService.doRetransform()

performTransformation

protected boolean performTransformation()
Perform the transformation

Returns:
if the transformation was successful

clearTransformedInstances

protected void clearTransformedInstances()
Description copied from class: AbstractInstanceService
Clear the transformed instances

Specified by:
clearTransformedInstances in class AbstractInstanceService
See Also:
AbstractInstanceService.clearTransformedInstances()

Humboldt Alignment Editor 2.5.0

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