Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.align.model.impl
Class DefaultAlignment

java.lang.Object
  extended by eu.esdihumboldt.hale.common.align.model.impl.DefaultAlignment
All Implemented Interfaces:
Alignment, MutableAlignment

public class DefaultAlignment
extends Object
implements Alignment, MutableAlignment

Default alignment implementation.

Author:
Simon Templer

Constructor Summary
DefaultAlignment()
          Default constructor.
DefaultAlignment(Alignment alignment)
          Copy constructor.
 
Method Summary
 void addCell(Cell cell)
          Add a cell to the alignment
 Collection<? extends Cell> getCells()
          Get the collection of cells contained in the alignment.
 Collection<? extends Cell> getCells(EntityDefinition entityDefinition)
          Get the cells associated w/ the given entity definition.
 Collection<? extends Cell> getCells(TypeDefinition type, SchemaSpaceID schemaSpace)
          Get the cells associated with the given type.
 Collection<? extends Cell> getPropertyCells(Iterable<TypeEntityDefinition> sourceTypes, TypeEntityDefinition targetType)
          Get the cells representing a mapping between properties that are associated with the given source and target types.
 Collection<Cell> getTypeCells()
          Get the cells representing a mapping between types
 boolean removeCell(Cell cell)
          Remove a cell
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAlignment

public DefaultAlignment()
Default constructor.


DefaultAlignment

public DefaultAlignment(Alignment alignment)
Copy constructor. Adds all cells of the given alignment.

Parameters:
alignment - the alignment to copy
Method Detail

addCell

public void addCell(Cell cell)
Description copied from interface: MutableAlignment
Add a cell to the alignment

Specified by:
addCell in interface MutableAlignment
Parameters:
cell - the cell to add. It should be already configured, especially with the cell target
See Also:
MutableAlignment.addCell(Cell)

getCells

public Collection<? extends Cell> getCells(EntityDefinition entityDefinition)
Description copied from interface: Alignment
Get the cells associated w/ the given entity definition.

Specified by:
getCells in interface Alignment
Parameters:
entityDefinition - the entity definition
Returns:
the associated cells or an empty collection FIXME what about cells defined on super types?
See Also:
Alignment.getCells(EntityDefinition)

getCells

public Collection<? extends Cell> getCells(TypeDefinition type,
                                           SchemaSpaceID schemaSpace)
Description copied from interface: Alignment
Get the cells associated with the given type. These may be cells associated to the type or its properties.

Specified by:
getCells in interface Alignment
Parameters:
type - the type definition
schemaSpace - the type schema space
Returns:
the cells associated with the given type
See Also:
Alignment.getCells(TypeDefinition, SchemaSpaceID)

getPropertyCells

public Collection<? extends Cell> getPropertyCells(Iterable<TypeEntityDefinition> sourceTypes,
                                                   TypeEntityDefinition targetType)
Description copied from interface: Alignment
Get the cells representing a mapping between properties that are associated with the given source and target types. Augmentations for the given target type will also be returned.

Specified by:
getPropertyCells in interface Alignment
Parameters:
sourceTypes - the source types or null for any source type
targetType - the target types
Returns:
the property cells associated with the relation between the given source and target types.
See Also:
Alignment.getPropertyCells(Iterable, TypeEntityDefinition)

getCells

public Collection<? extends Cell> getCells()
Description copied from interface: Alignment
Get the collection of cells contained in the alignment.

Specified by:
getCells in interface Alignment
Returns:
the alignment cells
See Also:
Alignment.getCells()

removeCell

public boolean removeCell(Cell cell)
Description copied from interface: MutableAlignment
Remove a cell

Specified by:
removeCell in interface MutableAlignment
Parameters:
cell - the cell to remove
Returns:
if the cell was present and removed
See Also:
MutableAlignment.removeCell(Cell)

getTypeCells

public Collection<Cell> getTypeCells()
Description copied from interface: Alignment
Get the cells representing a mapping between types

Specified by:
getTypeCells in interface Alignment
Returns:
the type cells
See Also:
Alignment.getTypeCells()

Humboldt Alignment Editor 2.5.0

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