Class ValidationScriptRunner

    • Constructor Detail

      • ValidationScriptRunner

        protected ValidationScriptRunner​(boolean scriptIsNull)
        Protected constructor for the null script runner.
        Parameters:
        scriptIsNull -
    • Method Detail

      • createValidatorFromScriptPaths

        public static ValidationScriptRunner createValidatorFromScriptPaths​(java.lang.String[] scriptPaths)
        Factory method for creating a ValidationScriptRunner given a path to a script.

        Use this on the server-side.

      • createValidatorFromScriptPaths

        public static ValidationScriptRunner createValidatorFromScriptPaths​(java.lang.String[] scriptPaths,
                                                                            boolean isolateJythonSystemState)
        Factory method for creating a ValidationScriptRunner given a path to a script.
        Parameters:
        isolateJythonSystemState - If true, create a jython interpreter with an isolated system state. Use this on the server side where multiple Jython interpreters may run in different threads. Note, however, that the re module has some restrictions in this mode.
      • createValidatorFromScriptString

        public static ValidationScriptRunner createValidatorFromScriptString​(java.lang.String scriptString)
        Factory method for creating a ValidationScriptRunner given the script as a string.

        Use this on the server-side.

      • createValidatorFromScriptString

        public static ValidationScriptRunner createValidatorFromScriptString​(java.lang.String scriptString,
                                                                             boolean isolateJythonSystemState)
        Factory method for creating a ValidationScriptRunner given the script as a string.
        Parameters:
        isolateJythonSystemState - If true, create a jython interpreter with an isolated system state. Use this on the server side where multiple Jython interpreters may run in different threads. Note, however, that the re module has some restrictions in this mode.
      • validate

        public java.util.List<ValidationError> validate​(java.io.File dataSetFile)
      • extractMetadata

        public java.util.Map<java.lang.String,​java.lang.String> extractMetadata​(java.io.File dataSetFile)
      • getScriptString

        public java.lang.String getScriptString()