Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.service.entity
Interface EntityDefinitionService

All Known Implementing Classes:
AbstractEntityDefinitionService, EntityDefinitionServiceDecorator, EntityDefinitionServiceImpl, EntityDefinitionServiceUndoSupport

public interface EntityDefinitionService

Service that manages entity definitions and the associated instance contexts

Since:
2.5
Author:
Simon Templer

Method Summary
 EntityDefinition addConditionContext(EntityDefinition sibling, Filter filter)
          Add a new condition context for the given entity definition and create a new sibling associated to the new context.
 EntityDefinition addIndexContext(EntityDefinition sibling, Integer index)
          Add a new index context for the given entity definition and create a new sibling associated to the new context.
 void addListener(EntityDefinitionServiceListener listener)
          Adds a listener to the service
 EntityDefinition addNamedContext(EntityDefinition sibling)
          Add a new named instance context for the given entity definition and create a new sibling associated to the new context.
 Collection<? extends EntityDefinition> getChildren(EntityDefinition entity)
          Get the children of the given entity definition, i.e.
 EntityDefinition getParent(EntityDefinition entity)
          Get the parent entity definition for the given entity definition.
 Collection<? extends TypeEntityDefinition> getTypeEntities(TypeDefinition type, SchemaSpaceID schemaSpace)
          Get all available entity definitions for a given type.
 void removeContext(EntityDefinition entity)
          Remove the instance context associated with the given entity definition (if possible).
 void removeListener(EntityDefinitionServiceListener listener)
          Removes a listener from the service
 

Method Detail

getChildren

Collection<? extends EntityDefinition> getChildren(EntityDefinition entity)
Get the children of the given entity definition, i.e. its properties and groups for each of the corresponding instance contexts.

Parameters:
entity - the entity definition
Returns:
the collection of child entity definitions

getTypeEntities

Collection<? extends TypeEntityDefinition> getTypeEntities(TypeDefinition type,
                                                           SchemaSpaceID schemaSpace)
Get all available entity definitions for a given type.

Parameters:
type - the type definition
schemaSpace - the type schema space
Returns:
the type entities

getParent

EntityDefinition getParent(EntityDefinition entity)
Get the parent entity definition for the given entity definition.

Parameters:
entity - the entity definition
Returns:
the parent entity definition or null if the given entity definition represents a type

addNamedContext

EntityDefinition addNamedContext(EntityDefinition sibling)
Add a new named instance context for the given entity definition and create a new sibling associated to the new context.

Parameters:
sibling - the entity definition which is a sibling of the entity definition to create
Returns:
the entity definition associated to the new instance context

addIndexContext

EntityDefinition addIndexContext(EntityDefinition sibling,
                                 Integer index)
Add a new index context for the given entity definition and create a new sibling associated to the new context.

Parameters:
sibling - the entity definition which is a sibling of the entity definition to create
index - the property index associated to the context, if null will be determined automatically
Returns:
the entity definition associated to the index context

addConditionContext

EntityDefinition addConditionContext(EntityDefinition sibling,
                                     Filter filter)
Add a new condition context for the given entity definition and create a new sibling associated to the new context.

Parameters:
sibling - the entity definition which is a sibling of the entity definition to create
filter - the condition filter
Returns:
the entity definition associated to the index context

removeContext

void removeContext(EntityDefinition entity)
Remove the instance context associated with the given entity definition (if possible).

Parameters:
entity - the entity definition or null if creating an instance context is not possible FIXME report success/failure?

addListener

void addListener(EntityDefinitionServiceListener listener)
Adds a listener to the service

Parameters:
listener - the listener to add

removeListener

void removeListener(EntityDefinitionServiceListener listener)
Removes a listener from the service

Parameters:
listener - the listener to remove

Humboldt Alignment Editor 2.5.0

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