new HasRelated(relationsTags, relationsDirections [, tag])
Creates a HasRelated
predicate.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
relationsTags |
Array.<(string|olympe.dc.registry.Relation|olympe.dc.transformers.RecursiveRelated)> | string | olympe.dc.registry.Relation | olympe.dc.transformers.RecursiveRelated | The relation(s). |
|
relationsDirections |
Array.<olympe.dc.Direction> | olympe.dc.Direction | Directions for the relations. |
|
tag |
Array.<olympe.dc.InstanceTag> | olympe.dc.InstanceTag |
<optional> |
The tag of the instance connected via the relation(s). If omitted, any instance will match. |
- Implements:
Members
-
<protected> relations :Array.<InternalStructure>
-
Type:
- Array.<InternalStructure>
-
<protected, non-null> tags :Array.<string>
-
Type:
- Array.<string>
Methods
-
getInternalPaths()
-
Returns the path in the graph followed by this predicate to be evaluated.
- Implements:
Returns:
- Type
- Array.<!Array.<!olympe.dc.query.Relation>>
-
getName()
-
Gets the name of this
Predicate
.- Implements:
Returns:
The name.
- Type
- string
-
getRelatedInstanceTags()
-
Gets the specified related instance tag
Returns:
- Type
- Array.<string>
-
getRelationDirections()
-
Gets the array of directions of the relations expected by this predicate
Returns:
- Type
- Array.<string>
-
getRelationTags()
-
Gets the array of tags of the relations expected by this predicate
Returns:
- Type
- Array.<string>
-
serialize(parameters)
-
Serializes the predicate.
Parameters:
Name Type Description parameters
olympe.dc.query.Parameters Serialization parameters.
- Implements:
Throws:
-
If the predicate is not serializable.
- Type
- Error
Returns:
A string containing the serialized form.
- Type
- string
-
test(dcManager, tag)
-
Checks whether an instance matches this predicate.
Parameters:
Name Type Description dcManager
olympe.dc.Manager The DC manager.
tag
string The tag of the instance to test.
- Implements:
Returns:
The result of the test as a boolean (or OBoolean) or a node (or proxy) of those types
- Type
- boolean | olympe.df.Node | olympe.df.OBoolean | olympe.df.Proxy
-
toString()
-
Gets a string representation of this
Predicate
.- Implements:
Returns:
The string representation.
- Type
- string