source.setPublicId(currentResource.getLocation()); source.setSystemId(currentResource.getLocation());
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), encoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
source.setPublicId(res.getLocation()); source.setSystemId(res.getLocation()); parser.parse(source, handler);
try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader);
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { try { if (posEnabled) { posMappingProvider.configure(aJCas.getCas()); } if (chunkEnabled) { chunkMappingProvider.configure(aJCas.getCas()); } } catch (AnalysisEngineProcessException e) { throw new IOException(e); } Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(CAS aCAS) throws IOException, CollectionException { Resource res = nextFile(); initCas(aCAS, res); InputStream is = null; try { is = CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()); XmiCasDeserializer.deserialize(is, aCAS, lenient); // Override language using PARAM_LANG if that is set if (getLanguage() != null) { aCAS.setDocumentLanguage(getLanguage()); } } catch (SAXException e) { throw new IOException(e); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { try { if (namedEntityEnabled) { namedEntityMappingProvider.configure(aJCas.getCas()); } } catch (AnalysisEngineProcessException e) { throw new IOException(e); } Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(CAS aCAS) throws IOException, CollectionException { Resource res = nextFile(); initCas(aCAS, res); InputStream is = null; try { is = CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()); XmiCasDeserializer.deserialize(is, aCAS, lenient); // Override language using PARAM_LANG if that is set if (getLanguage() != null) { aCAS.setDocumentLanguage(getLanguage()); } } catch (SAXException e) { throw new IOException(e); } finally { closeQuietly(is); } } }
@Override public void getNext(CAS aCAS) throws IOException, CollectionException { Resource res = nextFile(); initCas(aCAS, res); InputStream is = null; try { is = CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()); XmiCasDeserializer.deserialize(is, aCAS, lenient); // Override language using PARAM_LANG if that is set if (getLanguage() != null) { aCAS.setDocumentLanguage(getLanguage()); } } catch (SAXException e) { throw new IOException(e); } finally { closeQuietly(is); } } }
@Override public void getNext(CAS aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); try (InputStream is = new BufferedInputStream( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()))) { String text; if (ENCODING_AUTO.equals(sourceEncoding)) { CharsetDetector detector = new CharsetDetector(); text = IOUtils.toString(detector.getReader(is, null)); } else { text = IOUtils.toString(is, sourceEncoding); } aJCas.setDocumentText(text); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }