drepr.models.align#
Classes
|
|
|
|
|
|
|
|
|
|
|
|
|
- class RangeAlignment(source: 'AttrId', target: 'AttrId', aligned_steps: 'list[AlignedStep]')[source]#
Bases:
object- Parameters:
source (str) –
target (str) –
aligned_steps (list[drepr.models.align.AlignedStep]) –
- aligned_steps: list[drepr.models.align.AlignedStep]#
- swap() RangeAlignment[source]#
- Return type:
- compute_cardinality(desc: DRepr) Cardinality[source]#
Compute the cardinality of an alignment
The cardinality between attribute x and attribute y are defined as follows:
one-to-one: one item of x can only link to one item of y and vice versa.
one-to-many: one item of x can link to multiple items of y, but one item of y can only link to one item of x.
many-to-one: the reversed case of one-to-many
many-to-many: multiple items of x can link to multiple items of y and vice versa.
The cardinality depends on the number of unfixed dimensions of each attribute, if an attribute has no unfixed steps, it will be one-to-, otherwise many-to-
- Parameters:
desc (DRepr) –
- Return type:
- class ValueAlignment(source: 'AttrId', target: 'AttrId')[source]#
Bases:
object- swap() ValueAlignment[source]#
- Return type:
- compute_cardinality(desc: DRepr) Cardinality[source]#
Compute the cardinality of an alignment
The cardinality between attribute x and attribute y are defined as follows:
one-to-one: one item of x can only link to one item of y and vice versa.
one-to-many: one item of x can link to multiple items of y, but one item of y can only link to one item of x.
many-to-one: the reversed case of one-to-many
many-to-many: multiple items of x can link to multiple items of y and vice versa.
The cardinality of the join will be one-to-* or *-to-one if values of source & target are unique.
- Parameters:
desc (DRepr) –
- Return type:
- class IdenticalAlign(source: 'AttrId', target: 'AttrId')[source]#
Bases:
object- compute_cardinality(desc: DRepr) Cardinality[source]#
- Parameters:
desc (DRepr) –
- Return type:
- swap() IdenticalAlign[source]#
- Return type:
- class AutoAlignment(attrs: 'Optional[list[str]]' = None)[source]#
Bases:
object- compute_cardinality(desc: DRepr) Cardinality[source]#
- Parameters:
desc (DRepr) –
- Return type:
- class AlignmentType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum- Range = 'range'#
- Value = 'value'#
- Ident = 'identical'#
- Auto = 'auto'#