Skip to content

Commit

Permalink
Simplified specimen restriction as per #61.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav committed Feb 27, 2019
1 parent 123ba2a commit 9a9de81
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions phyx2ontology/phyx2ontology.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ function convertTUtoRestriction(tunit) {
},
});
});
} else if (hasOwnProperty(tunit, 'includesSpecimens')) {
}

if (has(tunit, 'includesSpecimens')) {
// This is a quick-and-dirty implementation. Discussion about it should be
// carried out in https://github.com/phyloref/clade-ontology/issues/61
tunit.includesSpecimens.forEach((specimen) => {
const wrappedSpecimen = new phyx.SpecimenWrapper(specimen);

results.push({
'@type': 'owl:Restriction',
onProperty: 'http://rs.tdwg.org/ontology/voc/TaxonConcept#circumscribedBy',
someValuesFrom: {
'@type': 'owl:Restriction',
onProperty: 'dwc:organismID', // TODO Technically, this should be a token. Probably.
hasValue: wrappedSpecimen.occurrenceID,
},
onProperty: 'dwc:organismID',
hasValue: wrappedSpecimen.occurrenceID,
});
});
} else {
Expand Down

0 comments on commit 9a9de81

Please sign in to comment.