Package cz.vutbr.fit.layout.rdf
Class SparqlQueryResult
- java.lang.Object
-
- cz.vutbr.fit.layout.rdf.SparqlQueryResult
-
public class SparqlQueryResult extends Object
A result of a generic SPARQL query that holds the result value(s) depending on the query type.- Author:
- burgetr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SparqlQueryResult.Type
-
Constructor Summary
Constructors Constructor Description SparqlQueryResult()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SparqlQueryResult
createBoolean(boolean booleanResult)
Creates a boolean query result from a boolean value.static SparqlQueryResult
createGraph(List<org.eclipse.rdf4j.model.Statement> graphResult)
Creates a graph query result from a list of statements.static SparqlQueryResult
createTuple(List<org.eclipse.rdf4j.query.BindingSet> tupleResult)
Creates a tuple query result from a list of bindings.boolean
getBooleanResult()
Gets the boolean query result data - a boolean valueList<org.eclipse.rdf4j.model.Statement>
getGraphResult()
Gets the graph query result data - a list of statementsList<org.eclipse.rdf4j.query.BindingSet>
getTupleResult()
Gets the tuple query result data - a list of variable bindings.SparqlQueryResult.Type
getType()
The result type: TUPLE, GRAPH or BOOLEAN
-
-
-
Method Detail
-
createTuple
public static SparqlQueryResult createTuple(List<org.eclipse.rdf4j.query.BindingSet> tupleResult)
Creates a tuple query result from a list of bindings.- Parameters:
tupleResult
- the bindings- Returns:
- the new query result
-
createGraph
public static SparqlQueryResult createGraph(List<org.eclipse.rdf4j.model.Statement> graphResult)
Creates a graph query result from a list of statements.- Parameters:
graphResult
- the statements- Returns:
- the new query result
-
createBoolean
public static SparqlQueryResult createBoolean(boolean booleanResult)
Creates a boolean query result from a boolean value.- Parameters:
booleanResult
- the result value- Returns:
- the new query result
-
getType
public SparqlQueryResult.Type getType()
The result type: TUPLE, GRAPH or BOOLEAN- Returns:
- result type
-
getTupleResult
public List<org.eclipse.rdf4j.query.BindingSet> getTupleResult()
Gets the tuple query result data - a list of variable bindings.- Returns:
- the list of bindings
-
getGraphResult
public List<org.eclipse.rdf4j.model.Statement> getGraphResult()
Gets the graph query result data - a list of statements- Returns:
- the list of statements
-
getBooleanResult
public boolean getBooleanResult()
Gets the boolean query result data - a boolean value- Returns:
- the boolean value of the result
-
-