/** * Removes all debug annotations from the index. * * @param jcas - the current document */ public static void removeDebugInformation(JCas jcas) { jcas.removeAllIncludingSubtypes(DebugBlockApply.type); jcas.removeAllIncludingSubtypes(DebugRuleApply.type); jcas.removeAllIncludingSubtypes(DebugRuleMatch.type); }
@Override public void removeAllIncludingSubtypes(int type) { delegate.removeAllIncludingSubtypes(type); } }
@Deprecated public static void cleanUp(JCas jcas) { jcas.removeAllIncludingSubtypes(HTMLAnnotation.type); }
@Override public void process(JCas jcas) throws AnalysisEngineProcessException { try { Annotation a = clazz.getConstructor(JCas.class).newInstance(jcas); if (includeSubtypes) jcas.removeAllIncludingSubtypes(a.getTypeIndexID()); else jcas.removeAllExcludingSubtypes(a.getTypeIndexID()); } catch (Exception e) { throw new AnalysisEngineProcessException(e); } } }
@Override public void getNext(JCas jcas) throws IOException, CollectionException { URL url = urls.get(currentUrlIndex++); getLogger().debug("Processing url " + url); Drama drama = new Drama(jcas); drama.setDocumentId(String.valueOf(currentUrlIndex)); drama.setCollectionId(collectionId); // drama.setDocumentBaseUri("https://textgridlab.org/1.0/tgcrud-public/rest/"); drama.setDocumentUri(url.toString()); drama.addToIndexes(); jcas.setDocumentLanguage(language); if (url.getProtocol().equalsIgnoreCase("http")) { URLConnection urlc = url.openConnection(); urlc.setRequestProperty("Accept", "application/xml"); getNext(jcas, urlc.getInputStream(), drama); } else { getNext(jcas, url.openStream(), drama); } if (removeXmlAnnotations) { jcas.removeAllIncludingSubtypes(XMLElement.type); } }
jcas.removeAllIncludingSubtypes(RutaBasic.type); jcas.removeAllIncludingSubtypes(TokenSeed.type);