Package org.omegat.core.data
Class TMXEntry
java.lang.Object
org.omegat.core.data.TMXEntry
- All Implemented Interfaces:
ITMXEntry,ITranslationEntry
Storage for TMX entry.
Variables in this class can be changed only before store to ProjectTMX. After that, all values must be
unchangeable.
Only RealProject can create and change TMXEntry objects.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsTranslation(TMXEntry other) Two TMXEntrys are considered interchangeable if this method returns true, even if equals() != true.longGets the EPOCH timestamp for last change in this entryGets the author of last change in the entrylongGets the initial creation date as an EPOCH timestampGets the initial creator of the entrygetNote()Gets text note (markup <note> in TMX format)return properties.getPropValue(String propType) Return origin property when requested.Gets the source textGets translation textinthashCode()booleanWe only hold origin property in TMXEntry.booleanhasPropValue(String propType, String propValue) Query specified property type/value combination.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.omegat.core.data.ITranslationEntry
isTranslated
-
Field Details
-
source
-
translation
-
changer
-
changeDate
public final long changeDate -
creator
-
creationDate
public final long creationDate -
note
-
defaultTranslation
public final boolean defaultTranslation -
linked
-
origin
-
-
Method Details
-
getSourceText
Description copied from interface:ITranslationEntryGets the source text- Specified by:
getSourceTextin interfaceITranslationEntry
-
getTranslationText
Description copied from interface:ITranslationEntryGets translation text- Specified by:
getTranslationTextin interfaceITranslationEntry
-
getCreator
Description copied from interface:ITMXEntryGets the initial creator of the entry- Specified by:
getCreatorin interfaceITMXEntry
-
getCreationDate
public long getCreationDate()Description copied from interface:ITMXEntryGets the initial creation date as an EPOCH timestamp- Specified by:
getCreationDatein interfaceITMXEntry
-
getChanger
Description copied from interface:ITMXEntryGets the author of last change in the entry- Specified by:
getChangerin interfaceITMXEntry
-
getChangeDate
public long getChangeDate()Description copied from interface:ITMXEntryGets the EPOCH timestamp for last change in this entry- Specified by:
getChangeDatein interfaceITMXEntry
-
getNote
Description copied from interface:ITMXEntryGets text note (markup <note> in TMX format) -
equals
-
hashCode
public int hashCode() -
equalsTranslation
Two TMXEntrys are considered interchangeable if this method returns true, even if equals() != true. -
hasProperties
public boolean hasProperties()We only hold origin property in TMXEntry.- Specified by:
hasPropertiesin interfaceITMXEntry- Returns:
- true when has origin property, otherwise false.
-
getPropValue
Return origin property when requested.- Specified by:
getPropValuein interfaceITMXEntry- Parameters:
propType- property type. Currently we just support origin.- Returns:
- mtsource when requested, otherwise null.
-
hasPropValue
Query specified property type/value combination.- Specified by:
hasPropValuein interfaceITMXEntry- Parameters:
propType- property type.propValue- expected value.- Returns:
- true when hold a queried type/value, otherwise false.
-
getProperties
return properties.- Specified by:
getPropertiesin interfaceITMXEntry- Returns:
- singletonList of mtsource when it has, otherwise null.
-