Package ca.phon.query.db.xml
Class XMLResultSet
java.lang.Object
ca.phon.query.db.xml.XMLResultSet
- All Implemented Interfaces:
ResultSet
,JAXBWrapper<ResultSetType>
,Iterable<Result>
- Direct Known Subclasses:
XMLLazyResultSet
XML-based implementation of
ResultSet
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given result to the result setGets the corpus name for this result set.String[]
Return the list of metadata keys used in the result set.getResult
(int idx) Get the result specified by the given index.Gets the session name for this result set.Gets the session path for this result set.Get the JAXB element associated with this object.iterator()
Return an iterator for all results in this set.iterator
(boolean includeExcluded) Return an iterator for resultsint
numberOfResults
(boolean includeExcluded) Returns the number of results in this set.removeResult
(int idx) Remove the result specified by the given index.void
setSessionPath
(String sessionPath) Sets the session path for this result set.void
setSessionPath
(String corpus, String session) Sets the session path for this result set.int
size()
Get the number of results in this set.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
resultSet
JAXB object
-
-
Method Details
-
getXMLObject
Get the JAXB element associated with this object.- Specified by:
getXMLObject
in interfaceJAXBWrapper<ResultSetType>
- Returns:
-
getCorpus
Description copied from interface:ResultSet
Gets the corpus name for this result set. -
getSession
Description copied from interface:ResultSet
Gets the session name for this result set.- Specified by:
getSession
in interfaceResultSet
- Returns:
- the session name
-
getSessionPath
Description copied from interface:ResultSet
Gets the session path for this result set. The session path should be of the form [corpus].[session]- Specified by:
getSessionPath
in interfaceResultSet
- Returns:
- the session path
-
setSessionPath
Description copied from interface:ResultSet
Sets the session path for this result set. The session path should be of the form [corpus].[session]- Specified by:
setSessionPath
in interfaceResultSet
- Parameters:
sessionPath
- the session path
-
setSessionPath
Description copied from interface:ResultSet
Sets the session path for this result set. The session path will be of the form [corpus].[session]- Specified by:
setSessionPath
in interfaceResultSet
-
size
public int size()Description copied from interface:ResultSet
Get the number of results in this set. -
removeResult
Description copied from interface:ResultSet
Remove the result specified by the given index.- Specified by:
removeResult
in interfaceResultSet
- Returns:
- the removed result
-
getResult
Description copied from interface:ResultSet
Get the result specified by the given index. -
addResult
Description copied from interface:ResultSet
Add the given result to the result set -
numberOfResults
public int numberOfResults(boolean includeExcluded) Description copied from interface:ResultSet
Returns the number of results in this set.- Specified by:
numberOfResults
in interfaceResultSet
- Parameters:
includeExcluded
- include excluded results in the set. Iftrue
this will return this same value asinvalid @link
#getResults()
- Returns:
- the number of (non-excluded) results in this set
-
getMetadataKeys
Description copied from interface:ResultSet
Return the list of metadata keys used in the result set.- Specified by:
getMetadataKeys
in interfaceResultSet
- Returns:
- the list of metadata keys
-
iterator
Description copied from interface:ResultSet
Return an iterator for results -
iterator
Description copied from interface:ResultSet
Return an iterator for all results in this set. This is the same as calling iterator(true).
-