Package org.mapfish.print.wrapper
Class PElement
- java.lang.Object
-
- org.mapfish.print.wrapper.PElement
-
- Direct Known Subclasses:
PAbstractObject
,PJsonArray
,PYamlArray
public abstract class PElement extends java.lang.Object
Common parent class for the Json and Yaml wrappers.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPathTo(java.lang.StringBuilder result)
Append the path to the StringBuilder.protected java.lang.String
getContextName()
java.lang.String
getCurrentPath()
Gets the string representation of the path to the current JSON element.PElement
getParent()
java.lang.String
getPath(java.lang.String key)
Gets the string representation of the path to the current JSON element.
-
-
-
Constructor Detail
-
PElement
protected PElement(PElement parent, java.lang.String contextName)
Constructor.- Parameters:
parent
- the parent elementcontextName
- the field name of this element in the parent.
-
-
Method Detail
-
getPath
public final java.lang.String getPath(java.lang.String key)
Gets the string representation of the path to the current JSON element.- Parameters:
key
- the leaf key
-
getContextName
protected final java.lang.String getContextName()
-
getCurrentPath
public final java.lang.String getCurrentPath()
Gets the string representation of the path to the current JSON element.
-
addPathTo
protected final void addPathTo(java.lang.StringBuilder result)
Append the path to the StringBuilder.- Parameters:
result
- the string builder to add the path to.
-
getParent
public final PElement getParent()
-
-