Package org.craftercms.engine.model
Class Dom4jNodeModel
- java.lang.Object
-
- org.craftercms.engine.model.Dom4jNodeModel
-
- All Implemented Interfaces:
freemarker.template.AdapterTemplateModel
,freemarker.template.TemplateHashModel
,freemarker.template.TemplateModel
,freemarker.template.TemplateNodeModel
,freemarker.template.TemplateScalarModel
,freemarker.template.TemplateSequenceModel
public class Dom4jNodeModel extends Object implements freemarker.template.TemplateNodeModel, freemarker.template.TemplateSequenceModel, freemarker.template.TemplateHashModel, freemarker.template.AdapterTemplateModel, freemarker.template.TemplateScalarModel
Freemarker template model for Dom4jNode
s.- Author:
- Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description Dom4jNodeModel(org.dom4j.Node node, freemarker.template.ObjectWrapper wrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description freemarker.template.TemplateModel
get(int index)
freemarker.template.TemplateModel
get(String key)
Object
getAdaptedObject(Class hint)
String
getAsString()
freemarker.template.TemplateSequenceModel
getChildNodes()
String
getNodeName()
String
getNodeNamespace()
String
getNodeType()
freemarker.template.TemplateNodeModel
getParentNode()
boolean
isEmpty()
int
size()
-
-
-
Method Detail
-
get
public freemarker.template.TemplateModel get(int index) throws freemarker.template.TemplateModelException
- Specified by:
get
in interfacefreemarker.template.TemplateSequenceModel
- Throws:
freemarker.template.TemplateModelException
-
size
public int size() throws freemarker.template.TemplateModelException
- Specified by:
size
in interfacefreemarker.template.TemplateSequenceModel
- Throws:
freemarker.template.TemplateModelException
-
get
public freemarker.template.TemplateModel get(String key) throws freemarker.template.TemplateModelException
- Specified by:
get
in interfacefreemarker.template.TemplateHashModel
- Throws:
freemarker.template.TemplateModelException
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacefreemarker.template.TemplateHashModel
-
getParentNode
public freemarker.template.TemplateNodeModel getParentNode()
- Specified by:
getParentNode
in interfacefreemarker.template.TemplateNodeModel
-
getChildNodes
public freemarker.template.TemplateSequenceModel getChildNodes() throws freemarker.template.TemplateModelException
- Specified by:
getChildNodes
in interfacefreemarker.template.TemplateNodeModel
- Throws:
freemarker.template.TemplateModelException
-
getNodeName
public String getNodeName()
- Specified by:
getNodeName
in interfacefreemarker.template.TemplateNodeModel
-
getNodeType
public String getNodeType()
- Specified by:
getNodeType
in interfacefreemarker.template.TemplateNodeModel
-
getNodeNamespace
public String getNodeNamespace()
- Specified by:
getNodeNamespace
in interfacefreemarker.template.TemplateNodeModel
-
getAdaptedObject
public Object getAdaptedObject(Class hint)
- Specified by:
getAdaptedObject
in interfacefreemarker.template.AdapterTemplateModel
-
getAsString
public String getAsString() throws freemarker.template.TemplateModelException
- Specified by:
getAsString
in interfacefreemarker.template.TemplateScalarModel
- Throws:
freemarker.template.TemplateModelException
-
-