org.apache.tika.language
Class ProfilingHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.sax.WriteOutContentHandler
org.apache.tika.language.ProfilingHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class ProfilingHandler
- extends WriteOutContentHandler
SAX content handler that builds a language profile based on all the
received character content.
- Since:
- Apache Tika 0.5
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator |
endDocument, endElement, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning |
ProfilingHandler
public ProfilingHandler(ProfilingWriter writer)
ProfilingHandler
public ProfilingHandler(LanguageProfile profile)
ProfilingHandler
public ProfilingHandler()
getProfile
public LanguageProfile getProfile()
- Returns the language profile being built by this content handler.
Note that the returned profile gets updated whenever new SAX events
are received by this content handler. Use the
getLanguage()
method to get the language that best matches the current state of
the profile.
- Returns:
- language profile
getLanguage
public LanguageIdentifier getLanguage()
- Returns the language that best matches the current state of the
language profile.
- Returns:
- language that best matches the current profile
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.