Graph class abstract
Graph is an abstract class that defines common interfaces required from a graph. Everything that has to do with managing Nodes and Relations.
- Implementers
Constructors
- Graph()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addNode(
Node node, {bool replaceIfExists = true}) → void - Add a new node to graph
-
addRelation(
Relation relation, {bool replaceIfExists = true}) → void - Add a new relation to the graph
-
allNodes(
) → Iterable< Node> - Get all nodes.
-
allRelations(
) → Iterable< Relation> - Get all relations.
-
clear(
) → void - Clear the graph. This removes all nodes and relations from the graph.
-
getNode(
String nodeId) → Node - Get node (by id)
-
getRelation(
String relationId) → Relation - Get a relation (by id)
-
getRelationsBetween(
String fromNodeId, String toNodeId) → Iterable< Relation> - Get relations from a given node to another (by id)
-
getRelationsFrom(
String nodeId) → Iterable< Relation> - Get relations starting from this node
-
getRelationsTo(
String nodeId) → Iterable< Relation> - Get relations ending at this node
-
nodeDoesNotExist(
String nodeId) → bool - Opposite of nodeDoesNotExist
-
nodeExists(
String nodeId) → bool - Check if a node exists (by id)
-
nodeIsConnected(
String nodeId) → bool - Check if a Node has at least one Relation to or from it.
-
nodeIsDisconnected(
String nodeId) → bool - Opposite of nodeIsConnected
-
nodeIsLeaf(
String nodeId) → bool - Check if a Node has at least one Relation to it, but none from it.
-
nodeIsNotLeaf(
String nodeId) → bool - Opposite of nodeIsLeaf
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
relationExists(
String relationId) → bool - Check if a relation exists (by id)
-
removeNode(
String nodeId) → void - Remove a node from the graph (by id)
-
removeRelation(
String relationId) → void - Remove a relation (by id)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited