java.lang.Object
java.lang.Record
org.odpi.openmetadata.adapters.connectors.surveyaction.surveyfolder.layout.PathViolation
Record Components:
violationType - the kind of violation
offendingPath - path of the file or directory that breaks the layout, relative to the directory that was checked. For a missing file or directory, this is the directory where it is missing (an empty string for the checked directory itself).
expectedPattern - the name pattern (or patterns) expected at the offending path

public record PathViolation(PathViolationType violationType, String offendingPath, String expectedPattern) extends Record
PathViolation describes one place where a directory tree breaks its layout.
  • Constructor Details

    • PathViolation

      public PathViolation(PathViolationType violationType, String offendingPath, String expectedPattern)
      Creates an instance of a PathViolation record class.
      Parameters:
      violationType - the value for the violationType record component
      offendingPath - the value for the offendingPath record component
      expectedPattern - the value for the expectedPattern record component
  • Method Details

    • getDescription

      public String getDescription()
      Return a description of the violation.
      Returns:
      text
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • violationType

      public PathViolationType violationType()
      Returns the value of the violationType record component.
      Returns:
      the value of the violationType record component
    • offendingPath

      public String offendingPath()
      Returns the value of the offendingPath record component.
      Returns:
      the value of the offendingPath record component
    • expectedPattern

      public String expectedPattern()
      Returns the value of the expectedPattern record component.
      Returns:
      the value of the expectedPattern record component