java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_base.external.seals.MatcherSealsBuilder

public class MatcherSealsBuilder extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • sealsClientJar

      private File sealsClientJar
      Path to the JAR of the SEALS client.
    • tmpFolder

      private File tmpFolder
      Path to a temporary folder. Default is set to the systems tmp.
    • timeout

      private long timeout
      Time out for the external seals process. The timeout is applied for each testcase and not track.
    • timeoutTimeUnit

      private TimeUnit timeoutTimeUnit
      Time unit for the process time out.
    • javaRuntimeParameters

      private List<String> javaRuntimeParameters
      The parameters that appear between java [parameters] -jar. Example: ("-Xmx25g", "-Xms15g").
    • freshMatcherInstance

      private boolean freshMatcherInstance
      If true, the original matcher folder is untouched and the folder is copied. Some matchers require this, because the do not close some resources.
    • doNotUseInputAlignment

      private boolean doNotUseInputAlignment
      If true, the input alignment is not passed to SEALS even if one is provided.
    • javaCommand

      private String javaCommand
      The command to start java in the terminal. Typically, this is "java" Seals needs java version 1.8
  • Constructor Details

    • MatcherSealsBuilder

      public MatcherSealsBuilder()
  • Method Details

    • setSealsClientJar

      public MatcherSealsBuilder setSealsClientJar(File sealsClientJar)
    • setTmpFolder

      public MatcherSealsBuilder setTmpFolder(File tmpFolder)
      Sets the tmp folder where e.g. the matcher packages are unzipped etc. Set it in case your default system tmp folder has too less memory. The default is FileUtil.getUserTmpFolder() which is set to the systems default.
      Parameters:
      tmpFolder - the new tmp folder to use.
      Returns:
      this builder object
    • setTimeout

      public MatcherSealsBuilder setTimeout(long timeout)
    • setTimeoutTimeUnit

      public MatcherSealsBuilder setTimeoutTimeUnit(TimeUnit timeoutTimeUnit)
    • setJavaRuntimeParameters

      public MatcherSealsBuilder setJavaRuntimeParameters(List<String> javaRuntimeParameters)
    • addJavaRuntimeParameters

      public MatcherSealsBuilder addJavaRuntimeParameters(String javaRuntimeParameter)
    • setFreshMatcherInstance

      public MatcherSealsBuilder setFreshMatcherInstance(boolean freshMatcherInstance)
    • setDoNotUseInputAlignment

      public MatcherSealsBuilder setDoNotUseInputAlignment(boolean doNotUseInputAlignment)
    • setJavaCommand

      public MatcherSealsBuilder setJavaCommand(String javaCommand)
    • build

      public MatcherSeals build(File fileOrFolder)
    • buildFromFolder

      public Map<String,MatcherSeals> buildFromFolder(File matcher)
      Returns all possible MatcherSeals instances for a given file or directory. If it is a file with zip extension, it will unzip it. If it is a directory, it will check if this directory is a matcher. If not, it will inspect the whole directory for matchers.
      Parameters:
      matcher - the directoroy or file which represents a matcher or a directory of matchers.
      Returns:
      a map of the matcher directory and corresponding matcher name(file name)