Class DefaultRewriteContentHandler

    • Constructor Detail

      • DefaultRewriteContentHandler

        public DefaultRewriteContentHandler()
    • Method Detail

      • rewriteElement

        public List<org.jdom2.Content> rewriteElement​(@NotNull
                                                      @NotNull org.jdom2.Element element)
        Checks if the given element has to be rewritten. Is called for every child single element of the parent given to rewriteContent method.
        Specified by:
        rewriteElement in interface RewriteContentHandler
        Parameters:
        element - Element to check
        Returns:
        null if nothing is to do with this element. Return empty list to remove this element. Return list with other content to replace element with new content.
      • rewriteText

        public List<org.jdom2.Content> rewriteText​(@NotNull
                                                   @NotNull org.jdom2.Text text)
        Description copied from interface: RewriteContentHandler
        Checks if the given text node has to be rewritten. Is called for every text node found as parent of given to rewriteContent method.
        Specified by:
        rewriteText in interface RewriteContentHandler
        Parameters:
        text - Text node
        Returns:
        null if nothing is to do with this element. Return empty list to remove the element. Return list with other content to replace element with new content.