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 Dom4j
Node
s.- Author:
- Alfonso Vásquez
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
Fields inherited from interface freemarker.template.TemplateScalarModel
EMPTY_STRING
-
Constructor Summary
ConstructorsConstructorDescriptionDom4jNodeModel
(org.dom4j.Node node, freemarker.template.ObjectWrapper wrapper) -
Method Summary
Modifier and TypeMethodDescriptionfreemarker.template.TemplateModel
get
(int index) freemarker.template.TemplateModel
getAdaptedObject
(Class hint) freemarker.template.TemplateSequenceModel
freemarker.template.TemplateNodeModel
boolean
isEmpty()
int
size()
-
Constructor Details
-
Dom4jNodeModel
public Dom4jNodeModel(org.dom4j.Node node, freemarker.template.ObjectWrapper wrapper)
-
-
Method Details
-
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
- Specified by:
getNodeName
in interfacefreemarker.template.TemplateNodeModel
-
getNodeType
- Specified by:
getNodeType
in interfacefreemarker.template.TemplateNodeModel
-
getNodeNamespace
- Specified by:
getNodeNamespace
in interfacefreemarker.template.TemplateNodeModel
-
getAdaptedObject
- Specified by:
getAdaptedObject
in interfacefreemarker.template.AdapterTemplateModel
-
getAsString
- Specified by:
getAsString
in interfacefreemarker.template.TemplateScalarModel
- Throws:
freemarker.template.TemplateModelException
-