Module: Neo4j::Core::Relationship
- Included in:
- Relationship
- Defined in:
- lib/neo4j-core/relationship/relationship.rb,
lib/neo4j-core/relationship/class_methods.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#_end_node ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getEndNode.
-
#_java_entity ⇒ Object
same as #_java_rel Used so that we have same method for both relationship and nodes.
-
#_java_rel ⇒ Object
Self.
-
#_nodes ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getNodes.
-
#_other_node(node) ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getOtherNode.
-
#_start_node ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getStartNode.
- #class ⇒ Object
-
#del ⇒ nil
Deletes the relationship between the start and end node May raise an exception if delete was unsuccessful.
- #end_node_wrapper ⇒ Object (also: #end_node)
-
#exist? ⇒ true, false
If the relationship exists.
-
#other_node(node) ⇒ Neo4j::Node
A convenience operation that, given a node that is attached to this relationship, returns the other node.
-
#rel_type ⇒ Symbol
Returns the relationship name.
- #start_node_wrapper ⇒ Object (also: #start_node)
Instance Method Details
#_end_node ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getEndNode
7 8 9 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 7 def _end_node get_end_node end |
#_java_entity ⇒ Object
same as #_java_rel Used so that we have same method for both relationship and nodes
79 80 81 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 79 def _java_entity self end |
#_java_rel ⇒ Object
Returns self.
84 85 86 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 84 def _java_rel self end |
#_nodes ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getNodes
19 20 21 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 19 def _nodes get_nodes end |
#_other_node(node) ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getOtherNode
25 26 27 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 25 def _other_node(node) get_other_node(node) end |
#_start_node ⇒ Object
Same as Java::OrgNeo4jGraphdb::Relationship#getStartNode
13 14 15 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 13 def _start_node get_start_node end |
#class ⇒ Object
104 105 106 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 104 def class Neo4j::Relationship end |
#del ⇒ nil
Deletes the relationship between the start and end node May raise an exception if delete was unsuccessful.
33 34 35 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 33 def del delete end |
#end_node_wrapper ⇒ Object Also known as: end_node
44 45 46 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 44 def end_node_wrapper _end_node.wrapper end |
#exist? ⇒ true, false
Returns if the relationship exists.
89 90 91 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 89 def exist? Neo4j::Relationship.exist?(self) end |
#other_node(node) ⇒ Neo4j::Node
A convenience operation that, given a node that is attached to this relationship, returns the other node. For example if node is a start node, the end node will be returned, and vice versa. This is a very convenient operation when you’re manually traversing the node space by invoking one of the #rels method on a node. For example, to get the node “at the other end” of a relationship, use the following:
72 73 74 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 72 def other_node(node) _other_node(node._java_node).wrapper end |
#rel_type ⇒ Symbol
Returns the relationship name
100 101 102 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 100 def rel_type getType().name().to_sym end |
#start_node_wrapper ⇒ Object Also known as: start_node
55 56 57 |
# File 'lib/neo4j-core/relationship/relationship.rb', line 55 def start_node_wrapper _start_node.wrapper end |