Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update graph tidying logic to support language-tagged literals
  • Loading branch information
cbeer committed Oct 24, 2014
1 parent 33275b9 commit aa20cf1
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -15,6 +15,7 @@
*/
package org.fcrepo.integration.rdf;

import com.hp.hpl.jena.datatypes.xsd.XSDDatatype;
import com.hp.hpl.jena.graph.Graph;
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.graph.NodeFactory;
Expand Down Expand Up @@ -111,8 +112,8 @@ private Graph getTidiedGraph(final GraphStore graphStore) {
}

if (replacement.getObject().isLiteral()
&& replacement.getObject().getLiteral().getDatatypeURI()
.equals("http://www.w3.org/2001/XMLSchema#string")) {
&& replacement.getObject().getLiteral().getDatatype() != null
&& replacement.getObject().getLiteral().getDatatype().equals(XSDDatatype.XSDstring)) {
replacement = new Triple(replacement.getSubject(),
replacement.getPredicate(),
NodeFactory.createLiteral(replacement.getObject().getLiteral().getLexicalForm()));
Expand Down

0 comments on commit aa20cf1

Please sign in to comment.