Class Item
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
-
- net.sf.okapi.lib.xliff2.changeTracking.Item
-
- All Implemented Interfaces:
IWithExtAttributes
public class Item extends DataWithExtAttributes implements IWithExtAttributes
Represents the<item>element of the Chang e Tracking module.- Author:
- Marta Borriello
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_ATTR_NAMEpropertyattribute name.static StringPROPERTY_CONTENT_VALUEcontentvalue forpropertyattribute.static StringTAG_NAMEThe tag element name constant.
-
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.StringgetAttributesString()Gets the attributes string.StringgetClosingTag()Gets the completeitemclosing tag.StringgetOpeningTagName()Gets the openingitemtag name.StringgetProperty()Gets the value of the property attribute.StringgetText()Gets the contained text.inthashCode()voidsetProperty(String property)Sets the value of the property attribute.voidsetText(String text)Sets the contained text.-
Methods inherited from class net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
getExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributes
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.lib.xliff2.core.IWithExtAttributes
getExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributes
-
-
-
-
Field Detail
-
TAG_NAME
public static final String TAG_NAME
The tag element name constant.- See Also:
- Constant Field Values
-
PROPERTY_CONTENT_VALUE
public static final String PROPERTY_CONTENT_VALUE
contentvalue forpropertyattribute.- See Also:
- Constant Field Values
-
PROPERTY_ATTR_NAME
public static final String PROPERTY_ATTR_NAME
propertyattribute name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Item
public Item()
Creates a newItemobject.
-
Item
public Item(Item original)
Copy constructor- Parameters:
original- the original object to duplicate.
-
Item
public Item(String property)
Constructor.- Parameters:
property- the value for the REQUIRED attributeproperty.- See Also:
setProperty(String)
-
-
Method Detail
-
setText
public void setText(String text)
Sets the contained text.- Parameters:
text- the contained text.
-
getText
public String getText()
Gets the contained text.- Returns:
- the contained text.
-
setProperty
public final void setProperty(String property)
Sets the value of the property attribute. The value MUST be eithercontentto signify the content of an element, or the name of the attribute relating to the revision data. If either anullor an empty string is provided, anIllegalArgumentExceptionis thrown.- Parameters:
property- the value of the property attribute.
-
getProperty
public String getProperty()
Gets the value of the property attribute.- Returns:
- the value of the property attribute.
-
getAttributesString
public String getAttributesString()
Gets the attributes string.- Returns:
- the attributes string.
-
getOpeningTagName
public String getOpeningTagName()
Gets the openingitemtag name.- Returns:
- the opening
itemtag name.
-
getClosingTag
public String getClosingTag()
Gets the completeitemclosing tag.- Returns:
- the complete
itemclosing tag.
-
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.
-
-