Package com.complexible.stardog
Interface StoredQueries
- All Superinterfaces:
Iterable<StoredQuery>
A mutable collection of stored queries.
- Since:
- 4.2
- Version:
- 5.0.2
- Author:
- Evren Sirin, Michael Grove
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(StoredQuery query) Stores the given query.voidclear()Removes all the stored queries.Returns the stored query with the given name.iterator()Returns an iterator of all stored queries.Lists all stored queries and if provided filter the stored queries for the given database name or the regular expression.voidMoves the stored query to a different path.voidRemoves the stored query with the given name.voidRenames the stored query.voidupdate(StoredQuery query) Updates the stored query with the given name.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
clear
Removes all the stored queries.- Throws:
StardogException- if there is an error removing the queries
-
add
Stores the given query. If there is an existing stored query with the given name the request will fail.- Parameters:
query- the query being stored- Throws:
com.complexible.stardog.server.QueryExistsException- if there is an existing stored query with the given nameStardogException- An error occurs while storing the query
-
update
Updates the stored query with the given name. If no query with the given name exists the given query is stored.- Parameters:
query- the query being updated- Throws:
StardogException- An error occurs while updating the query
-
get
Returns the stored query with the given name.- Parameters:
name- the name of the stored query being sought- Returns:
- the stored query with the given name
- Throws:
com.complexible.stardog.server.QueryNotFoundException- if the stored query with the given name does not existStardogException- An error occurs while getting the query
-
iterator
Iterator<StoredQuery> iterator()Returns an iterator of all stored queries. Users can only see their own stored queries and stored queries that have been shared by others.- Specified by:
iteratorin interfaceIterable<StoredQuery>- Returns:
- iterator of all stored queries
-
list
Lists all stored queries and if provided filter the stored queries for the given database name or the regular expression. If the db is not provided, all the stored queries that the user can access will be returned. Users can only see their own stored queries and stored queries that have been shared by others.- Parameters:
db- Name or regular expression to filter stored queries based on database- Returns:
- iterator of all stored queries
-
remove
Removes the stored query with the given name.- Parameters:
name- the name of the stored query being removed- Throws:
com.complexible.stardog.server.QueryNotFoundException- if the stored query with the given name does not existStardogException- An error occurs while removing the query
-
rename
Renames the stored query.- Parameters:
oldName- the name of the stored query being renamednewName- new name for the stored query- Throws:
StardogException- An error occurs while renaming the query
-
move
Moves the stored query to a different path. This is equivalent to removing the old query and creating a new query with the same name under a new path.- Parameters:
oldName- the name of the stored query being removednewPath- the path where the new stored query is created- Throws:
StardogException
-