Class 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.
    • Field Detail

      • source

        public final java.lang.String source
      • translation

        public final java.lang.String translation
      • changer

        public final java.lang.String changer
      • changeDate

        public final long changeDate
      • creator

        public final java.lang.String creator
      • creationDate

        public final long creationDate
      • note

        public final java.lang.String note
      • defaultTranslation

        public final boolean defaultTranslation
      • origin

        public final java.lang.String origin
    • Method Detail

      • getCreator

        public java.lang.String getCreator()
        Description copied from interface: ITMXEntry
        Gets the initial creator of the entry
        Specified by:
        getCreator in interface ITMXEntry
      • getCreationDate

        public long getCreationDate()
        Description copied from interface: ITMXEntry
        Gets the initial creation date as an EPOCH timestamp
        Specified by:
        getCreationDate in interface ITMXEntry
      • getChanger

        public java.lang.String getChanger()
        Description copied from interface: ITMXEntry
        Gets the author of last change in the entry
        Specified by:
        getChanger in interface ITMXEntry
      • getChangeDate

        public long getChangeDate()
        Description copied from interface: ITMXEntry
        Gets the EPOCH timestamp for last change in this entry
        Specified by:
        getChangeDate in interface ITMXEntry
      • getNote

        public java.lang.String getNote()
        Description copied from interface: ITMXEntry
        Gets text note (markup <note> in TMX format)
        Specified by:
        getNote in interface ITMXEntry
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equalsTranslation

        public boolean equalsTranslation​(TMXEntry other)
        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:
        hasProperties in interface ITMXEntry
        Returns:
        true when has origin property, otherwise false.
      • getPropValue

        public java.lang.String getPropValue​(java.lang.String propType)
        Return origin property when requested.
        Specified by:
        getPropValue in interface ITMXEntry
        Parameters:
        propType - property type. Currently we just support origin.
        Returns:
        mtsource when requested, otherwise null.
      • hasPropValue

        public boolean hasPropValue​(java.lang.String propType,
                                    java.lang.String propValue)
        Query specified property type/value combination.
        Specified by:
        hasPropValue in interface ITMXEntry
        Parameters:
        propType - property type.
        propValue - expected value.
        Returns:
        true when hold a queried type/value, otherwise false.
      • getProperties

        public java.util.List<TMXProp> getProperties()
        return properties.
        Specified by:
        getProperties in interface ITMXEntry
        Returns:
        singletonList of mtsource when it has, otherwise null.