Package com.complexible.stardog
Interface StoredQueries
-
- All Superinterfaces:
java.lang.Iterable<StoredQuery>
public interface StoredQueries extends java.lang.Iterable<StoredQuery>
A mutable collection of stored queries.- Since:
- 4.2
- Version:
- 5.0.2
- Author:
- Evren Sirin, Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(StoredQuery query)Stores the given query.voidclear()Removes all the stored queries.StoredQueryget(java.lang.String name)Returns the stored query with the given name.java.util.Iterator<StoredQuery>iterator()Returns an iterator of all stored queries.voidremove(java.lang.String name)Removes the stored query with the given name.voidrename(java.lang.String oldName, java.lang.String newName)Renames the stored query.voidupdate(StoredQuery query)Updates the stored query with the given name.
-
-
-
Method Detail
-
clear
void clear() throws StardogExceptionRemoves all the stored queries.- Throws:
StardogException- if there is an error removing the queries
-
add
void add(StoredQuery query) throws StardogException
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
void update(StoredQuery query) throws StardogException
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
StoredQuery get(java.lang.String name) throws StardogException
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
java.util.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 interfacejava.lang.Iterable<StoredQuery>- Returns:
- iterator of all stored queries
-
remove
void remove(java.lang.String name) throws StardogExceptionRemoves 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
void rename(java.lang.String oldName, java.lang.String newName) throws StardogExceptionRenames the stored query.- Parameters:
oldName- the name of the stored query being removednewName- new name for the stored query- Throws:
StardogException- An error occurs while renaming the query
-
-