public class QueryService extends Object
| Constructor and Description |
|---|
QueryService(ObjectConnection connection,
LDPathEvaluatorConfiguration evaluatorConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
QueryService |
addCriteria(Criteria criteria)
Adding a criteria object to the QueryService
|
QueryService |
addCriteria(String ldpath)
Setting a criteria for filtering eu.mico.platform.persistence.impl.AnnotationImpl objects.
|
QueryService |
addCriteria(String ldpath,
Number value)
Setting a criteria for filtering eu.mico.platform.persistence.impl.AnnotationImpl objects.
|
QueryService |
addCriteria(String ldpath,
Number value,
Comparison comparison)
Setting a criteria for filtering eu.mico.platform.persistence.impl.AnnotationImpl objects.
|
QueryService |
addCriteria(String ldpath,
String value)
Setting a criteria for filtering eu.mico.platform.persistence.impl.AnnotationImpl objects.
|
QueryService |
addCriteria(String ldpath,
String value,
Comparison comparison)
Setting a criteria for filtering eu.mico.platform.persistence.impl.AnnotationImpl objects.
|
QueryService |
addPrefix(String label,
String url)
Setting shortcut names for URI prefixes.
|
QueryService |
addPrefixes(HashMap<String,String> prefixes)
Setting multiple names for URI prefixes.
|
List<Annotation> |
execute()
Creates and executes the SPARQL query according to the
criteria specified by the user.
|
<T extends ResourceObject> |
execute(Class<T> type)
Creates and executes the SPARQL query according to the
criteria specified by the user.
|
org.apache.marmotta.ldpath.parser.Configuration |
getConfiguration() |
ArrayList<Criteria> |
getCriteria() |
LDPathEvaluatorConfiguration |
getEvaluatorConfiguration() |
Map<String,String> |
getPrefixes() |
QueryService |
limit(Integer limit)
Setting the limit value.
|
QueryService |
offset(Integer offset)
Setting the offset value.
|
<S extends QueryExtension> |
useExtension(Class<S> type)
Creating and returning an instance of the passed type.
|
public QueryService(ObjectConnection connection, LDPathEvaluatorConfiguration evaluatorConfiguration)
public QueryService addCriteria(String ldpath, String value, Comparison comparison)
ldpath - Syntax similar to XPath. Beginning from the Annotation objectcomparison - The comparison mode, e.g. Comparison.EQ (=)value - The constraint valuepublic QueryService addCriteria(String ldpath, Number value, Comparison comparison)
ldpath - Syntax similar to XPath. Beginning from the Annotation objectcomparison - The comparison mode, e.g. Comparison.EQ (=)value - The constraint valuepublic QueryService addCriteria(String ldpath, String value)
ldpath - Syntax similar to XPath. Beginning from the Annotation objectvalue - The constraint valuepublic QueryService addCriteria(String ldpath, Number value)
ldpath - Syntax similar to XPath. Beginning from the Annotation objectvalue - The constraint valuepublic QueryService addCriteria(String ldpath)
ldpath - Syntax similar to XPath. Beginning from the Annotation objectpublic QueryService addCriteria(Criteria criteria)
criteria - The criteria objectpublic QueryService addPrefix(String label, String url)
label - The label of the namespace, e.g. foafurl - The URLpublic QueryService addPrefixes(HashMap<String,String> prefixes)
prefixes - HashMap with multiple namespaces.public QueryService limit(Integer limit)
limit - The limit value.public QueryService offset(Integer offset)
offset - The offset value.public List<Annotation> execute() throws org.apache.marmotta.ldpath.parser.ParseException, org.openrdf.repository.RepositoryException, org.openrdf.query.MalformedQueryException, org.openrdf.query.QueryEvaluationException
org.apache.marmotta.ldpath.parser.ParseExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionorg.openrdf.query.QueryEvaluationExceptionpublic <T extends ResourceObject> List<T> execute(Class<T> type) throws org.apache.marmotta.ldpath.parser.ParseException, org.openrdf.repository.RepositoryException, org.openrdf.query.MalformedQueryException, org.openrdf.query.QueryEvaluationException
T - type Type of the expected result.org.apache.marmotta.ldpath.parser.ParseExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionorg.openrdf.query.QueryEvaluationExceptionpublic org.apache.marmotta.ldpath.parser.Configuration getConfiguration()
public LDPathEvaluatorConfiguration getEvaluatorConfiguration()
public <S extends QueryExtension> S useExtension(Class<S> type) throws IllegalAccessException, InstantiationException
S - generic, because the type of the extension class can differ.type - the type of the extension.IllegalAccessExceptionInstantiationExceptionCopyright © 2016 Chair of Distributed Information Systems - University of Passau. All rights reserved.