public class EntityDefinitionServiceImpl extends AbstractEntityDefinitionService
Constructor and Description |
---|
EntityDefinitionServiceImpl(AlignmentService alignmentService,
ProjectService projectService)
Create the entity definition service
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
addMissingContexts(Iterable<? extends Cell> cells)
Add missing contexts for the given cells
|
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.
|
protected void |
clean()
Remove all defined contexts
|
EntityDefinition |
editConditionContext(EntityDefinition sibling,
Filter filter)
Creates a new sibling for the given entity definition with a new
condition context using the given filter.
All cells using the given entity definition are changed to use the new one. |
Collection<? extends EntityDefinition> |
getChildren(EntityDefinition entity)
Get the children of the given entity definition, i.e.
|
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).
|
addListener, createEntity, getParent, notifyContextAdded, notifyContextRemoved, notifyContextsAdded, removeListener
public EntityDefinitionServiceImpl(AlignmentService alignmentService, ProjectService projectService)
alignmentService
- the alignment serviceprojectService
- the project serviceprotected void clean()
public EntityDefinition addNamedContext(EntityDefinition sibling)
EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createEntityDefinitionService.addNamedContext(EntityDefinition)
public EntityDefinition addIndexContext(EntityDefinition sibling, Integer index)
EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createindex
- the property index associated to the context, if
null
will be determined automaticallyEntityDefinitionService.addIndexContext(EntityDefinition, Integer)
public EntityDefinition addConditionContext(EntityDefinition sibling, Filter filter)
EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createfilter
- the condition filterEntityDefinitionService.addConditionContext(EntityDefinition,
Filter)
public EntityDefinition editConditionContext(EntityDefinition sibling, Filter filter)
EntityDefinitionService
sibling
- the entity definition which is a sibling of the entity
definition to createfilter
- the condition filternull
if the operation failedEntityDefinitionService.editConditionContext(eu.esdihumboldt.hale.common.align.model.EntityDefinition,
eu.esdihumboldt.hale.common.instance.model.Filter)
public Collection<? extends TypeEntityDefinition> getTypeEntities(TypeDefinition type, SchemaSpaceID schemaSpace)
EntityDefinitionService
type
- the type definitionschemaSpace
- the type schema spaceEntityDefinitionService.getTypeEntities(TypeDefinition,
SchemaSpaceID)
protected void addMissingContexts(Iterable<? extends Cell> cells)
cells
- the cellspublic void removeContext(EntityDefinition entity)
EntityDefinitionService
entity
- the entity definition or null
if creating an
instance context is not possible FIXME report success/failure?EntityDefinitionService.removeContext(EntityDefinition)
public Collection<? extends EntityDefinition> getChildren(EntityDefinition entity)
EntityDefinitionService
entity
- the entity definitionEntityDefinitionService.getChildren(EntityDefinition)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a