Package org.apache.tika.sax

Examples of org.apache.tika.sax.XHTMLContentHandler.endDocument()


                setType(metadata, "application/vnd.ms-outlook");
                new OutlookExtractor(filesystem).parse(xhtml, metadata);
            }
        }

        xhtml.endDocument();
    }

    public void parse(DocumentEntry entry, Metadata metadata)
            throws IOException, TikaException {
        try {
View Full Code Here


            xhtml.element("p", GENRES[Math.min(genre, GENRES.length - 1)]);
            xhtml.characters("\n");
        }

        xhtml.endDocument();
    }

    /**
     * Returns the identified ISO-8859-1 substring from the given byte buffer.
     * The return value is the zero-terminated substring retrieved from
View Full Code Here

    public void parse(InputStream stream, ContentHandler handler,
            Metadata metadata) throws IOException, SAXException, TikaException {
        parse(stream, metadata);
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();
        xhtml.endDocument();
    }

    public void parse(InputStream stream, Metadata metadata)
            throws IOException, TikaException {
        String type = metadata.get(Metadata.CONTENT_TYPE);
View Full Code Here

    public void parse(InputStream stream, ContentHandler handler,
            Metadata metadata) throws IOException, SAXException, TikaException {
        parse(stream, metadata);
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();
        xhtml.endDocument();
    }

    private static HashMap<Float, String> divisionTypes = new HashMap<Float, String>();

    static {
View Full Code Here

            parseEntry(gzip, xhtml, entrydata);
        } finally {
            gzip.close();
        }

        xhtml.endDocument();
    }

}
View Full Code Here

        } else {
            throw new TikaException(
                    "Unsupported AutoCAD drawing version: " + version);
        }

        xhtml.endDocument();
    }

    /**
     * Stored as US-ASCII
     */
 
View Full Code Here

        } else {
            metadata.set(Metadata.CONTENT_TYPE, "application/x-tar");
            unpack(new TarArchiveInputStream(stream), xhtml);
        }

        xhtml.endDocument();
    }

    private void decompress(InputStream stream, XHTMLContentHandler xhtml)
            throws IOException, SAXException, TikaException {
        try {
View Full Code Here

                    xhtml.endElement("li");
                }
            }
            xhtml.endElement("ul");

            xhtml.endDocument();
        } catch (FeedException e) {
            throw new TikaException("RSS parse error", e);
        }

    }
View Full Code Here

                        throw new EncryptedDocumentException(ex);
                    }
            }
        }

        xhtml.endDocument();
    }

    private void setType(Metadata metadata, MediaType type) {
        metadata.set(Metadata.CONTENT_TYPE, type.toString());
    }
View Full Code Here

                // file was corrupt or we could not parse it...
                break;
            }
        }

        xhtml.endDocument();
    }

}
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.