@@ -19,16 +19,15 @@ def count
1919 end
2020
2121 ##
22- # @see RDF::Mutable#delete_insert
23- def delete_insert ( deletes , inserts )
24- rest_client . delete_insert ( deletes , inserts )
22+ # @see RDF::Repository#each
23+ def each ( & block )
24+ each_statement ( & block )
2525 end
2626
2727 ##
28- # @see RDF::Repository#each
29- # @todo this won't scale
30- def each ( &block )
31- rest_client . get_statements . each_statement ( &block )
28+ # @see RDF::Mutable#delete_insert
29+ def delete_insert ( deletes , inserts )
30+ rest_client . delete_insert ( deletes , inserts )
3231 end
3332
3433 ##
@@ -118,6 +117,14 @@ def delete_statements(statements)
118117 rest_client . delete ( statements )
119118 end
120119
120+ ##
121+ # @see RDF::Repository#each_statement
122+ #
123+ # @todo this won't scale
124+ def each_statement ( &block )
125+ rest_client . get_statements . each_statement ( &block )
126+ end
127+
121128 ##
122129 # Queries `self` for RDF statements matching the given `pattern`.
123130 #
@@ -135,9 +142,9 @@ def query_pattern(pattern, options = {}, &block)
135142 # Blazegraph objects to bnodes shared across the CONSTRUCT & WHERE scopes
136143 # so we dup the pattern with fresh bnodes
137144 where_pattern = pattern . dup
138- where_pattern . subject = RDF ::Node . new if where_pattern . subject . node?
145+ where_pattern . subject = RDF ::Node . new if where_pattern . subject . node?
139146 where_pattern . predicate = RDF ::Node . new if where_pattern . predicate . node?
140- where_pattern . object = RDF ::Node . new if where_pattern . object . node?
147+ where_pattern . object = RDF ::Node . new if where_pattern . object . node?
141148 where_pattern . initialize!
142149
143150 query = client . construct ( pattern ) . where ( where_pattern )
@@ -156,6 +163,8 @@ def query_pattern(pattern, options = {}, &block)
156163 end
157164 end
158165
166+ ##
167+ # @private
159168 def fast_pattern ( pattern , &block )
160169 pattern = pattern . dup
161170 pattern . graph_name = NULL_GRAPH_URI if pattern . graph_name == false
@@ -170,14 +179,20 @@ def fast_pattern(pattern, &block)
170179 reader . each_statement
171180 end
172181
182+ ##
183+ # @private
173184 def insert_statements ( statements )
174185 rest_client . insert ( statements )
175186 end
176187
188+ ##
189+ # @private
177190 def insert_statement ( statement )
178191 rest_client . insert ( [ statement ] )
179192 end
180193
194+ ##
195+ # @private
181196 def variable_to_nil ( term )
182197 return nil unless term
183198 term . variable? ? nil : term
0 commit comments