@Override public void process(CAS aCAS) throws AnalysisEngineProcessException { out.println("======== CAS " + iCas + " begin =================================="); out.println(); Iterator<CAS> viewIt = aCAS.getViewIterator(); while (viewIt.hasNext()) { CAS view = viewIt.next(); processView(view); if (view.getDocumentText() == null && view.getSofaDataStream() != null) { processSofaData(view); } } out.println("======== CAS " + iCas + " end =================================="); out.println(); out.println(); out.flush(); iCas++; }
@Override public void process(CAS aCAS) throws AnalysisEngineProcessException { out.println("======== CAS " + iCas + " begin =================================="); out.println(); Iterator<CAS> viewIt = aCAS.getViewIterator(); while (viewIt.hasNext()) { CAS view = viewIt.next(); processView(view); if (view.getDocumentText() == null && view.getSofaDataStream() != null) { processSofaData(view); } } out.println("======== CAS " + iCas + " end =================================="); out.println(); out.println(); out.flush(); iCas++; }
@Override public void process(CAS aCAS) throws AnalysisEngineProcessException { out.println("======== CAS " + iCas + " begin =================================="); out.println(); Iterator<CAS> viewIt = aCAS.getViewIterator(); while (viewIt.hasNext()) { CAS view = viewIt.next(); processView(view); if (view.getDocumentText() == null && view.getSofaDataStream() != null) { processSofaData(view); } } out.println("======== CAS " + iCas + " end =================================="); out.println(); out.println(); out.flush(); iCas++; }
private static JCas getViewWithGoldAnnotations(JCas correspondingCasThatHasGoldAnnotations) { JCas viewWithPreexistingGoldAnnotations = null; try { viewWithPreexistingGoldAnnotations = correspondingCasThatHasGoldAnnotations.getView(AssertionEvaluation.GOLD_VIEW_NAME); } catch (org.apache.uima.cas.CASRuntimeException cre) { // Let it just continue if there's an exception and check for null later } catch (org.apache.uima.cas.CASException viewException) { // Let it just continue if there's an exception and check for null later } catch (NullPointerException npe) { // Let it just continue if there's an exception and check for null later } if (viewWithPreexistingGoldAnnotations == null) { viewWithPreexistingGoldAnnotations = correspondingCasThatHasGoldAnnotations; LOGGER.debug("Using view " + viewWithPreexistingGoldAnnotations.getViewName()); int n = viewWithPreexistingGoldAnnotations.getAnnotationIndex().size(); LOGGER.debug("With " + n + " annotations"); if (n==0) { Iterator<CAS> iter = viewWithPreexistingGoldAnnotations.getCas().getViewIterator(); while (iter.hasNext()) { CAS cas = iter.next(); LOGGER.debug("view " + cas.getViewName() + " has " + cas.getAnnotationIndex().size() + " indexed annotations."); } throw new RuntimeException("n==0"); } } return viewWithPreexistingGoldAnnotations; }
private static JCas getViewWithGoldAnnotations(JCas correspondingCasThatHasGoldAnnotations) { JCas viewWithPreexistingGoldAnnotations = null; try { viewWithPreexistingGoldAnnotations = correspondingCasThatHasGoldAnnotations.getView(AssertionEvaluation.GOLD_VIEW_NAME); } catch (org.apache.uima.cas.CASRuntimeException cre) { // Let it just continue if there's an exception and check for null later } catch (org.apache.uima.cas.CASException viewException) { // Let it just continue if there's an exception and check for null later } catch (NullPointerException npe) { // Let it just continue if there's an exception and check for null later } if (viewWithPreexistingGoldAnnotations == null) { viewWithPreexistingGoldAnnotations = correspondingCasThatHasGoldAnnotations; LOGGER.debug("Using view " + viewWithPreexistingGoldAnnotations.getViewName()); int n = viewWithPreexistingGoldAnnotations.getAnnotationIndex().size(); LOGGER.debug("With " + n + " annotations"); if (n==0) { Iterator<CAS> iter = viewWithPreexistingGoldAnnotations.getCas().getViewIterator(); while (iter.hasNext()) { CAS cas = iter.next(); LOGGER.debug("view " + cas.getViewName() + " has " + cas.getAnnotationIndex().size() + " indexed annotations."); } throw new RuntimeException("n==0"); } } return viewWithPreexistingGoldAnnotations; }
Iterator<CAS> viewIterator = aSrcCas.getViewIterator(); while (viewIterator.hasNext()) { CAS view = viewIterator.next();
for (Iterator<CAS> it = getDocument().getCAS().getViewIterator(); it.hasNext(); ) { viewNames.add(it.next().getViewName());
if (view != null) { boolean found = false; Iterator<CAS> viewIterator = cas.getViewIterator(); while (viewIterator.hasNext()) { CAS each = (CAS) viewIterator.next();
for (Iterator<CAS> it = cas.getViewIterator(); it.hasNext(); ) {