public class DefaultAlignment extends Object implements Alignment, MutableAlignment
Constructor and Description |
---|
DefaultAlignment()
Default constructor.
|
DefaultAlignment(Alignment alignment)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addBaseAlignment(String prefix,
URI alignment,
Iterable<BaseAlignmentCell> cells)
Adds a base alignment.
|
void |
addCell(MutableCell cell)
Add a cell to the alignment.
|
Collection<? extends Cell> |
getActiveTypeCells()
Get type cells that are configured as being active.
|
Iterable<BaseAlignmentCell> |
getBaseAlignmentCells(URI baseAlignment)
Get all cells belonging to the given base alignment.
|
Map<String,URI> |
getBaseAlignments()
Get the base alignments.
|
Cell |
getCell(String cellId)
Returns the cell referenced by the given id string or
null
if it cannot be found. |
Collection<? extends Cell> |
getCells()
Get the collection of cells contained in the alignment.
|
Collection<? extends Cell> |
getCells(EntityDefinition entityDefinition)
Get the cells associated directly with the given entity definition.
|
Collection<? extends Cell> |
getCells(EntityDefinition entityDefinition,
boolean includeInherited)
Get the cells associated with the given entity definition.
|
Collection<? extends Cell> |
getCells(TypeDefinition type,
SchemaSpaceID schemaSpace)
Get the cells associated with the given type.
|
Collection<? extends Cell> |
getPropertyCells(Cell typeCell)
Get the cells representing a mapping between properties that are
associated with the given cell, not including disabled cells.
The type cell needs to have at least a source or a target set for this method to return anything. |
Collection<? extends Cell> |
getPropertyCells(Cell typeCell,
boolean includeDisabled,
boolean ignoreEmptySource)
Get the cells representing a mapping between properties that are
associated with the given cell.
The type cell needs to have at least a source or a target set for this method to return anything. |
Collection<Cell> |
getTypeCells()
Get the cells representing a mapping between types
|
Collection<? extends Cell> |
getTypeCells(Cell queryCell)
Get all type cells that match the given query cell's sources and targets.
If the query cell has neither sources nor a target, all type cells are returned. |
boolean |
removeCell(Cell cell)
Remove a cell
|
public DefaultAlignment()
public DefaultAlignment(Alignment alignment)
alignment
- the alignment to copypublic void addCell(MutableCell cell)
MutableAlignment
addCell
in interface MutableAlignment
cell
- the cell to add. It should be already configured, especially
with the cell target. A cell id may be generated for new cellsMutableAlignment.addCell(MutableCell)
public Collection<? extends Cell> getCells(EntityDefinition entityDefinition)
Alignment
getCells
in interface Alignment
entityDefinition
- the entity definitionAlignment.getCells(EntityDefinition)
public Collection<? extends Cell> getCells(EntityDefinition entityDefinition, boolean includeInherited)
Alignment
getCells
in interface Alignment
entityDefinition
- the entity definitionincludeInherited
- if set, it will also include cells that are
mapped to the given entity definition on super typesAlignment.getCells(EntityDefinition, boolean)
public Collection<? extends Cell> getCells(TypeDefinition type, SchemaSpaceID schemaSpace)
Alignment
getCells
in interface Alignment
type
- the type definitionschemaSpace
- the type schema spaceAlignment.getCells(TypeDefinition, SchemaSpaceID)
public Collection<? extends Cell> getPropertyCells(Cell typeCell)
Alignment
getPropertyCells
in interface Alignment
typeCell
- the cell in question, has to be a type cellAlignment.getPropertyCells(Cell)
public Collection<? extends Cell> getPropertyCells(Cell typeCell, boolean includeDisabled, boolean ignoreEmptySource)
Alignment
getPropertyCells
in interface Alignment
typeCell
- the cell in question, has to be a type cellincludeDisabled
- also get cells that are disabledignoreEmptySource
- if an empty source in the type cell should be
ignored and any source accepted insteadAlignment.getPropertyCells(Cell, boolean, boolean)
public Collection<? extends Cell> getTypeCells(Cell queryCell)
Alignment
getTypeCells
in interface Alignment
queryCell
- the query cellAlignment.getTypeCells(Cell)
public Collection<? extends Cell> getCells()
Alignment
getCells
in interface Alignment
Alignment.getCells()
public boolean removeCell(Cell cell)
MutableAlignment
removeCell
in interface MutableAlignment
cell
- the cell to removeMutableAlignment.removeCell(Cell)
public Collection<Cell> getTypeCells()
Alignment
getTypeCells
in interface Alignment
Alignment.getTypeCells()
public Collection<? extends Cell> getActiveTypeCells()
Alignment
getActiveTypeCells
in interface Alignment
TransformationMode
public void addBaseAlignment(String prefix, URI alignment, Iterable<BaseAlignmentCell> cells)
MutableAlignment
addBaseAlignment
in interface MutableAlignment
prefix
- the alignment prefixalignment
- the new base alignmentcells
- the cells to be added from the alignmentMutableAlignment.addBaseAlignment(java.lang.String,java.net.URI,java.lang.Iterable)
public Map<String,URI> getBaseAlignments()
Alignment
getBaseAlignments
in interface Alignment
Alignment.getBaseAlignments()
public Cell getCell(String cellId)
Alignment
null
if it cannot be found.getCell
in interface Alignment
cellId
- the cell idnull
if it cannot be foundAlignment.getCell(java.lang.String)
public Iterable<BaseAlignmentCell> getBaseAlignmentCells(URI baseAlignment)
Alignment
getBaseAlignmentCells
in interface Alignment
baseAlignment
- the base alignment URIAlignment.getBaseAlignmentCells(java.net.URI)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a