Skip to content

Commit

Permalink
JENA-1367: Use Util.isSimpleString.
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Jun 27, 2017
1 parent 0573874 commit c2a8abd
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.NodeFactory ;
import org.apache.jena.query.QueryBuildException;
import org.apache.jena.rdf.model.impl.Util ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.engine.QueryIterator ;
Expand All @@ -36,7 +37,6 @@
import org.apache.jena.sparql.pfunction.PFuncSimpleAndList ;
import org.apache.jena.sparql.pfunction.PropFuncArg ;
import org.apache.jena.sparql.util.IterLib;
import org.apache.jena.vocabulary.XSD;

/**
* Property function that requires the object to
Expand Down Expand Up @@ -84,13 +84,9 @@ public QueryIterator execEvaluated(final Binding binding, final Node subject, fi
NodeFactory.createLiteral(item)));
return new QueryIterPlainWrapper(it, execCxt);

} else if (subject.isLiteral()
&& XSD.xstring.getURI().equals(subject.getLiteralDatatypeURI())
&& "".equals(subject.getLiteralLanguage())) {

} else if ( Util.isSimpleString(subject) ) {
// Case: Subject is a plain literal.
// Return input unchanged if it is one of the tokens, or nothing otherwise

if (tokens.contains(subject.getLiteralLexicalForm())) {
return IterLib.result(binding, execCxt);
} else {
Expand Down

0 comments on commit c2a8abd

Please sign in to comment.