Class POMDocument

java.lang.Object
io.codemodder.plugins.maven.operator.POMDocument

public class POMDocument extends Object
Data Class to Keep track of an entire POM File, including:

Path (pomPath)

DOM Contents (pomDocument) - original DOM Contents (resultPom) - modified

Charset (ditto) Indent (ditto) Preamble (ditto) Suffix (ditto) Line Endings (endl)

Original Content (originalPom) Modified Content (resultPomBytes)

  • Constructor Details

    • POMDocument

      public POMDocument(byte[] originalPom, URL pomPath, org.dom4j.Document pomDocument) throws URISyntaxException
      Constructs a new `POMDocument` with the specified original POM bytes, path (if available), and DOM contents.
      Parameters:
      originalPom - The byte array representing the original content of the POM.
      pomPath - The URL or file path to the POM.
      pomDocument - The DOM (Document Object Model) representation of the POM.
      Throws:
      URISyntaxException - If there is an issue with the provided URL.
    • POMDocument

      public POMDocument(byte[] originalPom, org.dom4j.Document pomDocument) throws URISyntaxException
      Constructs a new `POMDocument` with the specified original POM bytes and DOM contents.
      Parameters:
      originalPom - The byte array representing the original content of the POM.
      pomDocument - The DOM (Document Object Model) representation of the POM.
      Throws:
      URISyntaxException - If there is an issue with the provided URL.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDirty

      public boolean getDirty()
    • getOriginalPom

      public byte[] getOriginalPom()
    • setOriginalPom

      public void setOriginalPom(byte[] originalPom)
    • getPomPath

      public URL getPomPath()
    • setPomPath

      public void setPomPath(URL pomPath)
    • getPomDocument

      public org.dom4j.Document getPomDocument()
    • setPomDocument

      public void setPomDocument(org.dom4j.Document pomDocument)
    • getResultPom

      public org.dom4j.Document getResultPom()
    • setResultPom

      public void setResultPom(org.dom4j.Document resultPom)
    • getPath

      public Path getPath()
    • setPath

      public void setPath(Path file)
    • getCharset

      public Charset getCharset()
    • setCharset

      public void setCharset(Charset charset)
    • getEndl

      public String getEndl()
    • setEndl

      public void setEndl(String endl)
    • getIndent

      public String getIndent()
    • setIndent

      public void setIndent(String indent)
    • getResultPomBytes

      public byte[] getResultPomBytes()
    • setResultPomBytes

      public void setResultPomBytes(byte[] resultPomBytes)
    • getPreamble

      public String getPreamble()
    • setPreamble

      public void setPreamble(String preamble)
    • getSuffix

      public String getSuffix()
    • setSuffix

      public void setSuffix(String suffix)
    • isDirty

      public boolean isDirty()
    • setDirty

      public void setDirty(boolean dirty)