l10n converter

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

java.lang.Object
  上位を拡張 java.io.Reader
      上位を拡張 java.io.BufferedReader
          上位を拡張 java.io.LineNumberReader
              上位を拡張 com.sun.star.tooling.converter.DataReader
                  上位を拡張 com.sun.star.tooling.converter.SDFReader
すべての実装されたインタフェース:
java.io.Closeable, java.lang.Readable
直系の既知のサブクラス:
GSIandSDFMerger

public class SDFReader
extends DataReader

SDFReader is a FileReader that knows about the content of SDFFiles A SDFBlock is read of the given file. A SDFBlock consists of all SDFLines that are traanslations of the same String and the SDFLine containing the source string itself. SDFFile lines are read and checked whether they have the allowed column count and don't contain illeagal characters (like most unprintable characters below 0x00df). If the given source language is not found in the first block of SDFLines a ConverterException is thrown at runtime. If the given target language is "" (that means not given) the first language that is not the given source language is taken for target language. The found values are returned in HashMaps that use the following 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.


フィールドの概要
protected  java.lang.String sourceLanguage
          The language in the source file that should be handelt as source language
protected  java.lang.String targetLanguage
          The language in the source file that should be handelt as target language
 
クラス java.io.Reader から継承されたフィールド
lock
 
コンストラクタの概要
SDFReader(java.io.File source, java.lang.String sourceLanguage, java.lang.String targetLanguage, java.lang.String charset)
          Create a new Instance of SDFREader
 
メソッドの概要
 java.util.Map getData()
          The next block of the SDF file is reviewed and the Line including the source language and the Line including the target Language are given back in an array
 java.util.Map[] readBlock()
          Read a Block from the sdf file and return
 
クラス java.io.LineNumberReader から継承されたメソッド
getLineNumber, mark, read, read, readLine, reset, setLineNumber, skip
 
クラス java.io.BufferedReader から継承されたメソッド
close, markSupported, ready
 
クラス java.io.Reader から継承されたメソッド
read, read
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

sourceLanguage

protected java.lang.String sourceLanguage
The language in the source file that should be handelt as source language


targetLanguage

protected java.lang.String targetLanguage
The language in the source file that should be handelt as target language

コンストラクタの詳細

SDFReader

public SDFReader(java.io.File source,
                 java.lang.String sourceLanguage,
                 java.lang.String targetLanguage,
                 java.lang.String charset)
          throws java.io.IOException
Create a new Instance of SDFREader

パラメータ:
source - the file to read from
sourceLanguage - the sourceLanguage (must not be empty)
targetLanguage - the targetLanguage
charset - the charset used to read source
例外:
java.io.IOException
java.lang.Exception
メソッドの詳細

getData

public java.util.Map getData()
                      throws java.io.IOException
クラス DataReader の記述:
The next block of the SDF file is reviewed and the Line including the source language and the Line including the target Language are given back in an array

オーバーライド:
クラス DataReader 内の getData
戻り値:
A Map including the source language and the target Language content are given back
例外:
java.io.IOException

readBlock

public java.util.Map[] readBlock()
                          throws java.io.IOException
Read a Block from the sdf file and return

戻り値:
a Map[] where [0] holds the source and [1] the target language data.
例外:
java.io.IOException

l10n converter

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