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
  • 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 interface freemarker.template.TemplateSequenceModel
      Throws:
      freemarker.template.TemplateModelException
    • size

      public int size() throws freemarker.template.TemplateModelException
      Specified by:
      size in interface freemarker.template.TemplateSequenceModel
      Throws:
      freemarker.template.TemplateModelException
    • get

      public freemarker.template.TemplateModel get(String key) throws freemarker.template.TemplateModelException
      Specified by:
      get in interface freemarker.template.TemplateHashModel
      Throws:
      freemarker.template.TemplateModelException
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface freemarker.template.TemplateHashModel
    • getParentNode

      public freemarker.template.TemplateNodeModel getParentNode()
      Specified by:
      getParentNode in interface freemarker.template.TemplateNodeModel
    • getChildNodes

      public freemarker.template.TemplateSequenceModel getChildNodes() throws freemarker.template.TemplateModelException
      Specified by:
      getChildNodes in interface freemarker.template.TemplateNodeModel
      Throws:
      freemarker.template.TemplateModelException
    • getNodeName

      public String getNodeName()
      Specified by:
      getNodeName in interface freemarker.template.TemplateNodeModel
    • getNodeType

      public String getNodeType()
      Specified by:
      getNodeType in interface freemarker.template.TemplateNodeModel
    • getNodeNamespace

      public String getNodeNamespace()
      Specified by:
      getNodeNamespace in interface freemarker.template.TemplateNodeModel
    • getAdaptedObject

      public Object getAdaptedObject(Class hint)
      Specified by:
      getAdaptedObject in interface freemarker.template.AdapterTemplateModel
    • getAsString

      public String getAsString() throws freemarker.template.TemplateModelException
      Specified by:
      getAsString in interface freemarker.template.TemplateScalarModel
      Throws:
      freemarker.template.TemplateModelException