Class PElement

java.lang.Object
org.mapfish.print.wrapper.PElement
Direct Known Subclasses:
PAbstractObject, PJsonArray, PYamlArray

public abstract class PElement extends Object
Common parent class for the Json and Yaml wrappers.
  • Constructor Details

    • PElement

      protected PElement(PElement parent, String contextName)
      Constructor.
      Parameters:
      parent - the parent element
      contextName - the field name of this element in the parent.
  • Method Details

    • getPath

      public final String getPath(String key)
      Gets the string representation of the path to the current JSON element.
      Parameters:
      key - the leaf key
    • getContextName

      protected final String getContextName()
    • getCurrentPath

      public final String getCurrentPath()
      Gets the string representation of the path to the current JSON element.
    • addPathTo

      protected final void addPathTo(StringBuilder result)
      Append the path to the StringBuilder.
      Parameters:
      result - the string builder to add the path to.
    • getParent

      public final PElement getParent()