protected Handler newSaxHandler() { return new TeiHandler(); }
@Override public void endDocument() throws SAXException { getJCas().setDocumentText(buffer.toString()); // Set up language if (language != null) { getJCas().setDocumentLanguage(language); } else if (getConfigParameterValue(PARAM_LANGUAGE) != null) { getJCas().setDocumentLanguage((String) getConfigParameterValue(PARAM_LANGUAGE)); } }
throws IOException, CollectionException initCas(aCAS, currentResource); Handler handler = newSaxHandler(); handler.setJCas(jcas); handler.setLogger(getLogger()); handler.endDocument(); nextTeiElement();
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); if (writePOS && !writeTokens) { throw new ResourceInitializationException(new IllegalArgumentException( "Setting writePOS to 'true' requires writeToken to be 'true' too.")); } try { // Init with an empty iterator teiElementIterator = asList(new Element[0]).iterator(); // Make sure we know about the first element; nextTeiElement(); } catch (CollectionException | IOException e) { throw new ResourceInitializationException(e); } }
throws IOException, CollectionException initCas(aCAS, currentResource); Handler handler = newSaxHandler(); handler.setJCas(jcas); handler.setLogger(getLogger()); handler.endDocument(); nextTeiElement();
@Override public void endDocument() throws SAXException { getJCas().setDocumentText(buffer.toString()); // Set up language if (language != null) { getJCas().setDocumentLanguage(language); } else if (getConfigParameterValue(PARAM_LANGUAGE) != null) { getJCas().setDocumentLanguage((String) getConfigParameterValue(PARAM_LANGUAGE)); } }
protected Handler newSaxHandler() { return new TeiHandler(); }
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); if (writePOS && !writeTokens) { throw new ResourceInitializationException(new IllegalArgumentException( "Setting writePOS to 'true' requires writeToken to be 'true' too.")); } try { // Init with an empty iterator teiElementIterator = asList(new Element[0]).iterator(); // Make sure we know about the first element; nextTeiElement(); } catch (CollectionException | IOException e) { throw new ResourceInitializationException(e); } }
throws IOException, CollectionException initCas(aCAS, currentResource); Handler handler = newSaxHandler(); handler.setJCas(jcas); handler.setLogger(getLogger()); handler.endDocument(); nextTeiElement();
@Override public void endDocument() throws SAXException { getJCas().setDocumentText(buffer.toString()); // Set up language if (language != null) { getJCas().setDocumentLanguage(language); } else if (getConfigParameterValue(PARAM_LANGUAGE) != null) { getJCas().setDocumentLanguage((String) getConfigParameterValue(PARAM_LANGUAGE)); } }
protected Handler newSaxHandler() { return new TeiHandler(); }
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); if (writePOS && !writeTokens) { throw new ResourceInitializationException(new IllegalArgumentException( "Setting writePOS to 'true' requires writeToken to be 'true' too.")); } try { // Init with an empty iterator teiElementIterator = asList(new Element[0]).iterator(); // Make sure we know about the first element; nextTeiElement(); } catch (CollectionException e) { new ResourceInitializationException(e); } catch (IOException e) { new ResourceInitializationException(e); } }
throws IOException, CollectionException initCas(aCAS, currentResource); Handler handler = newSaxHandler(); handler.setJCas(jcas); handler.setLogger(getLogger()); handler.endDocument(); nextTeiElement();
@Override public void endDocument() throws SAXException { getJCas().setDocumentText(buffer.toString()); // Set up language if (language != null) { getJCas().setDocumentLanguage(language); } else if (getConfigParameterValue(PARAM_LANGUAGE) != null) { getJCas().setDocumentLanguage((String) getConfigParameterValue(PARAM_LANGUAGE)); } }
protected Handler newSaxHandler() { return new TeiHandler(); }
@Override public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); if (writePOS && !writeTokens) { throw new ResourceInitializationException(new IllegalArgumentException( "Setting writePOS to 'true' requires writeToken to be 'true' too.")); } try { // Init with an empty iterator teiElementIterator = asList(new Element[0]).iterator(); // Make sure we know about the first element; nextTeiElement(); } catch (CollectionException e) { new ResourceInitializationException(e); } catch (IOException e) { new ResourceInitializationException(e); } }