public class CategoriesStoredQuery
extends com.bigdata.rdf.sparql.ast.service.storedquery.SimpleStoredQueryService
SELECT ?out ?depth WHERE {
SERVICE mediawiki:categoryTree {
bd:serviceParam mediawiki:start <https://en.wikipedia.org/wiki/Category:Ducks> .
bd:serviceParam mediawiki:direction "Reverse" .
bd:serviceParam mediawiki:depth 5 .
}
} ORDER BY ASC(?depth)
Directions are:
- Forward: get parent category tree
- Reverse: get subcategory tree
- Undirected: both directions| Modifier and Type | Field and Description |
|---|---|
static org.openrdf.model.URI |
DEPTH_PARAM
max depth parameter.
|
static org.openrdf.model.URI |
DIRECTION_PARAM
direction parameter.
|
static int |
MAX_DEPTH
Default max depth.
|
static org.openrdf.model.URI |
SERVICE_KEY
The URI service key.
|
static org.openrdf.model.URI |
START_PARAM
start parameter.
|
| Constructor and Description |
|---|
CategoriesStoredQuery() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getQuery(com.bigdata.rdf.sparql.ast.service.ServiceCallCreateParams createParams,
com.bigdata.rdf.sparql.ast.eval.ServiceParams serviceParams) |
static void |
register()
Register the service so it is recognized by Blazegraph.
|
doQuerycreate, create, getServiceOptionspublic static final org.openrdf.model.URI SERVICE_KEY
public static final org.openrdf.model.URI START_PARAM
public static final org.openrdf.model.URI DIRECTION_PARAM
public static final org.openrdf.model.URI DEPTH_PARAM
public static final int MAX_DEPTH
public static void register()
protected String getQuery(com.bigdata.rdf.sparql.ast.service.ServiceCallCreateParams createParams, com.bigdata.rdf.sparql.ast.eval.ServiceParams serviceParams)
getQuery in class com.bigdata.rdf.sparql.ast.service.storedquery.SimpleStoredQueryServiceCopyright © 2019. All rights reserved.