|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.align.model.AlignmentUtil
public abstract class AlignmentUtil
Alignment model utility methods.
Constructor Summary | |
---|---|
AlignmentUtil()
|
Method Summary | |
---|---|
static EntityDefinition |
createEntity(TypeDefinition type,
List<ChildContext> path,
SchemaSpaceID schemaSpace,
Filter filter)
Create an entity definition from a type and a child path. |
static EntityDefinition |
deriveEntity(EntityDefinition entity,
int pathLength)
Derive an entity definition from the given one but with a maximum path length. |
static boolean |
entityOrChildContained(EntityDefinition entity,
Iterable<? extends Entity> candidates)
Determines if the given entity definition or one of its children is contained in the given entity candidates. |
static boolean |
entityOrChildMapped(EntityDefinition entity,
Alignment alignment)
States if the given entity definition or one of its children is mapped in the given alignment. |
static EntityDefinition |
getAllDefaultEntity(EntityDefinition entity)
Get the entity definition based on the given entity definition with the default instance context for each path entry. |
static EntityDefinition |
getChild(EntityDefinition entity,
QName childName)
Get the default child of the given entity. |
static Condition |
getContextCondition(EntityDefinition candidate)
Get the context condition of the given entity definition. |
static Integer |
getContextIndex(EntityDefinition candidate)
Get the context index of the given entity definition. |
static Integer |
getContextName(EntityDefinition candidate)
Get the context name of the given entity definition. |
static String |
getContextText(EntityDefinition entityDef)
Get a text representation for the entity definition context. |
static EntityDefinition |
getDefaultEntity(EntityDefinition entity)
Get the entity definition with the default instance context which is a sibling to (or the same as) the given entity definition. |
static EntityDefinition |
getParent(EntityDefinition entity)
Get the parent entity definition for the given entity definition. |
static Collection<? extends Cell> |
getPropertyCellsFromTypeCell(Alignment align,
Cell tCell)
Get a collection of property cells from a type cell |
static TypeEntityDefinition |
getTypeEntity(EntityDefinition entityDef)
Get the type entity definition of the given entity definition. |
static boolean |
hasTypeRelation(Alignment alignment)
Determines if the given alignment has any type relations. |
static boolean |
hasTypeRelation(Alignment alignment,
TypeEntityDefinition sourceType,
TypeEntityDefinition targetType)
Determines if the given alignment contains a relation between the given types. |
static boolean |
isAugmentation(Cell cell)
Determines if the given cell is an augmentation. |
static boolean |
isDefaultEntity(EntityDefinition entity)
Determines if the given entity is a default entity. |
static boolean |
isParent(EntityDefinition parent,
EntityDefinition child)
Determines if a given entity definition is a parent of another entity definition. |
static boolean |
isTypeCell(Cell cell)
Determines if the given cell is a type cell. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlignmentUtil()
Method Detail |
---|
public static boolean isTypeCell(Cell cell)
cell
- the cell
public static boolean hasTypeRelation(Alignment alignment)
alignment
- the alignment
public static boolean hasTypeRelation(Alignment alignment, TypeEntityDefinition sourceType, TypeEntityDefinition targetType)
alignment
- the alignmentsourceType
- the source type, may be null
for any
source typetargetType
- the target type, may be null
for any
target type
public static boolean isAugmentation(Cell cell)
cell
- the cell
public static EntityDefinition getParent(EntityDefinition entity)
entity
- the entity definition
null
if it has no
parentpublic static EntityDefinition getChild(EntityDefinition entity, QName childName)
entity
- the parent entitychildName
- the child name
null
if no child with the given
name existspublic static EntityDefinition createEntity(TypeDefinition type, List<ChildContext> path, SchemaSpaceID schemaSpace, Filter filter)
type
- the path parentpath
- the child pathschemaSpace
- the associated schema spacefilter
- the entity filter on the type, may be null
public static EntityDefinition getDefaultEntity(EntityDefinition entity)
entity
- the entity definition
public static EntityDefinition getAllDefaultEntity(EntityDefinition entity)
entity
- the entity definition
public static EntityDefinition deriveEntity(EntityDefinition entity, int pathLength)
entity
- the entity definitionpathLength
- the maximum path length
public static Collection<? extends Cell> getPropertyCellsFromTypeCell(Alignment align, Cell tCell)
align
- the alignment to get the property cells fromtCell
- the type cell
public static boolean isParent(EntityDefinition parent, EntityDefinition child)
parent
- the parentchild
- the potential child
public static boolean entityOrChildMapped(EntityDefinition entity, Alignment alignment)
entity
- the entity definitionalignment
- the alignment
public static boolean entityOrChildContained(EntityDefinition entity, Iterable<? extends Entity> candidates)
entity
- the entity definitioncandidates
- the entity candidates to test
public static TypeEntityDefinition getTypeEntity(EntityDefinition entityDef)
entityDef
- the entity definition
TypeEntityDefinition
,
otherwise a new type entity definition is createdpublic static Integer getContextName(EntityDefinition candidate)
candidate
- the entity definition
null
for the default contextpublic static Integer getContextIndex(EntityDefinition candidate)
candidate
- the entity definition
null
for the default contextpublic static Condition getContextCondition(EntityDefinition candidate)
candidate
- the entity definition
null
for the default contextpublic static String getContextText(EntityDefinition entityDef)
entityDef
- the entity definition
null
if it is the default
context or the context has no text representationpublic static boolean isDefaultEntity(EntityDefinition entity)
entity
- the entity to check
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |