neo4j 1.2.6-java → 1.3.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/CHANGELOG +16 -0
  2. data/README.rdoc +11 -0
  3. data/bin/neo4j-upgrade +72 -0
  4. data/lib/neo4j.rb +18 -19
  5. data/lib/neo4j/algo/algo.rb +2 -1
  6. data/lib/neo4j/database.rb +12 -0
  7. data/lib/neo4j/event_handler.rb +69 -7
  8. data/lib/neo4j/has_list/class_methods.rb +1 -1
  9. data/lib/neo4j/has_list/mapping.rb +13 -16
  10. data/lib/neo4j/index/class_methods.rb +9 -3
  11. data/lib/neo4j/index/index.rb +2 -1
  12. data/lib/neo4j/index/indexer.rb +3 -2
  13. data/lib/neo4j/index/indexer_registry.rb +1 -1
  14. data/lib/neo4j/jars/core/neo4j-community-1.5.jar +0 -0
  15. data/lib/neo4j/jars/core/neo4j-cypher-1.5.jar +0 -0
  16. data/lib/neo4j/jars/core/{neo4j-graph-algo-1.4.1.jar → neo4j-graph-algo-1.5.jar} +0 -0
  17. data/lib/neo4j/jars/core/neo4j-graph-matching-1.5.jar +0 -0
  18. data/lib/neo4j/jars/core/neo4j-jmx-1.5.jar +0 -0
  19. data/lib/neo4j/jars/core/neo4j-kernel-1.5.jar +0 -0
  20. data/lib/neo4j/jars/core/{neo4j-lucene-index-1.4.1.jar → neo4j-lucene-index-1.5.jar} +0 -0
  21. data/lib/neo4j/jars/{ha/neo4j-shell-1.4.1.jar → core/neo4j-shell-1.5.jar} +0 -0
  22. data/lib/neo4j/jars/core/neo4j-udc-1.5.jar +0 -0
  23. data/lib/neo4j/jars/{ha → core}/org.apache.servicemix.bundles.jline-0.9.94_1.jar +0 -0
  24. data/lib/neo4j/jars/core/scala-library-2.9.0-1.jar +0 -0
  25. data/lib/neo4j/jars/core/server-api-1.5.jar +0 -0
  26. data/lib/neo4j/jars/ha/neo4j-backup-1.5.jar +0 -0
  27. data/lib/neo4j/jars/ha/neo4j-com-1.5.jar +0 -0
  28. data/lib/neo4j/jars/ha/neo4j-enterprise-1.5.jar +0 -0
  29. data/lib/neo4j/jars/ha/neo4j-ha-1.5.jar +0 -0
  30. data/lib/neo4j/jars/ha/neo4j-management-1.5.jar +0 -0
  31. data/lib/neo4j/jars/ha/org.apache.servicemix.bundles.netty-3.2.5.Final_1.jar +0 -0
  32. data/lib/neo4j/jars/ha/slf4j-api-1.6.1.jar +0 -0
  33. data/lib/neo4j/neo4j.rb +16 -0
  34. data/lib/neo4j/node_mixin/node_mixin.rb +2 -2
  35. data/lib/neo4j/rails/attributes.rb +9 -5
  36. data/lib/neo4j/rails/compositions.rb +9 -1
  37. data/lib/neo4j/rails/mapping/property.rb +27 -25
  38. data/lib/neo4j/rails/model.rb +1 -0
  39. data/lib/neo4j/rails/persistence.rb +56 -56
  40. data/lib/neo4j/rails/rel_persistence.rb +1 -1
  41. data/lib/neo4j/rails/relationship.rb +9 -4
  42. data/lib/neo4j/rails/relationships/relationships.rb +6 -2
  43. data/lib/neo4j/rails/relationships/rels_dsl.rb +58 -0
  44. data/lib/neo4j/rails/relationships/storage.rb +10 -1
  45. data/lib/neo4j/rails/validations/uniqueness.rb +1 -0
  46. data/lib/neo4j/rails/versioning/versioning.rb +64 -9
  47. data/lib/neo4j/rule/event_listener.rb +7 -1
  48. data/lib/neo4j/rule/functions/count.rb +6 -0
  49. data/lib/neo4j/rule/rule.rb +20 -5
  50. data/lib/neo4j/rule/rule_node.rb +31 -19
  51. data/lib/neo4j/traversal/traverser.rb +38 -0
  52. data/lib/neo4j/version.rb +1 -1
  53. data/neo4j.gemspec +1 -1
  54. metadata +24 -17
  55. data/lib/neo4j/jars/core/neo4j-backup-1.4.1.jar +0 -0
  56. data/lib/neo4j/jars/core/neo4j-index-1.3-1.3.M01.jar +0 -0
  57. data/lib/neo4j/jars/core/neo4j-kernel-1.4.1.jar +0 -0
  58. data/lib/neo4j/jars/ha/neo4j-com-1.4.1.jar +0 -0
  59. data/lib/neo4j/jars/ha/neo4j-ha-1.4.1.jar +0 -0
  60. data/lib/neo4j/jars/ha/neo4j-jmx-1.4.1.jar +0 -0
  61. data/lib/neo4j/jars/ha/neo4j-management-1.4.1.jar +0 -0
  62. data/lib/neo4j/jars/ha/netty-3.2.1.Final.jar +0 -0
@@ -46,6 +46,44 @@ module Neo4j
46
46
  end
47
47
  end
48
48
 
49
+
50
+ # Sets traversing depth first.
51
+ #
52
+ # The <tt>pre_or_post</tt> parameter parameter can have two values: :pre or :post
53
+ # * :pre - Traversing depth first, visiting each node before visiting its child nodes (default)
54
+ # * :post - Traversing depth first, visiting each node after visiting its child nodes.
55
+ #
56
+ def depth_first(pre_or_post = :pre)
57
+ case pre_or_post
58
+ when :pre then @td = @td.order(org.neo4j.kernel.Traversal.preorderDepthFirst())
59
+ when :post then @td = @td.order(org.neo4j.kernel.Traversal.postorderDepthFirst())
60
+ else raise "Unknown type #{pre_or_post}, should be :pre or :post"
61
+ end
62
+ self
63
+ end
64
+
65
+
66
+ # Sets traversing breadth first (default).
67
+ #
68
+ # This is the default ordering if none is defined.
69
+ # The <tt>pre_or_post</tt> parameter parameter can have two values: :pre or :post
70
+ # * :pre - Traversing breadth first, visiting each node before visiting its child nodes (default)
71
+ # * :post - Traversing breadth first, visiting each node after visiting its child nodes.
72
+ #
73
+ # ==== Note
74
+ # Please note that breadth first traversals have a higher memory overhead than depth first traversals.
75
+ # BranchSelectors carries state and hence needs to be uniquely instantiated for each traversal. Therefore it is supplied to the TraversalDescription through a BranchOrderingPolicy interface, which is a factory of BranchSelector instances.
76
+ #
77
+ def breadth_first(pre_or_post = :pre)
78
+ case pre_or_post
79
+ when :pre then @td = @td.order(org.neo4j.kernel.Traversal.preorderBreadthFirst())
80
+ when :post then @td = @td.order(org.neo4j.kernel.Traversal.postorderBreadthFirst())
81
+ else raise "Unknown type #{pre_or_post}, should be :pre or :post"
82
+ end
83
+ self
84
+ end
85
+
86
+
49
87
  def eval_paths(&eval_path_block)
50
88
  @td = @td.evaluator(Evaluator.new(&eval_path_block))
51
89
  self
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = "1.2.6"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -24,7 +24,7 @@ It comes included with the Apache Lucene document database.
24
24
 
25
25
  s.require_path = 'lib'
26
26
  s.files = Dir.glob("{bin,lib,config}/**/*") + %w(README.rdoc CHANGELOG CONTRIBUTORS Gemfile neo4j.gemspec)
27
- s.executables = ['neo4j-shell', 'neo4j-jars']
27
+ s.executables = ['neo4j-shell', 'neo4j-jars', 'neo4j-upgrade']
28
28
  s.has_rdoc = true
29
29
  s.extra_rdoc_files = %w( README.rdoc )
