public class QueryStatistics
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
boundObjLiteralCount |
static long |
BoundObjLiteralCount |
static long |
boundObjURICount |
static long |
boundPredCount |
static long |
boundSbjCount |
static long |
grandTotalTriplePatterns |
Constructor and Description |
---|
QueryStatistics() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDirectQueryRelatedRDFizedStats(java.lang.String query)
Get the benchmark query features ( e.g resultsize, bgps mean join vertices etc)
|
static java.lang.String |
getDirectQueryRelatedStats(java.lang.String query)
Get the benchmark query features ( e.g resultsize, bgps mean join vertices etc)
|
static java.util.HashSet<HyperGraph.Vertex> |
getJoinVertexCount(java.util.HashSet<HyperGraph.Vertex> Vertices)
Get the the list of join vertices
|
static java.lang.String |
getObjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
Get label for the object vertex of a triple pattern
|
static java.lang.String |
getPredicateVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
Get label for the predicate vertex of a triple pattern
|
static java.lang.String |
getQueryStats(java.lang.String query,
java.lang.String endpoint,
java.lang.String graph,
long datasetSize)
return query statistics as string
|
static java.lang.String |
getRDFizedQueryStats(com.hp.hpl.jena.query.Query query,
java.lang.String endpoint,
java.lang.String graph,
long datasetSize,
java.lang.String baseURI)
return query statistics as string for RDFization
|
static java.lang.String |
getSubjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
Get label for the subject vertex of a triple pattern
|
static java.lang.String |
getUsedSPARQLClauses(java.lang.String queryStr)
Get the important set of SPARQL clauses used in the query
|
static HyperGraph.Vertex |
getVertex(java.lang.String label,
java.util.HashSet<HyperGraph.Vertex> V)
Retrieve a vertex having a specific label from a set of Vertrices
|
static void |
main(java.lang.String[] args) |
static java.lang.String |
rdfizeUsedSPARQLClauses(QueryStats queryStats,
com.hp.hpl.jena.query.Query query) |
static boolean |
vertexExist(HyperGraph.Vertex sbjVertex,
java.util.HashSet<HyperGraph.Vertex> V)
Check if a vertex already exists in set of all vertices
|
public static final int boundObjLiteralCount
public static long boundSbjCount
public static long boundPredCount
public static long boundObjURICount
public static long BoundObjLiteralCount
public static long grandTotalTriplePatterns
public static void main(java.lang.String[] args) throws org.openrdf.repository.RepositoryException, org.openrdf.query.MalformedQueryException, org.openrdf.query.QueryEvaluationException, java.io.IOException
org.openrdf.repository.RepositoryException
org.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
java.io.IOException
public static java.lang.String getQueryStats(java.lang.String query, java.lang.String endpoint, java.lang.String graph, long datasetSize) throws org.openrdf.query.MalformedQueryException, org.openrdf.repository.RepositoryException, org.openrdf.query.QueryEvaluationException
query
- SPARQL queryendpoint
- endpoint urlgraph
- Default Graph can be nulldatasetSize
- Dataset sizeorg.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
org.openrdf.repository.RepositoryException
public static java.lang.String getRDFizedQueryStats(com.hp.hpl.jena.query.Query query, java.lang.String endpoint, java.lang.String graph, long datasetSize, java.lang.String baseURI) throws org.openrdf.query.MalformedQueryException, org.openrdf.repository.RepositoryException, org.openrdf.query.QueryEvaluationException
query
- SPARQL queryendpoint
- endpoint urlgraph
- Default Graph can be nulldatasetSize
- Dataset sizebaseURI
- org.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
org.openrdf.repository.RepositoryException
public static java.lang.String rdfizeUsedSPARQLClauses(QueryStats queryStats, com.hp.hpl.jena.query.Query query)
public static java.lang.String getUsedSPARQLClauses(java.lang.String queryStr) throws org.openrdf.query.MalformedQueryException
queryStr
- SPARQL queryorg.openrdf.query.MalformedQueryException
public static java.lang.String getDirectQueryRelatedRDFizedStats(java.lang.String query) throws org.openrdf.query.MalformedQueryException
query
- SPARQL queryorg.openrdf.query.MalformedQueryException
public static java.lang.String getDirectQueryRelatedStats(java.lang.String query) throws org.openrdf.query.MalformedQueryException
query
- SPARQL queryorg.openrdf.query.MalformedQueryException
public static java.util.HashSet<HyperGraph.Vertex> getJoinVertexCount(java.util.HashSet<HyperGraph.Vertex> Vertices)
Vertices
- List of vertices in BGPpublic static java.lang.String getObjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
stmt
- triple patternpublic static java.lang.String getPredicateVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
stmt
- triple patternpublic static java.lang.String getSubjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
stmt
- triple patternpublic static boolean vertexExist(HyperGraph.Vertex sbjVertex, java.util.HashSet<HyperGraph.Vertex> V)
sbjVertex
- V
- Set of all verticespublic static HyperGraph.Vertex getVertex(java.lang.String label, java.util.HashSet<HyperGraph.Vertex> V)
label
- Label of vertex to be retrievedV
- Set of vertices