l10n converter

com.sun.star.tooling.converter
クラス XLIFFReader

java.lang.Object
  上位を拡張 org.xml.sax.helpers.DefaultHandler
      上位を拡張 com.sun.star.tooling.converter.XLIFFReader
すべての実装されたインタフェース:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class XLIFFReader
extends org.xml.sax.helpers.DefaultHandler

Parse the given file and extract the content needed.
This Reader understands the parts of the xliff spezification used to translate the strings in Star-Office and Open-Office.
The given file is parsed and the content is stored in a HashMap with those keys:
"BlockNr" originally coming from reading the sdf file, contains 'block nr in sdf file'+'-'+'hash value of the sdf id fields'.
"Project" first column in sdf file format.
"SourceFile" second column in sdf file format.
"Dummy" third column in sdf file format.
"ResType" 4. column in sdf file format.
"GID" 5. column in sdf file format.
"LID" 6. column in sdf file format.
"HID" 7. column in sdf file format.
"Platform" 8. column in sdf file format.
"Width", 9. column in sdf file format.
"SourceLanguageID" 10. column in sdf file format(in the line with the source language).
"SourceText" 11. column in sdf file format(in the line with the source language).
"SourceHText" 12. column in sdf file format(in the line with the source language).
"SourceQText" 13. column in sdf file format(in the line with the source language).
"SourceTitle" 14. column in sdf file format(in the line with the source language).
"TargetLanguageID" 10. column in sdf file format (in the line with the target language).
"TargetText" 11. column in sdf file format (in the line with the target language).
"TargetHText" 12. column in sdf file format (in the line with the target language).
"TargetQText" 13. column in sdf file format (in the line with the target language).
"TargetTitle", 14. column in sdf file format (in the line with the target language).
"TimeStamp" 15. column in sdf file format.


コンストラクタの概要
XLIFFReader(DataHandler handler, DataWriter target)
          Create a new Instance of XLIFFReader
XLIFFReader(DataHandler handler, DataWriter target, boolean doBlockCompleteCheck)
          Create a new Instance of XLIFFReader
 
メソッドの概要
 void characters(char[] ch, int start, int length)
          (non-Javadoc)
 void endDocument()
          (non-Javadoc)
 void endElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName)
          (non-Javadoc)
 void error(org.xml.sax.SAXParseException e)
          (non-Javadoc)
 void fatalError(org.xml.sax.SAXParseException e)
          (non-Javadoc)
 void initData()
          delete and initialize the data content
 boolean isComplete()
          complete means all depending parts have been found esp. all res types that belong to the same SDF Line
 void moveData()
          put the data in an Map in the format that DataHandler can handle it
 void showData()
          Put the Data to the DataHandler tell the Writer to write it
 void startDocument()
          (non-Javadoc)
 void startElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName, org.xml.sax.Attributes attrs)
          (non-Javadoc)
 void warning(org.xml.sax.SAXParseException e)
          (non-Javadoc)
 
クラス org.xml.sax.helpers.DefaultHandler から継承されたメソッド
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

XLIFFReader

public XLIFFReader(DataHandler handler,
                   DataWriter target)
            throws java.io.IOException
Create a new Instance of XLIFFReader

パラメータ:
handler - the DataHandler to use
target - the target used
例外:
java.io.IOException

XLIFFReader

public XLIFFReader(DataHandler handler,
                   DataWriter target,
                   boolean doBlockCompleteCheck)
            throws java.io.IOException
Create a new Instance of XLIFFReader

パラメータ:
handler - the DataHandler to use
target - the target used
doBlockCompleteCheck - indicates whether every single transunit should be returned or the whole block data is to be collected
例外:
java.io.IOException
メソッドの詳細

characters

public void characters(char[] ch,
                       int start,
                       int length)
(non-Javadoc)

定義:
インタフェース org.xml.sax.ContentHandler 内の characters
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の characters
関連項目:
ContentHandler.characters(char[], int, int)

endDocument

public void endDocument()
(non-Javadoc)

定義:
インタフェース org.xml.sax.ContentHandler 内の endDocument
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の endDocument
関連項目:
ContentHandler.endDocument()

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String sName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
(non-Javadoc)

定義:
インタフェース org.xml.sax.ContentHandler 内の endElement
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の endElement
例外:
org.xml.sax.SAXException
関連項目:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXParseException
(non-Javadoc)

定義:
インタフェース org.xml.sax.ErrorHandler 内の error
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の error
例外:
org.xml.sax.SAXParseException
関連項目:
ErrorHandler.error(org.xml.sax.SAXParseException)

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXParseException
(non-Javadoc)

定義:
インタフェース org.xml.sax.ErrorHandler 内の fatalError
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の fatalError
例外:
org.xml.sax.SAXParseException
関連項目:
ErrorHandler.fatalError(org.xml.sax.SAXParseException)

initData

public void initData()
delete and initialize the data content


isComplete

public final boolean isComplete()
complete means all depending parts have been found esp. all res types that belong to the same SDF Line

戻り値:
true if the data is complete

moveData

public final void moveData()
put the data in an Map in the format that DataHandler can handle it


showData

public void showData()
              throws org.xml.sax.SAXException
Put the Data to the DataHandler tell the Writer to write it

例外:
org.xml.sax.SAXException

startDocument

public void startDocument()
(non-Javadoc)

定義:
インタフェース org.xml.sax.ContentHandler 内の startDocument
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の startDocument
関連項目:
ContentHandler.startDocument()

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String sName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
(non-Javadoc)

定義:
インタフェース org.xml.sax.ContentHandler 内の startElement
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の startElement
例外:
org.xml.sax.SAXException
関連項目:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXParseException
(non-Javadoc)

定義:
インタフェース org.xml.sax.ErrorHandler 内の warning
オーバーライド:
クラス org.xml.sax.helpers.DefaultHandler 内の warning
例外:
org.xml.sax.SAXParseException
関連項目:
ErrorHandler.warning(org.xml.sax.SAXParseException)

l10n converter

Copyright © 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA