BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(res.getInputStream(), encoding)); while ((readLine = br.readLine()) != null) {
String fileLocation = nextFile.getLocation(); int offset = fileLocation.indexOf(":") + 1; // ignore the initial NullEntityResolver resolver = new NullEntityResolver(); reader.setEntityResolver(resolver); InputStream is = new BufferedInputStream(nextFile.getInputStream()); try { document = reader.read(is);
if (!res.equals(lastResource)) { qualifier = 0; lastResource = res;
while (super.hasNext()) { Resource fileResource = nextFile(); Definition def = reader.readWSDL(fileResource.getResolvedUri().toString(), new InputSource(fileResource.getInputStream())); @SuppressWarnings("unchecked") Collection<Service> services = def.getServices().values(); String fileName = new File(fileResource.getPath()).getName(); if (fileName.endsWith(".wsdl")) { fileName = fileName.substring(0, fileName.length() - 5);
try (InputStream is = CompressionUtils.getInputStream(res.getLocation(), res.getInputStream())) { XmiCasDeserializer.deserialize(is, aCAS, lenient);
NullEntityResolver resolver = new NullEntityResolver(); reader.setEntityResolver(resolver); InputStream is = new BufferedInputStream(nextFile().getInputStream()); try { document = reader.read(is);
is = currentResource.getInputStream(); if (currentResource.getPath().endsWith(".gz")) { is = new GZIPInputStream(is); source.setPublicId(currentResource.getLocation()); source.setSystemId(currentResource.getLocation());
is = currentResource.getInputStream(); if (currentResource.getPath().endsWith(".gz")) { is = new GZIPInputStream(is); source.setPublicId(currentResource.getLocation()); source.setSystemId(currentResource.getLocation());
is = currentResource.getInputStream(); if (currentResource.getPath().endsWith(".gz")) { is = new GZIPInputStream(is); source.setPublicId(currentResource.getLocation()); source.setSystemId(currentResource.getLocation());
while (super.hasNext()) { Resource fileResource = nextFile(); Definition def = reader.readWSDL(fileResource.getResolvedUri().toString(), new InputSource(fileResource.getInputStream())); @SuppressWarnings("unchecked") Collection<Service> services = def.getServices().values();
completed++; getUimaContext().getLogger().log(INFO, "Read file " + completed + " of " + batches.size() + " [" + fileResource.getPath() + "] in " + (System.currentTimeMillis() - tStart) + "ms");
Resource nextFile = nextFile(); logger.info("Reading " + nextFile.getLocation()); InputStream is = new BufferedInputStream(nextFile.getInputStream()); try { document = reader.read(is);
is = currentResource.getInputStream(); if (currentResource.getPath().endsWith(".gz")) { is = new GZIPInputStream(is); source.setPublicId(currentResource.getLocation()); source.setSystemId(currentResource.getLocation());
is = currentResource.getInputStream(); if (currentResource.getPath().endsWith(".gz")) { is = new GZIPInputStream(is); source.setPublicId(currentResource.getLocation()); source.setSystemId(currentResource.getLocation());
JCas jcas = aCAS.getJCas(); is = res.getInputStream(); 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);
docMetaData.setDocumentTitle(new File(aResource.getPath()).getName()); docMetaData.setDocumentUri(aResource.getResolvedUri().toString() + qualifier); docMetaData.setDocumentId(aResource.getPath() + qualifier); if (aResource.getBase() != null) { docMetaData.setDocumentBaseUri(aResource.getResolvedBase()); docMetaData.setCollectionId(aResource.getResolvedBase());
docMetaData.setDocumentTitle(new File(aResource.getPath()).getName()); docMetaData.setDocumentUri(aResource.getResolvedUri().toString() + qualifier); docMetaData.setDocumentId(aResource.getPath() + qualifier); if (aResource.getBase() != null) { docMetaData.setDocumentBaseUri(aResource.getResolvedBase()); docMetaData.setCollectionId(aResource.getResolvedBase());
@Override public void getNext(CAS aCAS) throws IOException, CollectionException { Resource resource = nextFile(); initCas(aCAS, resource, null); InputStream is = null; try { is = resource.getInputStream(); final Pdf2CasConverter converter = new Pdf2CasConverter(); converter.setSubstitutionTable(substitutionTable); converter.setHeadingType(headingType); converter.setParagraphType(paragraphType); if (startPage != Integer.parseInt(NOT_RESTRICTED)) { converter.setStartPage(startPage); } if (endPage != Integer.parseInt(NOT_RESTRICTED)) { converter.setEndPage(endPage); } converter.writeText(aCAS, is); } finally { closeQuietly(is); } } }