|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfile2xliff4j.WinRcImporter
public class WinRcImporter
Import a Microsoft Windows rc (resource) file.
Field Summary |
---|
Fields inherited from interface file2xliff4j.Converter |
---|
BLKSIZE, formatSuffix, skeletonSuffix, startXliff, stylesTSkeletonSuffix, tSkeletonSuffix, xliffSuffix, xmlDeclaration |
Constructor Summary | |
---|---|
WinRcImporter()
Create a Microsoft Windows rc file importer |
Method Summary | |
---|---|
ConversionStatus |
convert(ConversionMode mode,
java.util.Locale language,
java.lang.String phaseName,
int maxPhase,
java.nio.charset.Charset nativeEncoding,
FileType nativeFileType,
java.lang.String nativeFileName,
java.lang.String baseDir,
Notifier notifier)
Deprecated. |
ConversionStatus |
convert(ConversionMode mode,
java.util.Locale language,
java.lang.String phaseName,
int maxPhase,
java.nio.charset.Charset nativeEncoding,
FileType nativeFileType,
java.lang.String nativeFileName,
java.lang.String baseDir,
Notifier notifier,
SegmentBoundary boundary,
java.io.StringWriter generatedFileName)
Convert a Microsoft Windoes rc file to XLIFF, creating XLIFF and a skeleton file as output. |
ConversionStatus |
convert(ConversionMode mode,
java.util.Locale language,
java.lang.String phaseName,
int maxPhase,
java.nio.charset.Charset nativeEncoding,
FileType nativeFileType,
java.lang.String nativeFileName,
java.lang.String baseDir,
Notifier notifier,
SegmentBoundary boundary,
java.io.StringWriter generatedFileName,
java.util.Set<f2xutils.XMLTuXPath> skipList)
Convert a Microsoft Windoes rc file to XLIFF, creating XLIFF and a skeleton file as output. |
java.lang.Object |
getConversionProperty(java.lang.String property)
Return an object representing a format-specific (and converter-specific) property. |
FileType |
getFileType()
Return the file type that this converter handles. |
static java.nio.charset.Charset |
readRcEncoding(java.lang.String rcFileName)
Passed the name of a Windows RC file, try to determine its encoding. |
void |
setConversionProperty(java.lang.String property,
java.lang.Object value)
Set a format-specific property that might affect the way that the conversion occurs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WinRcImporter()
Method Detail |
---|
public ConversionStatus convert(ConversionMode mode, java.util.Locale language, java.lang.String phaseName, int maxPhase, java.nio.charset.Charset nativeEncoding, FileType nativeFileType, java.lang.String nativeFileName, java.lang.String baseDir, Notifier notifier, SegmentBoundary boundary, java.io.StringWriter generatedFileName) throws ConversionException
convert
in interface Converter
mode
- The mode of conversion (to or from XLIFF). It should be
ConversionMode.TO_XLIFF in this case.language
- The language of the translatable strings in the rc file.nativeEncoding
- The encoding of the rc file. If this parameter is
null, the importer will attempt to determine the encoding from the
rc file itself.phaseName
- The target phase-name. This value is ignored.maxPhase
- The maximum phase number. This value is ignored.nativeFileType
- The type of the original native file. This value is
ignored (It is assumed to be WINRC.)nativeFileName
- The name of the Windows rc file.baseDir
- The directory that contains the input rc file--from
which we will read the input file. This is also the directory to
which the output xliff and skeleton files are written. The output
files will be named as follows:
notifier
- Instance of a class that implements the Notifier
interface (to send notifications in case of conversion error).boundary
- The boundary on which to segment translation units (e.g.,
on paragraph or sentence boundaries). This value is ignored. (Each
string becomes one segment in the XLIFF.)generatedFileName
- If non-null, the converter will write the name
of the file (without parent directories) to which the generated
XLIFF file was written.
ConversionException
- If a conversion exception is encountered.public ConversionStatus convert(ConversionMode mode, java.util.Locale language, java.lang.String phaseName, int maxPhase, java.nio.charset.Charset nativeEncoding, FileType nativeFileType, java.lang.String nativeFileName, java.lang.String baseDir, Notifier notifier, SegmentBoundary boundary, java.io.StringWriter generatedFileName, java.util.Set<f2xutils.XMLTuXPath> skipList) throws ConversionException
convert
in interface Converter
mode
- The mode of conversion (to or from XLIFF). It should be
ConversionMode.TO_XLIFF in this case.language
- The language of the translatable strings in the rc file.nativeEncoding
- The encoding of the rc file. If this parameter is
null, the importer will attempt to determine the encoding from the
rc file itself.phaseName
- The target phase-name. This value is ignored.maxPhase
- The maximum phase number. This value is ignored.nativeFileType
- The type of the original native file. This value is
ignored (It is assumed to be WINRC.)nativeFileName
- The name of the Windows rc file.baseDir
- The directory that contains the input rc file--from
which we will read the input file. This is also the directory to
which the output xliff and skeleton files are written. The output
files will be named as follows:
notifier
- Instance of a class that implements the Notifier
interface (to send notifications in case of conversion error).boundary
- The boundary on which to segment translation units (e.g.,
on paragraph or sentence boundaries). This value is ignored. (Each
string becomes one segment in the XLIFF.)generatedFileName
- If non-null, the converter will write the name
of the file (without parent directories) to which the generated
XLIFF file was written.skipList
- (Not used by this converter.)
ConversionException
- If a conversion exception is encountered.@Deprecated public ConversionStatus convert(ConversionMode mode, java.util.Locale language, java.lang.String phaseName, int maxPhase, java.nio.charset.Charset nativeEncoding, FileType nativeFileType, java.lang.String nativeFileName, java.lang.String baseDir, Notifier notifier) throws ConversionException
convert
in interface Converter
mode
- The mode of conversion (to or from XLIFF). It should be
ConversionMode.TO_XLIFF in this case.language
- The language of the translatable strings in the rc file.nativeEncoding
- The encoding of the rc file. If this parameter is
null, the importer will attempt to determine the encoding from the
rc file itself.phaseName
- The target phase-name. This value is ignored.maxPhase
- The maximum phase number. This value is ignored.nativeFileType
- The type of the original native file. This value is
ignored (It is assumed to be WINRC.)nativeFileName
- The name of the Windows rc file.baseDir
- The directory that contains the input rc file--from
which we will read the input file. This is also the directory to
which the output xliff and skeleton files are written. The output
files will be named as follows:
notifier
- Instance of a class that implements the Notifier
interface (to send notifications in case of conversion error).
ConversionException
- If a conversion exception is encountered.public java.lang.Object getConversionProperty(java.lang.String property)
getConversionProperty
in interface Converter
property
- The name of the property to return.
public FileType getFileType()
getFileType
in interface Converter
public static java.nio.charset.Charset readRcEncoding(java.lang.String rcFileName) throws ConversionException
rcFileName
- The name of a Windows RC file--fully qualified
ConversionException
- if an error is encountered.public void setConversionProperty(java.lang.String property, java.lang.Object value) throws ConversionException
Note: This converter needs no format-specific properties. If any are passed, they will be silently ignored.
setConversionProperty
in interface Converter
property
- The name of the propertyvalue
- The value of the property
ConversionException
- If the property isn't recognized (and if it matters).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |