From 4199e0303a840f4798ededd4603da09a789b371a Mon Sep 17 00:00:00 2001 From: Eric Mays Date: Thu, 17 Oct 2024 11:12:32 -0400 Subject: [PATCH] Additional concrete roles --- .../main/java/dev/ikm/elk/snomed/SnomedOntologyReasoner.java | 3 +++ .../src/main/java/dev/ikm/elk/snomed/model/ConcreteRole.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/elk-snomed/src/main/java/dev/ikm/elk/snomed/SnomedOntologyReasoner.java b/elk-snomed/src/main/java/dev/ikm/elk/snomed/SnomedOntologyReasoner.java index 4df9fd4c6..bf5608719 100644 --- a/elk-snomed/src/main/java/dev/ikm/elk/snomed/SnomedOntologyReasoner.java +++ b/elk-snomed/src/main/java/dev/ikm/elk/snomed/SnomedOntologyReasoner.java @@ -251,7 +251,10 @@ private ElkDataHasValue process(ConcreteRole concreteRole) { Factory f = ontology.getObjectFactory(); ElkDatatype datatype = switch (concreteRole.getValueType()) { case Decimal -> f.getXsdDecimal(); + case Double -> f.getXsdDouble(); + case Float -> f.getXsdFloat(); case Integer -> f.getXsdInteger(); + case String -> f.getXsdString(); }; ElkLiteral literal = f.getLiteral(concreteRole.getValue(), datatype); return ontology.getDataHasValue(getIri(concreteRole.getConcreteRoleType()), literal); diff --git a/elk-snomed/src/main/java/dev/ikm/elk/snomed/model/ConcreteRole.java b/elk-snomed/src/main/java/dev/ikm/elk/snomed/model/ConcreteRole.java index 1b977928e..9dd041aa4 100644 --- a/elk-snomed/src/main/java/dev/ikm/elk/snomed/model/ConcreteRole.java +++ b/elk-snomed/src/main/java/dev/ikm/elk/snomed/model/ConcreteRole.java @@ -25,7 +25,7 @@ public class ConcreteRole { public enum ValueType { - Decimal, Integer; + Decimal, Double, Float, Integer, String; } private ConcreteRoleType concreteRoleType;