Package org.omegat.core.data
Class TMXEntry
- java.lang.Object
- 
- org.omegat.core.data.TMXEntry
 
- 
- All Implemented Interfaces:
- ITMXEntry,- ITranslationEntry
 
 public class TMXEntry extends java.lang.Object implements ITMXEntry 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 SummaryNested Classes Modifier and Type Class Description static classTMXEntry.ExternalLinked
 - 
Field SummaryFields Modifier and Type Field Description longchangeDatejava.lang.StringchangerlongcreationDatejava.lang.StringcreatorbooleandefaultTranslationTMXEntry.ExternalLinkedlinkedjava.lang.Stringnotejava.lang.Stringoriginjava.lang.Stringsourcejava.lang.Stringtranslation
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)booleanequalsTranslation(TMXEntry other)Two TMXEntrys are considered interchangeable if this method returns true, even if equals() != true.longgetChangeDate()Gets the EPOCH timestamp for last change in this entryjava.lang.StringgetChanger()Gets the author of last change in the entrylonggetCreationDate()Gets the initial creation date as an EPOCH timestampjava.lang.StringgetCreator()Gets the initial creator of the entryjava.lang.StringgetNote()Gets text note (markup <note> in TMX format)java.util.List<TMXProp>getProperties()return properties.java.lang.StringgetPropValue(java.lang.String propType)Return origin property when requested.java.lang.StringgetSourceText()Gets the source textjava.lang.StringgetTranslationText()Gets translation textinthashCode()booleanhasProperties()We only hold origin property in TMXEntry.booleanhasPropValue(java.lang.String propType, java.lang.String propValue)Query specified property type/value combination.- 
Methods inherited from class java.lang.ObjectgetClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.omegat.core.data.ITranslationEntryisTranslated
 
- 
 
- 
- 
- 
Field Detail- 
sourcepublic final java.lang.String source 
 - 
translationpublic final java.lang.String translation 
 - 
changerpublic final java.lang.String changer 
 - 
changeDatepublic final long changeDate 
 - 
creatorpublic final java.lang.String creator 
 - 
creationDatepublic final long creationDate 
 - 
notepublic final java.lang.String note 
 - 
defaultTranslationpublic final boolean defaultTranslation 
 - 
linkedpublic final TMXEntry.ExternalLinked linked 
 - 
originpublic final java.lang.String origin 
 
- 
 - 
Method Detail- 
getSourceTextpublic java.lang.String getSourceText() Description copied from interface:ITranslationEntryGets the source text- Specified by:
- getSourceTextin interface- ITranslationEntry
 
 - 
getTranslationTextpublic java.lang.String getTranslationText() Description copied from interface:ITranslationEntryGets translation text- Specified by:
- getTranslationTextin interface- ITranslationEntry
 
 - 
getCreatorpublic java.lang.String getCreator() Description copied from interface:ITMXEntryGets the initial creator of the entry- Specified by:
- getCreatorin interface- ITMXEntry
 
 - 
getCreationDatepublic long getCreationDate() Description copied from interface:ITMXEntryGets the initial creation date as an EPOCH timestamp- Specified by:
- getCreationDatein interface- ITMXEntry
 
 - 
getChangerpublic java.lang.String getChanger() Description copied from interface:ITMXEntryGets the author of last change in the entry- Specified by:
- getChangerin interface- ITMXEntry
 
 - 
getChangeDatepublic long getChangeDate() Description copied from interface:ITMXEntryGets the EPOCH timestamp for last change in this entry- Specified by:
- getChangeDatein interface- ITMXEntry
 
 - 
getNotepublic java.lang.String getNote() Description copied from interface:ITMXEntryGets text note (markup <note> in TMX format)
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalsTranslationpublic boolean equalsTranslation(TMXEntry other) Two TMXEntrys are considered interchangeable if this method returns true, even if equals() != true.
 - 
hasPropertiespublic boolean hasProperties() We only hold origin property in TMXEntry.- Specified by:
- hasPropertiesin interface- ITMXEntry
- Returns:
- true when has origin property, otherwise false.
 
 - 
getPropValuepublic java.lang.String getPropValue(java.lang.String propType) Return origin property when requested.- Specified by:
- getPropValuein interface- ITMXEntry
- Parameters:
- propType- property type. Currently we just support origin.
- Returns:
- mtsource when requested, otherwise null.
 
 - 
hasPropValuepublic boolean hasPropValue(java.lang.String propType, java.lang.String propValue)Query specified property type/value combination.- Specified by:
- hasPropValuein interface- ITMXEntry
- Parameters:
- propType- property type.
- propValue- expected value.
- Returns:
- true when hold a queried type/value, otherwise false.
 
 - 
getPropertiespublic java.util.List<TMXProp> getProperties() return properties.- Specified by:
- getPropertiesin interface- ITMXEntry
- Returns:
- singletonList of mtsource when it has, otherwise null.
 
 
- 
 
-