|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
file2xliff4j.OdfHandler
public class OdfHandler
Class OdfHandler uses SAX to read and parse the XML files.
Nested Class Summary | |
---|---|
static class |
OdfHandler.TagType
|
static class |
OdfHandler.XliffSegmentMode
|
Field Summary | |
---|---|
protected java.util.ArrayList<file2xliff4j.TuListEntry> |
tuList
|
Constructor Summary | |
---|---|
OdfHandler(java.io.OutputStreamWriter outXliff,
java.io.OutputStreamWriter outSkeleton,
java.io.OutputStreamWriter outFormat,
java.util.Locale sourceLang,
java.lang.String docType,
java.lang.String originalFileName,
SegmentBoundary boundary,
OdfStateObject odfState,
java.lang.String mode)
This constructor sets up the OdfHandler to be notified as each tag (etc.) is encountered in the HTML input stream. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Called whenever characters are encountered |
void |
endDocument()
When the end-of-document is encountered, save the "candidate epilog" (the characters that follow the final TU), etc. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName)
Method called whenever an end element is encountered |
int |
getTuDepth()
Intended for the client to call after parsing is complete, this method returns the maximum TU depth (i.e. |
void |
startDocument()
Method called by SAX parser at the beginning of document parsing. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes atts)
Method called whenever a start element is encountered |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<file2xliff4j.TuListEntry> tuList
Constructor Detail |
---|
public OdfHandler(java.io.OutputStreamWriter outXliff, java.io.OutputStreamWriter outSkeleton, java.io.OutputStreamWriter outFormat, java.util.Locale sourceLang, java.lang.String docType, java.lang.String originalFileName, SegmentBoundary boundary, OdfStateObject odfState, java.lang.String mode)
outXliff
- Where to write the XLIFFoutSkeleton
- Where to write the targetoutFormat
- Where to write the formatsourceLang
- The language of this originaldocType
- What kind of document is thisoriginalFileName
- The original file's name (required as an attribute
in the "file" element)boundary
- Indication of whether to do paragraph or sentence
segmentationodfState
- Object to maintain state across multiple callsmode
- Whether this is being called to process content.xml or
styles.xml.Method Detail |
---|
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- The URI of the namespacelocalName
- The local name (without prefix), or the empty string if Namespace processing is not being performed.qualifiedName
- The qualified name (with prefix), or the empty string if qualified names are not availableatts
- The specified or defaulted attributes.
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- The URI of the namespacelocalName
- The local name (without prefix), or the empty string if Namespace processing is not being performed.qualifiedName
- The qualified name (with prefix), or the empty string if qualified names are not available
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
ch
- Array containing characters encounteredstart
- Position in array of first applicable characterlength
- How many characters are of interest?
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public int getTuDepth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |