public class QueryUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
bindVariables(String queryStr,
com.hp.hpl.jena.query.QuerySolution initialBindings)
The RDFService interface doesn't support initial bindings, so do text
substitutions instead.
|
static com.hp.hpl.jena.query.ResultSet |
getLanguageNeutralQueryResults(String queryStr,
VitroRequest vreq) |
static com.hp.hpl.jena.query.ResultSet |
getQueryResults(String queryStr,
com.hp.hpl.jena.query.QuerySolution initialBindings,
RDFService rdfService) |
static com.hp.hpl.jena.query.ResultSet |
getQueryResults(String queryStr,
VitroRequest vreq) |
static Object |
nodeToObject(com.hp.hpl.jena.rdf.model.RDFNode node) |
static String |
nodeToString(com.hp.hpl.jena.rdf.model.RDFNode node) |
static Map<String,Object> |
querySolutionToObjectValueMap(com.hp.hpl.jena.query.QuerySolution soln) |
static Map<String,String> |
querySolutionToStringValueMap(com.hp.hpl.jena.query.QuerySolution soln) |
static List<Map<String,String>> |
removeDuplicatesMapsFromList(List<Map<String,String>> rawList,
String... keys)
If any pair of maps in the list has the same (non-null) value for any of
these keys, call the maps duplicates and keep only the first of them.
|
static String |
replaceQueryVar(String queryString,
String varName,
String newVarName)
Replace one variable name with another
|
static String |
subUriForQueryVar(String queryString,
String varName,
String uri)
Manually replace a query variable with a uri when prebinding causes the query to fail, probably
due to a Jena bug.
|
static String |
subUrisForQueryVars(String queryString,
Map<String,String> varsToUris)
Manually replace query variables with uris when prebinding causes the query to fail, probably
due to a Jena bug.
|
public static Map<String,Object> querySolutionToObjectValueMap(com.hp.hpl.jena.query.QuerySolution soln)
public static Map<String,String> querySolutionToStringValueMap(com.hp.hpl.jena.query.QuerySolution soln)
public static List<Map<String,String>> removeDuplicatesMapsFromList(List<Map<String,String>> rawList, String... keys)
public static Object nodeToObject(com.hp.hpl.jena.rdf.model.RDFNode node)
public static String nodeToString(com.hp.hpl.jena.rdf.model.RDFNode node)
public static String subUrisForQueryVars(String queryString, Map<String,String> varsToUris)
public static String subUriForQueryVar(String queryString, String varName, String uri)
public static String replaceQueryVar(String queryString, String varName, String newVarName)
public static com.hp.hpl.jena.query.ResultSet getQueryResults(String queryStr, VitroRequest vreq)
public static com.hp.hpl.jena.query.ResultSet getQueryResults(String queryStr, com.hp.hpl.jena.query.QuerySolution initialBindings, RDFService rdfService)
public static com.hp.hpl.jena.query.ResultSet getLanguageNeutralQueryResults(String queryStr, VitroRequest vreq)
Copyright © 2016. All rights reserved.