bbc_data_service 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -27,13 +27,13 @@ module BBCDataService
|
|
27
27
|
end
|
28
28
|
fixtures.each do |fixture|
|
29
29
|
current_fixture = BBCDataService::FeedFixture.new(self.instance_eval(self.execute_query(graph, query, mappings)))
|
30
|
-
self.process_relationships(graph, registered_fixture, current_fixture, fixture
|
30
|
+
self.process_relationships(graph, registered_fixture, current_fixture, fixture)
|
31
31
|
results << current_fixture
|
32
32
|
end
|
33
33
|
results
|
34
34
|
end
|
35
35
|
|
36
|
-
def self.process_relationships(graph, fixture_data, current_fixture, rdf_fixture
|
36
|
+
def self.process_relationships(graph, fixture_data, current_fixture, rdf_fixture)
|
37
37
|
relationships = fixture_data[:relationships]
|
38
38
|
if relationships
|
39
39
|
relationships.each do |relationship|
|
@@ -43,12 +43,9 @@ module BBCDataService
|
|
43
43
|
query = RDF::Query.new({
|
44
44
|
:fixture => self.generate_query(values[:mappings], values[:rdf_type])
|
45
45
|
})
|
46
|
-
if
|
46
|
+
if values[:filter]
|
47
47
|
solutions = query.execute(graph)
|
48
|
-
fixtures = self.filter_graph(solutions,
|
49
|
-
elsif registered_fixture[:filter]
|
50
|
-
solutions = query.execute(graph)
|
51
|
-
fixtures = self.filter_graph(solutions, registered_fixture[:filter])
|
48
|
+
fixtures = self.filter_graph(solutions, values[:filter])
|
52
49
|
else
|
53
50
|
fixtures = query.execute(graph)
|
54
51
|
end
|
metadata
CHANGED