Package org.omegat.util
Class TMXReader2
java.lang.Object
org.omegat.util.TMXReader2
Helper for read TMX files, using StAX.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback for receive data from TMX.static classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCreation Tool attribute value of OmegaT TMXs: "OmegaT"static final StringSegment Type attribute value: "paragraph"static final StringSegment Type attribute value: "sentence"static final EntityResolverstatic final XMLResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdetectCharset(File file) Detects charset of XML file.booleanlongparseISO8601date(String str) voidreadTMX(File file, Language sourceLanguage, Language targetLanguage, boolean isSegmentingEnabled, boolean omegaTMX, boolean extTmxLevel2, boolean useSlash, TMXReader2.LoadCallback callback) Read TMX file.
-
Field Details
-
SEG_PARAGRAPH
Segment Type attribute value: "paragraph"- See Also:
-
SEG_SENTENCE
Segment Type attribute value: "sentence"- See Also:
-
CT_OMEGAT
Creation Tool attribute value of OmegaT TMXs: "OmegaT"- See Also:
-
TMX_DTD_RESOLVER
-
TMX_DTD_RESOLVER_2
-
-
Constructor Details
-
TMXReader2
public TMXReader2()
-
-
Method Details
-
detectCharset
Detects charset of XML file.- Throws:
IOException
-
isParagraphSegtype
public boolean isParagraphSegtype() -
readTMX
public void readTMX(File file, Language sourceLanguage, Language targetLanguage, boolean isSegmentingEnabled, boolean omegaTMX, boolean extTmxLevel2, boolean useSlash, TMXReader2.LoadCallback callback) throws Exception Read TMX file.- Throws:
Exception
-
parseISO8601date
-