Package net.sf.okapi.lib.xliff2.glossary
Class Translation
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
-
- net.sf.okapi.lib.xliff2.glossary.Translation
-
- All Implemented Interfaces:
IWithExtAttributes
public class Translation extends DataWithExtAttributes
Represents the <translation> element Glossary module.
-
-
Constructor Summary
Constructors Constructor Description Translation(String text)Creates aTranslationobject with a given text.Translation(Translation original)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Indicates if this object is equals to a given one.StringgetId()Gets the id for this translation.StringgetRef()Gets the reference for this translation.StringgetSource()Gets the source of this field.StringgetText()Get the text of this field.inthashCode()voidsetId(String id)Sets the id for this translation.voidsetRef(String ref)Sets the reference for this translation.voidsetSource(String source)sets the source of this field.voidsetText(String text)Sets the text of this field.-
Methods inherited from class net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
getExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributes
-
-
-
-
Constructor Detail
-
Translation
public Translation(String text)
Creates aTranslationobject with a given text.- Parameters:
text- the text of the translation.
-
Translation
public Translation(Translation original)
Copy constructor.- Parameters:
original- the original object to duplicate.
-
-
Method Detail
-
getId
public String getId()
Gets the id for this translation.- Returns:
- the id for this translation (can be null).
-
setId
public void setId(String id)
Sets the id for this translation.- Parameters:
id- the new id for this translation (can be null).
-
getRef
public String getRef()
Gets the reference for this translation.- Returns:
- the reference for this translation (can be null).
-
setRef
public void setRef(String ref)
Sets the reference for this translation.- Parameters:
ref- the new reference for this translation.
-
getText
public String getText()
Get the text of this field.- Returns:
- the text of this field (can be null).
-
setText
public void setText(String text)
Sets the text of this field.- Parameters:
text- the new text of this field (can be null).
-
getSource
public String getSource()
Gets the source of this field.- Returns:
- the source of this field (can be null).
-
setSource
public void setSource(String source)
sets the source of this field.- Parameters:
source- the new source of this field (can be null).
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDataWithExtAttributes
-
equals
public boolean equals(Object obj)
Description copied from class:DataWithExtAttributesIndicates if this object is equals to a given one.- Overrides:
equalsin classDataWithExtAttributes- Parameters:
obj- the other object to compare.- Returns:
- true if the two objects are identical.
-
-