Class: Neo4j::Node
- Inherits:
-
Object
- Object
- Neo4j::Node
- Includes:
- Core::Equal, Core::Index, Core::Node, Core::Property, Core::Property::Java, Core::Rels, Core::Traversal, Core::Wrapper
- Defined in:
- lib/neo4j/node.rb
Overview
A node in the graph with properties and relationships to other entities. Along with relationships, nodes are the core building blocks of the Neo4j data representation model. Node has three major groups of operations: operations that deal with relationships, operations that deal with properties and operations that traverse the node space. The property operations give access to the key-value property pairs. Property keys are always strings. Valid property value types are the primitives (String
, Fixnum
, Float
, Boolean
), and arrays of those primitives.
The Neo4j::Node#new method does not return a new Ruby instance (!). Instead it will call the Neo4j Java API which will return a org.neo4j.kernel.impl.core.NodeProxy object. This java object includes the same mixin as this class. The #class method on the java object returns Neo4j::Node in order to make it feel like an ordinary Ruby object.
Instance Attribute Summary
Attributes included from Core::Index::ClassMethods
Class Method Summary collapse
-
.extend_java_class(java_clazz) ⇒ Object
This method is used to extend a Java Neo4j class so that it includes the same mixins as this class.
Methods included from Core::Node::ClassMethods
Methods included from Core::Wrapper::ClassMethods
default_protected_keys, protected_keys, protected_keys=, wrapper, wrapper_proc=
Methods included from Core::Index::ClassMethods
_config, add_index, find, has_index_type?, index, index?, index_for_type, index_name_for_type, index_type, indexer, node_indexer, put_if_absent, rel_indexer, rm_index, rm_index_config, rm_index_type, trigger_on
Methods included from Core::Index
Methods included from Core::Property::Java
#get_property, #graph_database, #property_keys, #remove_property, #set_property
Methods included from Core::Wrapper
Methods included from Core::Node
#_java_node, #class, #del, #exist?
Methods included from Core::Equal
Methods included from Core::Traversal
#both, #eval_paths, #expand, #incoming, #outgoing, #unique
Methods included from Core::ToJava
dir_from_java, dir_to_java, type_to_java, types_to_java
Methods included from Core::Rels
#_node, #_nodes, #_rel, #_rels, #node, #nodes, #rel, #rel?, #rels
Methods included from Core::Property
#[], #[]=, #neo_id, #property?, #props, #protected_keys, #update
Class Method Details
.extend_java_class(java_clazz) ⇒ Object
This method is used to extend a Java Neo4j class so that it includes the same mixins as this class.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/neo4j/node.rb', line 50 def extend_java_class(java_clazz) java_clazz.class_eval do include Neo4j::Core::Property include Neo4j::Core::Rels include Neo4j::Core::Traversal include Neo4j::Core::Equal include Neo4j::Core::Node include Neo4j::Core::Wrapper include Neo4j::Core::Index end end |