Skip to content

Commit

Permalink
Hardcoded the codes that check property mapping results
Browse files Browse the repository at this point in the history
  • Loading branch information
yy20716 committed Feb 15, 2018
1 parent 97c4448 commit 37f84ce
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -121,16 +121,15 @@ protected Map<String, Set<OWLClass>> createPropagationRules(OWLGraphWrapper grap
OWLObjectProperty part_of = graph.getOWLObjectPropertyByIdentifier("part_of");
if (part_of == null)
LOG.warn("Could not find relation by id 'part_of'.");
if (part_of.toString().contains("BFO") != true)
else if (part_of.toString().contains("http://purl.obolibrary.org/obo/BFO_0000050") != true)
throw new RuntimeException("The property mapped to 'part_of' does not come from BFO. Is the correct ontology (GO) loaded?");

OWLObjectProperty occurs_in = graph.getOWLObjectPropertyByIdentifier("occurs_in");
if (occurs_in == null)
LOG.warn("Could not find relation by id 'occurs_in'.");
if (occurs_in.toString().contains("BFO") != true)
else if (occurs_in.toString().contains("http://purl.obolibrary.org/obo/BFO_0000066") != true)
throw new RuntimeException("The property mapped to 'occurs_in' does not come from BFO. Is the correct ontology (GO) loaded?");


// MF -> BP over part_of
if (part_of != null && mf != null && bp != null) {
// get all classes in the mf and bp branch
Expand Down

0 comments on commit 37f84ce

Please sign in to comment.