Package org.l2x6.cq

Class PomTransformer.TransformationContext

    • Constructor Detail

      • TransformationContext

        public TransformationContext​(Path pomXmlPath,
                                     Document document,
                                     String indentationString,
                                     XPath xPath)
    • Method Detail

      • getPomXmlPath

        public Path getPomXmlPath()
        Returns:
        the path to the pom.xml file that is being transformed
      • getXPath

        public XPath getXPath()
        Returns:
        an XPath instance that can be used for querying the DOM of the transformed pom.xml file
      • indent

        public Text indent​(int indentCount)
        Parameters:
        indentCount - how many times to concatenate the indentationString
        Returns:
        a new indentation node containing a newline and indentCount times concatenated indentationString
      • newLine

        public Text newLine()
        Returns:
        a newly created text node having single newline \n as its content.
      • isEmptyLineNode

        public static boolean isEmptyLineNode​(Node node)
      • isWhiteSpaceNode

        public static boolean isWhiteSpaceNode​(Node node)
      • getDependencies

        public Set<Gavtcs> getDependencies()
      • removeDependency

        public void removeDependency​(Gavtcs removedDependency,
                                     boolean removePrecedingComments,
                                     boolean removePrecedingWhitespace)
      • addDependencyIfNeeded

        public void addDependencyIfNeeded​(Gavtcs gavtcs,
                                          Comparator<Gavtcs> comparator)
      • removeNode

        public void removeNode​(String xPathExpression,
                               boolean removePrecedingComments,
                               boolean removePrecedingWhitespace,
                               boolean onlyIfEmpty)
      • hasElementChildren

        public static boolean hasElementChildren​(Node node)