Skip to content
Merged
Show file tree
Hide file tree
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
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/ontologies_linked_data/parser/owlapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RDFFileNotGeneratedException < Parser::ParserException

class OWLAPICommand
def initialize(input_file, output_repo, opts = {})
@owlapi_wrapper_jar_path = LinkedData.bindir + "/owlapi-wrapper-1.6.0.jar"
@owlapi_wrapper_jar_path = LinkedData.bindir + "/owlapi-wrapper-1.7.0.jar"
@input_file = input_file
@output_repo = output_repo
@master_file = opts[:master_file]
Expand Down
23 changes: 19 additions & 4 deletions test/models/test_ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_obo_part_of
Goo.sparql_query_client.query(qthing).each_solution do |sol|
count += 1
end
assert count == 0
assert_equal 0, count

qthing = <<-eos
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Expand All @@ -204,20 +204,35 @@ def test_obo_part_of
count += 1
assert sol[:x].to_s["TAO_0000732"]
end
assert count == 1
assert_equal 1, count

qcount = <<-eos
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT * WHERE {
<http://purl.obolibrary.org/obo/TAO_0001044>
<http://data.bioontology.org/metadata/obo/part_of> ?x . }
<http://purl.obolibrary.org/obo/OBO_REL#_part_of> ?x . }
eos
count = 0
Goo.sparql_query_client.query(qcount).each_solution do |sol|
count += 1
assert sol[:x].to_s["TAO_0000732"]
end
assert count == 1
assert_equal 1, count

# The owlapi-wrapper used to emit each OBO relationship twice: once under
# http://data.bioontology.org/metadata/obo/<rel> and again under the
# property's own IRI. Only the latter is emitted now, so guard against the
# duplicate annotation coming back.
qlegacy = <<-eos
SELECT DISTINCT * WHERE {
<http://purl.obolibrary.org/obo/TAO_0001044>
<http://data.bioontology.org/metadata/obo/part_of> ?x . }
eos
count = 0
Goo.sparql_query_client.query(qlegacy).each_solution do |sol|
count += 1
end
assert_equal 0, count

sub = LinkedData::Models::OntologySubmission.where(ontology: [acronym: "TAO-TEST"]).first
assert_equal(3, sub.roots.length, "Incorrect number of root classes")
Expand Down
Loading