Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add bring_remaining to process in get_rest_mapping #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions lib/ontologies_linked_data/mappings/mappings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,18 +383,19 @@ def self.get_rest_mapping(mapping_id)
FILTER(?uuid = <#{mapping_id}>)
FILTER(?s1 != ?s2)
} LIMIT 1
eos
epr = Goo.sparql_query_client(:main)
graphs = [LinkedData::Models::MappingProcess.type_uri]
mapping = nil
epr.query(qmappings,
graphs: graphs).each do |sol|
classes = [ read_only_class(sol[:c1].to_s,sol[:s1].to_s),
read_only_class(sol[:c2].to_s,sol[:s2].to_s) ]
process = LinkedData::Models::MappingProcess.find(sol[:o]).first
mapping = LinkedData::Models::Mapping.new(classes,"REST",
process,
sol[:uuid])
eos
epr = Goo.sparql_query_client(:main)
graphs = [LinkedData::Models::MappingProcess.type_uri]
mapping = nil
epr.query(qmappings,
graphs: graphs).each do |sol|
classes = [read_only_class(sol[:c1].to_s, sol[:s1].to_s),
read_only_class(sol[:c2].to_s, sol[:s2].to_s)]
process = LinkedData::Models::MappingProcess.find(sol[:o]).first
process.bring_remaining unless process.nil?
mapping = LinkedData::Models::Mapping.new(classes, 'REST',
process,
sol[:uuid])
end
return mapping
end
Expand Down