From baf91900a32c64edf16c6906367e04631714c6e9 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Thu, 12 Sep 2024 10:35:23 +0200 Subject: [PATCH] GESAHV-387 new RDF types --- .../vitro/webapp/dynapi/data/types/RDFType.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dynapi/data/types/RDFType.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dynapi/data/types/RDFType.java index c980baa96..e0f3777a3 100644 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dynapi/data/types/RDFType.java +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/dynapi/data/types/RDFType.java @@ -6,9 +6,11 @@ import edu.cornell.mannlib.vitro.webapp.utils.configuration.Property; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.jena.datatypes.BaseDatatype; import org.apache.jena.datatypes.RDFDatatype; import org.apache.jena.datatypes.xsd.XSDDatatype; import org.apache.jena.datatypes.xsd.impl.RDFLangString; +import org.apache.jena.datatypes.xsd.impl.XMLLiteralType; public class RDFType implements Removable { @@ -34,6 +36,14 @@ private void createRDFDataType() { rdfDataType = XSDDatatype.XSDanyURI; return; } + if ("Literal".equals(name)) { + rdfDataType = new BaseDatatype("http://www.w3.org/2000/01/rdf-schema#Literal"); + return; + } + if ("XMLLiteral".equals(name)) { + rdfDataType = XMLLiteralType.theXMLLiteralType; + return; + } rdfDataType = new XSDDatatype(name); }