Class SleighLanguageValidator


  • public class SleighLanguageValidator
    extends java.lang.Object
    Validate SLEIGH related XML configuration files: .cspec .pspec and .ldefs A ResourceFile containing an XML document can be verified with one of the static methods: - validateCspecFile - validateLdefsFile - validatePspecFile Alternately the class can be instantiated, which will allocate a single verifier that can be run on multiple files.

Constructor Detail

  • Method Detail

    • verify NEW

      public void verify​(ResourceFile specFile)
                  throws SleighException
      Verify the given file against this validator.
      Parameters:
      specFile - is the file
      Throws:
      SleighException - with an explanation if the file does not validate
    • verify NEW

      public void verify​(java.lang.String title,
                         java.lang.String document)
                  throws SleighException
      Verify an XML document as a string against this validator. Currently this only supports verifierType == CSPECTAG_TYPE.
      Parameters:
      title - is a description of the document
      document - is the XML document body
      Throws:
      SleighException - with an explanation if the document does not validate