Package net.sf.okapi.lib.xliff2.core
Class DataWithExtAttributes
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
-
- All Implemented Interfaces:
IWithExtAttributes
- Direct Known Subclasses:
Definition,ExtElement,Item,Note,StartXliffData,Tag,Term,Translation
public class DataWithExtAttributes extends Object implements IWithExtAttributes
Implements theIWithExtAttributesinterface.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDataWithExtAttributes()Creates an emptyDataWithExtAttributesobject.protectedDataWithExtAttributes(DataWithExtAttributes original)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Indicates if this object is equals to a given one.ExtAttributesgetExtAttributes()Gets theExtAttributesobject for the parent object.StringgetExtAttributeValue(String namespaceURI, String localName)Gets the value for a given extension attribute.booleanhasExtAttribute()Indicates if at least one extension attribute is present.inthashCode()voidsetExtAttributes(ExtAttributes attributes)Sets theExtAttributesobject associated with this object.
-
-
-
Constructor Detail
-
DataWithExtAttributes
protected DataWithExtAttributes()
Creates an emptyDataWithExtAttributesobject.
-
DataWithExtAttributes
protected DataWithExtAttributes(DataWithExtAttributes original)
Copy constructor.- Parameters:
original- the original object to duplicate.
-
-
Method Detail
-
setExtAttributes
public void setExtAttributes(ExtAttributes attributes)
Description copied from interface:IWithExtAttributesSets theExtAttributesobject associated with this object.- Specified by:
setExtAttributesin interfaceIWithExtAttributes- Parameters:
attributes- theExtAttributesobject associated with this object. If null, a newExtAttributesobject is created.
-
getExtAttributes
public ExtAttributes getExtAttributes()
Description copied from interface:IWithExtAttributesGets theExtAttributesobject for the parent object. If none exists, one is created.- Specified by:
getExtAttributesin interfaceIWithExtAttributes- Returns:
- the
ExtAttributesobject for the parent object, never null.
-
hasExtAttribute
public boolean hasExtAttribute()
Description copied from interface:IWithExtAttributesIndicates if at least one extension attribute is present.- Specified by:
hasExtAttributein interfaceIWithExtAttributes- Returns:
- true if at least one extension attribute is present; false otherwise.
-
getExtAttributeValue
public String getExtAttributeValue(String namespaceURI, String localName)
Description copied from interface:IWithExtAttributesGets the value for a given extension attribute.- Specified by:
getExtAttributeValuein interfaceIWithExtAttributes- Parameters:
namespaceURI- the URI of the namespace for the attribute.localName- the name of the attribute.- Returns:
- the value of the extension attribute, or null if it does not exist.
-
equals
public boolean equals(Object other)
Indicates if this object is equals to a given one.
-
-