Package net.sf.okapi.lib.xliff2.core
Class ExtContent
- java.lang.Object
-
- net.sf.okapi.lib.xliff2.core.ExtContent
-
- All Implemented Interfaces:
IExtChild
public class ExtContent extends Object implements IExtChild
Represents an extension content object: aIExtChildobject of typeExtChildType.TEXTorExtChildType.CDATA.
-
-
Constructor Summary
Constructors Constructor Description ExtContent(String text)Creates a newExtContentobject.ExtContent(String text, boolean cdata)Creates a newExtContentobject in CDATA mode or not.ExtContent(ExtContent original)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCData()Indicates if the content is to be represented as CDATA.StringgetText()Gets the content.ExtChildTypegetType()Gets the type of child this object is (one of theExtChildTypevalues).voidsetCData(boolean cdata)Sets the flag indicating if the content is to be represented as CDATA.voidsetText(String text)Sets the content.
-
-
-
Constructor Detail
-
ExtContent
public ExtContent(ExtContent original)
Copy constructor.- Parameters:
original- the original object to duplicate.
-
ExtContent
public ExtContent(String text)
Creates a newExtContentobject.- Parameters:
text- the text of the content.
-
ExtContent
public ExtContent(String text, boolean cdata)
Creates a newExtContentobject in CDATA mode or not.- Parameters:
text- the text of the content.cdata- true if the content should be written in a CDATA section, false otherwise.
-
-
Method Detail
-
getType
public ExtChildType getType()
Description copied from interface:IExtChildGets the type of child this object is (one of theExtChildTypevalues).
-
getCData
public boolean getCData()
Indicates if the content is to be represented as CDATA.- Returns:
- true if the content is to be represented as CDATA, false otherwise.
-
setCData
public void setCData(boolean cdata)
Sets the flag indicating if the content is to be represented as CDATA.- Parameters:
cdata- true to represent the content as CDATA.
-
getText
public String getText()
Gets the content.- Returns:
- the content.
-
setText
public void setText(String text)
Sets the content.- Parameters:
text- the new content.
-
-