// Create a Cursor for unitsForSelections.
CursorManagerSpecification cursorMngrSpec =
dp.createCursorManagerSpecification(querySource);
SpecifiedCursorManager cursorMngr =
dp.createCursorManager(cursorMngrSpec);
CompoundCursor unitsForSelCursor =
(CompoundCursor) cursorMngr.createCursor();
// Get the base ValueCursor.
ValueCursor specifiedUnitsVals = unitsForSelCursor.getValueCursor();
// Get the outputs.
List outputs = unitsForSelCursor.getOutputs();
ValueCursor chanSelVals = (ValueCursor) outputs.get(0);
ValueCursor timeSelVals = (ValueCursor) outputs.get(1);
ValueCursor custSelVals = (ValueCursor) outputs.get(2);
// You can now get the values from the ValueCursor objects.
// When you have finished using the Cursor objects, close the
// SpecifiedCursorManager.
int i = 1;
do
{
println(i + ": " +
chanSelVals.getCurrentString() + ", " +
timeSelVals.getCurrentString() + ", " +
custSelVals.getCurrentString() + ", " +
specifiedUnitsVals.getCurrentValue());
i++;
}
while(unitsForSelCursor.next());
cursorMngr.close();
// Create an ArrayList of the Source objects for use by other examples.
ArrayList sourcesFromExample4 = new ArrayList();