new Relation(tag, direction, recursive)
Parameters:
Name | Type | Description |
---|---|---|
tag |
olympe.dc.Tag | |
direction |
olympe.dc.Direction | |
recursive |
boolean |
Extends
Members
-
<protected, non-null> direction :olympe.dc.Direction
-
Type:
- Inherited From:
- Overrides:
-
<protected> tag :string
-
Type:
- string
- Inherited From:
- Overrides:
Methods
-
<static> from(relation)
-
Create a relation corresponding to the specified transformer
Parameters:
Name Type Description relation
olympe.dc.registry.Relation | olympe.dc.transformers.FirstRelated Returns:
the relation newly created
-
<static> fromJSON(json)
-
Parameters:
Name Type Description json
string | Object Returns:
-
equals(r)
-
Return true if the specified relation is equal to this one.
Parameters:
Name Type Description r
Object - Inherited From:
- Overrides:
Returns:
- Type
- boolean
-
getAsRecursive(recursive)
-
Return the same relation but with the recursive flag changed to the specified one.
Parameters:
Name Type Description recursive
boolean Returns:
-
getDirection()
-
Gets the relation direction.
- Inherited From:
- Overrides:
Returns:
The direction.
- Type
- olympe.dc.Direction
-
getInverse()
-
Gets the inverse relation.
- Inherited From:
- Overrides:
Returns:
The inverse relation.
-
getTag()
-
Return the relation tag
- Inherited From:
- Overrides:
- Implements:
Returns:
- Type
- string
-
isRecursive()
-
Tells whether this relation has to be considered as recursive.
Returns:
is the relation marked as recursive
- Type
- boolean
-
originType()
-
Return the origin type of this relation.
- Inherited From:
- Overrides:
Returns:
- Type
- function
-
toJSON()
-
Returns:
- Type
- string
-
toString()
-
- Overrides:
Returns:
- Type
- string
-
type()
-
Return the destination type of this relation.
- Inherited From:
- Overrides:
Returns:
- Type
- function