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
Nodes.- Author:
- Alfonso Vásquez
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHINGFields 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.TemplateModelget(int index) freemarker.template.TemplateModelgetAdaptedObject(Class hint) freemarker.template.TemplateSequenceModelfreemarker.template.TemplateNodeModelbooleanisEmpty()intsize()
-
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:
getin interfacefreemarker.template.TemplateSequenceModel- Throws:
freemarker.template.TemplateModelException
-
size
public int size() throws freemarker.template.TemplateModelException- Specified by:
sizein interfacefreemarker.template.TemplateSequenceModel- Throws:
freemarker.template.TemplateModelException
-
get
public freemarker.template.TemplateModel get(String key) throws freemarker.template.TemplateModelException - Specified by:
getin interfacefreemarker.template.TemplateHashModel- Throws:
freemarker.template.TemplateModelException
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacefreemarker.template.TemplateHashModel
-
getParentNode
public freemarker.template.TemplateNodeModel getParentNode()- Specified by:
getParentNodein interfacefreemarker.template.TemplateNodeModel
-
getChildNodes
public freemarker.template.TemplateSequenceModel getChildNodes() throws freemarker.template.TemplateModelException- Specified by:
getChildNodesin interfacefreemarker.template.TemplateNodeModel- Throws:
freemarker.template.TemplateModelException
-
getNodeName
- Specified by:
getNodeNamein interfacefreemarker.template.TemplateNodeModel
-
getNodeType
- Specified by:
getNodeTypein interfacefreemarker.template.TemplateNodeModel
-
getNodeNamespace
- Specified by:
getNodeNamespacein interfacefreemarker.template.TemplateNodeModel
-
getAdaptedObject
- Specified by:
getAdaptedObjectin interfacefreemarker.template.AdapterTemplateModel
-
getAsString
- Specified by:
getAsStringin interfacefreemarker.template.TemplateScalarModel- Throws:
freemarker.template.TemplateModelException
-