Class XMLLazyResultSet
java.lang.Object
ca.phon.query.db.xml.XMLResultSet
ca.phon.query.db.xml.XMLLazyResultSet
- All Implemented Interfaces:
ResultSet,JAXBWrapper<ResultSetType>,Iterable<Result>
Similar to
XMLResultSet, except loading of result set data is lazy
(i.e., delayed as long as possible).-
Field Summary
Fields inherited from class ca.phon.query.db.xml.XMLResultSet
resultSet -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given result to the result setGets the corpus name for this 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 resultsprotected voidloadData()Lazy loading of XML data.intnumberOfResults(boolean includeExcluded) Returns the number of results in this set.removeResult(int idx) Remove the result specified by the given index.intsize()Get the number of results in this set.Methods inherited from class ca.phon.query.db.xml.XMLResultSet
getMetadataKeys, setSessionPath, setSessionPathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
loadData
protected void loadData()Lazy loading of XML data. -
getSessionPath
Description copied from interface:ResultSetGets the session path for this result set. The session path should be of the form [corpus].[session]- Specified by:
getSessionPathin interfaceResultSet- Overrides:
getSessionPathin classXMLResultSet- Returns:
- the session path
-
getCorpus
-
getSession
Description copied from interface:ResultSetGets the session name for this result set.- Specified by:
getSessionin interfaceResultSet- Overrides:
getSessionin classXMLResultSet- Returns:
- the session name
-
getXMLObject
Description copied from class:XMLResultSetGet the JAXB element associated with this object.- Specified by:
getXMLObjectin interfaceJAXBWrapper<ResultSetType>- Overrides:
getXMLObjectin classXMLResultSet- Returns:
-
size
public int size()Description copied from interface:ResultSetGet the number of results in this set.- Specified by:
sizein interfaceResultSet- Overrides:
sizein classXMLResultSet- Returns:
- the size of the result set
-
removeResult
Description copied from interface:ResultSetRemove the result specified by the given index.- Specified by:
removeResultin interfaceResultSet- Overrides:
removeResultin classXMLResultSet- Parameters:
idx-- Returns:
- the removed result
-
getResult
-
addResult
-
numberOfResults
public int numberOfResults(boolean includeExcluded) Description copied from interface:ResultSetReturns the number of results in this set.- Specified by:
numberOfResultsin interfaceResultSet- Overrides:
numberOfResultsin classXMLResultSet- Parameters:
includeExcluded- include excluded results in the set. Iftruethis will return this same value as.size()invalid reference
#getResults()- Returns:
- the number of (non-excluded) results in this set
-
iterator
-
iterator
Description copied from interface:ResultSetReturn an iterator for all results in this set. This is the same as calling iterator(true).
-