From 9a9de8133bd1bdeee1e0838de7664d4a91b3efd5 Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Wed, 27 Feb 2019 18:04:23 -0500 Subject: [PATCH] Simplified specimen restriction as per phyloref/clade-ontology#61. --- phyx2ontology/phyx2ontology.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/phyx2ontology/phyx2ontology.js b/phyx2ontology/phyx2ontology.js index 0e367aa..24a4ebe 100644 --- a/phyx2ontology/phyx2ontology.js +++ b/phyx2ontology/phyx2ontology.js @@ -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 {