Class TidyJsonItemWriter

    • Constructor Summary

      Constructors 
      Constructor Description
      TidyJsonItemWriter​(java.util.Set<java.lang.String> propertyNamesToIgnore)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump​(javax.jcr.NodeIterator it, java.io.Writer out)
      Dump all Nodes of given NodeIterator in JSON
      void dump​(javax.jcr.NodeIterator it, JSONWriter w)
      Dump all Nodes of given NodeIterator in JSON
      void dump​(javax.jcr.Node node, java.io.Writer w, int maxRecursionLevels)
      Dump given node in JSON, optionally recursing into its child nodes
      void dump​(javax.jcr.Node node, JSONWriter w, int maxRecursionLevels)
      Dump given node in JSON, optionally recursing into its child nodes
      void dump​(javax.jcr.Property p, java.io.Writer w)
      Dump given property in JSON
      void dump​(javax.jcr.Property p, JSONWriter w)
      Dump the property in JSON
      boolean isTidy()
      Checks if the output is nicely formatted.
      void setTidy​(boolean tidy)
      Controls if output should be nicely formatted.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TidyJsonItemWriter

        public TidyJsonItemWriter​(java.util.Set<java.lang.String> propertyNamesToIgnore)
        Constructor
        Parameters:
        propertyNamesToIgnore - See javadoc of constructor of JsonItemWriter
    • Method Detail

      • isTidy

        public boolean isTidy()
        Checks if the output is nicely formatted.
        Returns:
        true if nicely formatted
      • setTidy

        public void setTidy​(boolean tidy)
        Controls if output should be nicely formatted.
        Parameters:
        tidy - true to nicely format.
      • dump

        public void dump​(javax.jcr.Node node,
                         JSONWriter w,
                         int maxRecursionLevels)
                  throws javax.jcr.RepositoryException,
                         JSONException
        Dump given node in JSON, optionally recursing into its child nodes
        Parameters:
        node - node to dump
        w - JSONWriter
        maxRecursionLevels - max recursion level
        Throws:
        javax.jcr.RepositoryException - if some error occurs
        JSONException - if some error occurs
      • dump

        public void dump​(javax.jcr.Node node,
                         java.io.Writer w,
                         int maxRecursionLevels)
                  throws javax.jcr.RepositoryException,
                         JSONException
        Dump given node in JSON, optionally recursing into its child nodes
        Overrides:
        dump in class JsonItemWriter
        Throws:
        javax.jcr.RepositoryException
        JSONException
      • dump

        public void dump​(javax.jcr.NodeIterator it,
                         JSONWriter w)
                  throws javax.jcr.RepositoryException,
                         JSONException
        Dump all Nodes of given NodeIterator in JSON
        Parameters:
        it - NodeIterator
        w - JSONWriter
        Throws:
        javax.jcr.RepositoryException - if some error occurs
        JSONException - if some error occurs
      • dump

        public void dump​(javax.jcr.NodeIterator it,
                         java.io.Writer out)
                  throws javax.jcr.RepositoryException,
                         JSONException
        Dump all Nodes of given NodeIterator in JSON
        Overrides:
        dump in class JsonItemWriter
        Throws:
        JSONException
        javax.jcr.RepositoryException
      • dump

        public void dump​(javax.jcr.Property p,
                         JSONWriter w)
                  throws JSONException,
                         javax.jcr.RepositoryException
        Dump the property in JSON
        Parameters:
        p - property to dump
        w - JSONWriter
        Throws:
        javax.jcr.RepositoryException - if some error occurs
        JSONException - if some error occurs
      • dump

        public void dump​(javax.jcr.Property p,
                         java.io.Writer w)
                  throws JSONException,
                         javax.jcr.ValueFormatException,
                         javax.jcr.RepositoryException
        Dump given property in JSON
        Overrides:
        dump in class JsonItemWriter
        Throws:
        JSONException
        javax.jcr.ValueFormatException
        javax.jcr.RepositoryException