Class InsertRegExGroups

Object
AnchorBean<DerivePath>
DerivePath
InsertRegExGroups

public class InsertRegExGroups extends DerivePath
Generates an out string where $digit$ is replaced with the #digit group from a regex
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    InsertRegExGroups(RegEx regEx, String outPath)
    Creates a new InsertRegExGroups instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    deriveFrom(Path source, boolean debugMode)
     
    Constructs a path as an output, replacing $1, $2 etc.
    RegEx
    The regular-expression to use for matching groups.
    void
    setOutPath(String outPath)
    Constructs a path as an output, replacing $1, $2 etc.
    void
    setRegEx(RegEx regEx)
    The regular-expression to use for matching groups.
    void
    The regular-expression to use for matching groups, overloaded to handle legacy situations where a string is supplied.

    Methods inherited from class org.anchoranalysis.io.input.bean.path.DerivePath

    deriveFrom

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InsertRegExGroups

      public InsertRegExGroups()
    • InsertRegExGroups

      public InsertRegExGroups(RegEx regEx, String outPath)
      Creates a new InsertRegExGroups instance.
      Parameters:
      regEx - The regular-expression to use for matching groups.
      outPath - Constructs a path as an output, replacing $1, $2 etc. with the respective group from the matched regular-expression.
  • Method Details

    • deriveFrom

      public Path deriveFrom(Path source, boolean debugMode) throws DerivePathException
      Specified by:
      deriveFrom in class DerivePath
      Throws:
      DerivePathException
    • setRegExString

      public void setRegExString(String regEx)
      The regular-expression to use for matching groups, overloaded to handle legacy situations where a string is supplied.
    • setRegEx

      public void setRegEx(RegEx regEx)
      The regular-expression to use for matching groups.
    • getRegEx

      public RegEx getRegEx()
      The regular-expression to use for matching groups.
    • getOutPath

      public String getOutPath()
      Constructs a path as an output, replacing $1, $2 etc. with the respective group from the matched regular-expression.
    • setOutPath

      public void setOutPath(String outPath)
      Constructs a path as an output, replacing $1, $2 etc. with the respective group from the matched regular-expression.