Class OutputPattern

java.lang.Object
repast.simphony.batch.ssh.OutputPattern

public class OutputPattern extends Object
Encapsulates the configuration data for an output pattern.
Author:
Nick Collier
  • Constructor Details

    • OutputPattern

      public OutputPattern()
  • Method Details

    • getPattern

      public String getPattern()
      Gets file matching pattern.
      Returns:
      the pattern
    • setPattern

      public void setPattern(String pattern)
      Sets the glob style pattern for file matching.
      • The * character matches zero or more characters of a name component without crossing directory boundaries.
      • The ** characters matches zero or more characters crossing directory boundaries.
      • The ? character matches exactly one character of a name component.
      • The backslash character (\) is used to escape characters that would otherwise be interpreted as special characters. The expression \\ matches a single backslash and "\{" matches a left brace for example.
      For example **/output/my_output.txt will match any file called my_output.txt in an "output" directory where the parent of that "output" directory can be anything.
      Parameters:
      pattern - the pattern to set
    • getPath

      public String getPath()
      Gets the path where the found output will be written to. If concatenate is true, then those files will be concatenated into a file with the specified path name. Otherwise, all the found files will be copied into a directory with the specified path name.
      Returns:
      the path
    • setPath

      public void setPath(String path)
      Sets the path for the found output to be written to. If concatenate is true, then those files will be concatenated into a file with the specified path name. Otherwise, all the found files will be copied into a directory with the specified path name.
      Parameters:
      path - the path to set
    • isConcatenate

      public boolean isConcatenate()
      Returns:
      true if the files that match the pattern should be concatenated into a single output, otherwise false.
    • setConcatenate

      public void setConcatenate(boolean concatenate)
      Sets whether or not to concatenate the files that match pattern.
      Parameters:
      concatenate - the concatenate to set
    • isHeader

      public boolean isHeader()
      Returns:
      true if the files matching the pattern will have a header otherwise false.
    • setHeader

      public void setHeader(boolean header)
      Sets whether or not the files that match the pattern will have a header.
      Parameters:
      header - the header to set
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object