Package net.sf.okapi.lib.xliff2.core
Interface IWithExtAttributes
-
- All Known Implementing Classes:
CTag,DataWithExtAttributes,Definition,ExtElement,GlossEntry,Item,Match,MTag,Note,Notes,Revision,Revisions,Rule,StartFileData,StartGroupData,StartXliffData,Tag,Term,TermTag,Translation,Unit,Validation
public interface IWithExtAttributesProvides a common interface to all objects that can have extension attributes.- See Also:
ExtAttributes,ExtAttribute
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.voidsetExtAttributes(ExtAttributes attributes)Sets theExtAttributesobject associated with this object.
-
-
-
Method Detail
-
getExtAttributes
ExtAttributes getExtAttributes()
Gets theExtAttributesobject for the parent object. If none exists, one is created.- Returns:
- the
ExtAttributesobject for the parent object, never null.
-
setExtAttributes
void setExtAttributes(ExtAttributes attributes)
Sets theExtAttributesobject associated with this object.- Parameters:
attributes- theExtAttributesobject associated with this object. If null, a newExtAttributesobject is created.
-
hasExtAttribute
boolean hasExtAttribute()
Indicates if at least one extension attribute is present.- Returns:
- true if at least one extension attribute is present; false otherwise.
-
getExtAttributeValue
String getExtAttributeValue(String namespaceURI, String localName)
Gets the value for a given extension attribute.- 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.
-
-