Skip to content

Commit

Permalink
GESAHV-387 new RDF types
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinovg committed Nov 4, 2024
1 parent f078e55 commit baf9190
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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);
}

Expand Down

0 comments on commit baf9190

Please sign in to comment.