Package net.sf.okapi.lib.xliff2.core
Class StartFileData
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.InheritedData
-
- net.sf.okapi.lib.xliff2.core.StartFileData
-
- All Implemented Interfaces:
IWithExtAttributes,IWithInheritedData
public class StartFileData extends InheritedData
Represents the information associated with a file element.
-
-
Constructor Summary
Constructors Constructor Description StartFileData(String id)Creates aStartFileDataobject with an optional id.
-
Method Summary
All Methods Instance Methods Concrete 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.StringgetId()Gets the id for this object.StringgetOriginal()Gets the original attribute of this file.booleanhasExtAttribute()Indicates if at least one extension attribute is present.voidsetExtAttributes(ExtAttributes attributes)Sets theExtAttributesobject associated with this object.voidsetId(String id)Sets the id for this object.voidsetOriginal(String original)Sets the original attribute of this file.-
Methods inherited from class net.sf.okapi.lib.xliff2.core.InheritedData
getAnnotatorsRef, getCanResegment, getSourceDir, getTargetDir, getTranslate, setAnnotatorsRef, setCanResegment, setInheritableData, setSourceDir, setTargetDir, setTranslate
-
-
-
-
Constructor Detail
-
StartFileData
public StartFileData(String id)
Creates aStartFileDataobject with an optional id.- Parameters:
id- the id of the file element (should not be null, but we don't throw an exception to allow setting it after creation).
-
-
Method Detail
-
getOriginal
public String getOriginal()
Gets the original attribute of this file.- Returns:
- the original attribute of this file.
-
setOriginal
public void setOriginal(String original)
Sets the original attribute of this file.- Parameters:
original- the new original attribute for this file.
-
setId
public void setId(String id)
Sets the id for this object.- Parameters:
id- the id for this object.
-
getId
public String getId()
Gets the id for this object.- Returns:
- the id for this object.
-
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.
-
-