/** * Enqueue an FS, and everything reachable from it. * * This call is recursive with enqueueFeatures, * and an arbitrary long chain can get stack overflow error. * Probably should fix this someday. See https://issues.apache.org/jira/browse/UIMA-106 * * @param addr * The FS address. */ private void enqueueFsAndMaybeFeatures(int addr) throws SAXException { int typeCode = enqueueCommon(addr); if (typeCode == -1) { return; } queue.add(addr); enqueueFeatures(addr, typeCode); // Also, for FSArrays enqueue the elements -- not here, done by enqueueFeatures, 1 line above // if (cas.isFSArrayType(typeCode)) { //TODO: won't get parameterized arrays?? // enqueueFSArrayElements(addr); // } }
private void enqueueFeaturesOfFSs(final IntVector fss) throws SAXException { final int max = fss.size(); for (int i = 0; i < max; i++) { int addr = fss.get(i); int heapVal = cas.getHeapValue(addr); enqueueFeatures(addr, heapVal); } }