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 TypeMethodDescriptionvoid
Add 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 void
loadData()
Lazy loading of XML data.int
numberOfResults
(boolean includeExcluded) Returns the number of results in this set.removeResult
(int idx) Remove the result specified by the given index.int
size()
Get the number of results in this set.Methods inherited from class ca.phon.query.db.xml.XMLResultSet
getMetadataKeys, setSessionPath, setSessionPath
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
-
Method Details
-
loadData
protected void loadData()Lazy loading of XML data. -
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
- Overrides:
getSessionPath
in classXMLResultSet
- Returns:
- the session path
-
getCorpus
-
getSession
Description copied from interface:ResultSet
Gets the session name for this result set.- Specified by:
getSession
in interfaceResultSet
- Overrides:
getSession
in classXMLResultSet
- Returns:
- the session name
-
getXMLObject
Description copied from class:XMLResultSet
Get the JAXB element associated with this object.- Specified by:
getXMLObject
in interfaceJAXBWrapper<ResultSetType>
- Overrides:
getXMLObject
in classXMLResultSet
- Returns:
-
size
public int size()Description copied from interface:ResultSet
Get the number of results in this set.- Specified by:
size
in interfaceResultSet
- Overrides:
size
in classXMLResultSet
- Returns:
- the size of the result set
-
removeResult
Description copied from interface:ResultSet
Remove the result specified by the given index.- Specified by:
removeResult
in interfaceResultSet
- Overrides:
removeResult
in classXMLResultSet
- Parameters:
idx
-- Returns:
- the removed result
-
getResult
-
addResult
-
numberOfResults
public int numberOfResults(boolean includeExcluded) Description copied from interface:ResultSet
Returns the number of results in this set.- Specified by:
numberOfResults
in interfaceResultSet
- Overrides:
numberOfResults
in classXMLResultSet
- Parameters:
includeExcluded
- include excluded results in the set. Iftrue
this will return this same value asinvalid reference
#getResults()
- Returns:
- the number of (non-excluded) results in this set
-
iterator
-
iterator
Description copied from interface:ResultSet
Return an iterator for all results in this set. This is the same as calling iterator(true).
-