Class XMLResultSetManager
java.lang.Object
ca.phon.query.db.xml.XMLResultSetManager
- All Implemented Interfaces:
ResultSetManager
An implementation of
ResultSetManager that implements an XML-based
system. XML data is stored on on disk.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFolder inside of<project>/__reswhere query results are saved. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteQuery(Project project, Query query) Delete the given query from the specified project.voiddeleteResultSet(Project project, Query query, ResultSet resultset) Delete the specified result set from the given project and query.getQueries(Project project) Gets a list of queries for a specified project.getResultSetsForQuery(Project project, Query query) Gets a list of result sets for a specified query and project.Loads a given query from the specified project.loadResultSet(Project project, Query query, String sessionPath) Loads a given result set for a query from the specified project.voidrenameQuery(Project project, Query query, String newName) Re-name the specified query.voidSaves a query in the specified project.voidsaveResultSet(Project project, Query query, ResultSet resultSet) Saves a query's result set in the specified project.
-
Field Details
-
DEFAULT_QUERY_FOLDER
Folder inside of<project>/__reswhere query results are saved.- See Also:
-
-
Constructor Details
-
XMLResultSetManager
public XMLResultSetManager()Default constructor.
-
-
Method Details
-
getQueries
Description copied from interface:ResultSetManagerGets a list of queries for a specified project.- Specified by:
getQueriesin interfaceResultSetManager- Parameters:
project- the project- Returns:
- a list of queries for the given project
-
getResultSetsForQuery
Description copied from interface:ResultSetManagerGets a list of result sets for a specified query and project.- Specified by:
getResultSetsForQueryin interfaceResultSetManager- Parameters:
project- the projectquery- the query- Returns:
- the list of result sets for a given query of the given project
-
saveQuery
Description copied from interface:ResultSetManagerSaves a query in the specified project.- Specified by:
saveQueryin interfaceResultSetManager- Parameters:
project- the projectquery- the query- Throws:
IOException- if the query could not be saved
-
loadQuery
Description copied from interface:ResultSetManagerLoads a given query from the specified project.- Specified by:
loadQueryin interfaceResultSetManager- Parameters:
project- the projectqueryName- the query name- Returns:
- the query, if successfully loaded
- Throws:
IOException- if the query could not be loaded
-
saveResultSet
Description copied from interface:ResultSetManagerSaves a query's result set in the specified project.- Specified by:
saveResultSetin interfaceResultSetManager- Parameters:
project- the projectquery- the queryresultSet- the result set- Throws:
IOException- if the result set could not be saved
-
loadResultSet
Description copied from interface:ResultSetManagerLoads a given result set for a query from the specified project.- Specified by:
loadResultSetin interfaceResultSetManager- Parameters:
project- the projectquery- the querysessionPath- the session name- Returns:
- the result set, if successfully loaded
- Throws:
IOException- if the result set could not be loaded
-
deleteQuery
Description copied from interface:ResultSetManagerDelete the given query from the specified project. This will also delete all associated result sets.- Specified by:
deleteQueryin interfaceResultSetManager- Parameters:
project-query-- Throws:
IOException- if the query is not found or could not be removed from the storage device.
-
deleteResultSet
Description copied from interface:ResultSetManagerDelete the specified result set from the given project and query.- Specified by:
deleteResultSetin interfaceResultSetManager- Parameters:
project-query-resultset-- Throws:
IOException- if the resultset/query is not found or could not be removed from the storage device.
-
renameQuery
Description copied from interface:ResultSetManagerRe-name the specified query. query.setName() should not be called before using the method!- Specified by:
renameQueryin interfaceResultSetManager- Parameters:
project-query-newName-- Throws:
IOException- if the query folder could not be re-named.
-