rdf_context 0.5.9 → 0.5.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +3 -0
- data/VERSION +1 -1
- data/lib/rdf_context/graph.rb +6 -1
- data/lib/rdf_context/store/memory_store.rb +1 -0
- metadata +5 -3
data/History.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.9
|
1
|
+
0.5.9.1
|
data/lib/rdf_context/graph.rb
CHANGED
@@ -271,7 +271,10 @@ module RdfContext
|
|
271
271
|
# Nil matches all triples and thus empties the graph
|
272
272
|
# @param [Triple] triple
|
273
273
|
# @return [void]
|
274
|
-
def remove(triple)
|
274
|
+
def remove(triple)
|
275
|
+
@properties.delete(triple.subject.to_s) if @properties.is_a?(Hash)
|
276
|
+
@store.remove(triple, self)
|
277
|
+
end
|
275
278
|
|
276
279
|
# Triples from graph, optionally matching subject, predicate, or object.
|
277
280
|
# Delegates to Store#triples.
|
@@ -339,6 +342,8 @@ module RdfContext
|
|
339
342
|
end
|
340
343
|
end
|
341
344
|
remove(Triple.new(subject, predicate, nil))
|
345
|
+
|
346
|
+
@properties.delete(subject.to_s) if @properties.is_a?(Hash)
|
342
347
|
|
343
348
|
if objects.empty?
|
344
349
|
add_triple(subject, predicate, RDF_NS.nil)
|
@@ -109,6 +109,7 @@ module RdfContext
|
|
109
109
|
def remove(triple, context = nil)
|
110
110
|
context = nil if context == @identifier || (context.respond_to?(:identifier) && context.identifier == @identifier)
|
111
111
|
|
112
|
+
puts "remove: #{triple.subject}, #{triple.predicate}, #{triple.object}, #{context ? context.identifier : 'none'}" if ::RdfContext::debug?
|
112
113
|
# Iterate over all matching triples and contexts
|
113
114
|
triples(triple, context) do |t, cg|
|
114
115
|
si, pi, oi = triple_to_int(t)
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf_context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 65
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
9
|
- 9
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 0.5.9.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Gregg Kellogg
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-11-04 00:00:00 -07:00
|
19
20
|
default_executable: rdf_context
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -137,6 +138,7 @@ extra_rdoc_files:
|
|
137
138
|
files:
|
138
139
|
- .autotest
|
139
140
|
- .gitignore
|
141
|
+
- .yardoc
|
140
142
|
- .yardopts
|
141
143
|
- History.rdoc
|
142
144
|
- README.rdoc
|