Package helma.framework.demo
Class SimplePathElement
- java.lang.Object
-
- helma.framework.demo.SimplePathElement
-
- All Implemented Interfaces:
IPathElement
public class SimplePathElement extends java.lang.Object implements IPathElement
This is an example implementation for the helma.framework.IPathElement interface. It creates any child element which is requested on the fly without ever asking.
-
-
Constructor Summary
Constructors Constructor Description SimplePathElement()
Constructor for the root element.SimplePathElement(java.lang.String n, IPathElement p)
Constructor for non-root elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPathElement
getChildElement(java.lang.String n)
Returns a child element for this object, creating it on the fly.java.lang.String
getElementName()
Returns the element name to be used for this object.IPathElement
getParentElement()
Returns this object's parent elementjava.lang.String
getPrototype()
Returns the name of the scripting prototype to be used for this object.java.lang.String
toString()
Returns a string representation of this element.
-
-
-
Constructor Detail
-
SimplePathElement
public SimplePathElement()
Constructor for the root element.
-
SimplePathElement
public SimplePathElement(java.lang.String n, IPathElement p)
Constructor for non-root elements.
-
-
Method Detail
-
getChildElement
public IPathElement getChildElement(java.lang.String n)
Returns a child element for this object, creating it on the fly.- Specified by:
getChildElement
in interfaceIPathElement
-
getParentElement
public IPathElement getParentElement()
Returns this object's parent element- Specified by:
getParentElement
in interfaceIPathElement
-
getElementName
public java.lang.String getElementName()
Returns the element name to be used for this object.- Specified by:
getElementName
in interfaceIPathElement
-
getPrototype
public java.lang.String getPrototype()
Returns the name of the scripting prototype to be used for this object. This will be "root" for the root element and "hopobject for everything else.- Specified by:
getPrototype
in interfaceIPathElement
-
toString
public java.lang.String toString()
Returns a string representation of this element.- Overrides:
toString
in classjava.lang.Object
-
-