30
30
  s.rdoc_options = ["--quiet", "--title", "Neo4j.rb", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: neo4j
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.6
5
+ version: 1.3.0
6
6
  platform: java
7
7
  authors:
8
8
  - Andreas Ronge
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-11-03 00:00:00 +01:00
14
- default_executable:
13
+ date: 2011-12-06 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: orm_adapter
@@ -67,6 +66,7 @@ email: andreas.ronge@gmail.com
67
66
  executables:
68
67
  - neo4j-shell
69
68
  - neo4j-jars
69
+ - neo4j-upgrade
70
70
  extensions: []
71
71
 
72
72
  extra_rdoc_files:
@@ -75,6 +75,7 @@ files:
75
75
  - bin/neo4j-jars
76
76
  - bin/neo4j-shell
77
77
  - bin/neo4j-shell~
78
+ - bin/neo4j-upgrade
78
79
  - lib/neo4j.rb
79
80
  - lib/Gemfile~
80
81
  - lib/test.rb~
@@ -149,22 +150,29 @@ files:
149
150
  - lib/neo4j/rails/validations/associated.rb
150
151
  - lib/neo4j/rails/validations/uniqueness.rb
151
152
  - lib/neo4j/rails/validations/non_nil.rb
152
- - lib/neo4j/jars/core/neo4j-backup-1.4.1.jar
153
+ - lib/neo4j/jars/core/neo4j-kernel-1.5.jar
154
+ - lib/neo4j/jars/core/server-api-1.5.jar
153
155
  - lib/neo4j/jars/core/geronimo-jta_1.1_spec-1.1.1.jar
154
- - lib/neo4j/jars/core/neo4j-lucene-index-1.4.1.jar
156
+ - lib/neo4j/jars/core/neo4j-graph-matching-1.5.jar
157
+ - lib/neo4j/jars/core/neo4j-shell-1.5.jar
158
+ - lib/neo4j/jars/core/neo4j-lucene-index-1.5.jar
159
+ - lib/neo4j/jars/core/scala-library-2.9.0-1.jar
155
160
  - lib/neo4j/jars/core/lucene-core-3.1.0.jar
156
- - lib/neo4j/jars/core/neo4j-graph-algo-1.4.1.jar
157
- - lib/neo4j/jars/core/neo4j-index-1.3-1.3.M01.jar
158
- - lib/neo4j/jars/core/neo4j-kernel-1.4.1.jar
159
- - lib/neo4j/jars/ha/neo4j-management-1.4.1.jar
161
+ - lib/neo4j/jars/core/neo4j-graph-algo-1.5.jar
162
+ - lib/neo4j/jars/core/neo4j-udc-1.5.jar
163
+ - lib/neo4j/jars/core/neo4j-community-1.5.jar
164
+ - lib/neo4j/jars/core/neo4j-cypher-1.5.jar
165
+ - lib/neo4j/jars/core/org.apache.servicemix.bundles.jline-0.9.94_1.jar
166
+ - lib/neo4j/jars/core/neo4j-jmx-1.5.jar
167
+ - lib/neo4j/jars/ha/neo4j-ha-1.5.jar
168
+ - lib/neo4j/jars/ha/slf4j-api-1.6.1.jar
169
+ - lib/neo4j/jars/ha/neo4j-management-1.5.jar
170
+ - lib/neo4j/jars/ha/neo4j-com-1.5.jar
171
+ - lib/neo4j/jars/ha/neo4j-enterprise-1.5.jar
160
172
  - lib/neo4j/jars/ha/zookeeper-3.3.2.jar
161
- - lib/neo4j/jars/ha/netty-3.2.1.Final.jar
162
- - lib/neo4j/jars/ha/neo4j-ha-1.4.1.jar
173
+ - lib/neo4j/jars/ha/org.apache.servicemix.bundles.netty-3.2.5.Final_1.jar
163
174
  - lib/neo4j/jars/ha/log4j-1.2.16.jar
164
- - lib/neo4j/jars/ha/neo4j-shell-1.4.1.jar
165
- - lib/neo4j/jars/ha/neo4j-com-1.4.1.jar
166
- - lib/neo4j/jars/ha/neo4j-jmx-1.4.1.jar
167
- - lib/neo4j/jars/ha/org.apache.servicemix.bundles.jline-0.9.94_1.jar
175
+ - lib/neo4j/jars/ha/neo4j-backup-1.5.jar
168
176
  - lib/neo4j/index/indexer.rb
169
177
  - lib/neo4j/index/lucene_query.rb
170
178
  - lib/neo4j/index/indexer_registry.rb
@@ -196,7 +204,6 @@ files:
196
204
  - CONTRIBUTORS
197
205
  - Gemfile
198
206
  - neo4j.gemspec
199
- has_rdoc: true
200
207
  homepage: http://github.com/andreasronge/neo4j/tree
201
208
  licenses: []
202
209
 
@@ -226,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
233
  requirements: []
227
234
 
228
235
  rubyforge_project: neo4j
229
- rubygems_version: 1.5.1
236
+ rubygems_version: 1.8.9
230
237
  signing_key:
231
238
  specification_version: 3
232
239
  summary: A graph database for JRuby