Examples of parseEmbedded()


Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

                Metadata entrydata = new Metadata();
                entrydata.set(
                        Metadata.RESOURCE_NAME_KEY,
                        header.getFileNameString());
                if (extractor.shouldParseEmbedded(entrydata)) {
                    extractor.parseEmbedded(stream, xhtml, entrydata, true);
                }
            }
            xhtml.endDocument();
        } catch (RarException e) {
            throw new TikaException("Unable to parse a RAR archive", e);
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

            // Use the delegate parser to parse the compressed document
            EmbeddedDocumentExtractor extractor = context.get(
                    EmbeddedDocumentExtractor.class,
                    new ParsingEmbeddedDocumentExtractor(context));
            if (extractor.shouldParseEmbedded(entrydata)) {
                extractor.parseEmbedded(cis, xhtml, entrydata, true);
            }
        } finally {
            cis.close();
        }
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

                        metadata.set(Metadata.CONTENT_LENGTH, Long.toString(file.getSize()));

                        if (embeddedExtractor.shouldParseEmbedded(metadata)) {
                            TikaInputStream stream = TikaInputStream.get(file.createInputStream());
                            try {
                                embeddedExtractor.parseEmbedded(
                                                                stream,
                                                                new EmbeddedContentHandler(handler),
                                                                metadata, false);
                            } finally {
                                stream.close();
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

                if (extractor.shouldParseEmbedded(metadata)) {
                    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
                    try {
                        image.write2OutputStream(buffer);
                        image.clear();
                        extractor.parseEmbedded(
                                new ByteArrayInputStream(buffer.toByteArray()),
                                new EmbeddedContentHandler(handler),
                                metadata, false);
                    } catch (IOException e) {
                        // could not extract this image, so just skip it...
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

            // Use the delegate parser to parse the compressed document
            EmbeddedDocumentExtractor extractor = context.get(
                    EmbeddedDocumentExtractor.class,
                    new ParsingEmbeddedDocumentExtractor(context));
            if (extractor.shouldParseEmbedded(entrydata)) {
                extractor.parseEmbedded(cis, xhtml, entrydata, true);
            }
        } finally {
            cis.close();
        }
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

                        metadata.set(Metadata.CONTENT_LENGTH, Long.toString(file.getSize()));

                        if (embeddedExtractor.shouldParseEmbedded(metadata)) {
                            TikaInputStream stream = TikaInputStream.get(file.createInputStream());
                            try {
                                embeddedExtractor.parseEmbedded(
                                                                stream,
                                                                new EmbeddedContentHandler(handler),
                                                                metadata, false);
                            } finally {
                                stream.close();
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

          ByteArrayInputStream messageStream = new ByteArrayInputStream(message.toByteArray());
          message = null;

          if (extractor.shouldParseEmbedded(mailMetadata)) {
            extractor.parseEmbedded(messageStream, xhtml, mailMetadata, true);
          }

          if (tracking) {
            getTrackingMetadata().put(mailItem++, mailMetadata);
          }
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

            // Use the delegate parser to parse the compressed document
            EmbeddedDocumentExtractor extractor = context.get(
                    EmbeddedDocumentExtractor.class,
                    new ParsingEmbeddedDocumentExtractor(context));
            if (extractor.shouldParseEmbedded(entrydata)) {
                extractor.parseEmbedded(cis, xhtml, entrydata, true);
            }
        } finally {
            cis.close();
        }
View Full Code Here

Examples of org.apache.tika.extractor.EmbeddedDocumentExtractor.parseEmbedded()

                if (extractor.shouldParseEmbedded(metadata)) {
                    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
                    try {
                        image.write2OutputStream(buffer);
                        image.clear();
                        extractor.parseEmbedded(
                                new ByteArrayInputStream(buffer.toByteArray()),
                                new EmbeddedContentHandler(handler),
                                metadata, false);
                    } catch (IOException e) {
                        // could not extract this image, so just skip it...
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.