Class ConfigData

java.lang.Object
net.ionite.docval.config.ConfigData

public class ConfigData extends Object
Configuration data class, for the several components of ion-docval
Author:
Ionite
  • Field Details

    • autoReload

      public boolean autoReload
      If set to true, the ValidatorManager will automatically reload validation files when they have changed on disk
    • unknownKeywords

      public ConfigData.UnknownKeywords unknownKeywords
      If set to true, validation will not validate documents with an unknown keyword, but return 0 errors and a single warning
    • lazyLoad

      public boolean lazyLoad
      If set to true, validation files are not loaded until the first time they are accessed though cursory checks (existence, read access) are performed
    • server

      public ConfigData.Server server
      Validation server configuration
    • documentTypes

      public ArrayList<ConfigData.DocumentType> documentTypes
      The document types that are configured to be validated
  • Constructor Details

    • ConfigData

      public ConfigData()
      Constructor for an empty ConfigData instance
  • Method Details

    • documentTypesAsJSON

      public org.json.simple.JSONObject documentTypesAsJSON()
      Serialize the document types configured in this ConfigData as a JSON object
      Returns:
      JSONObject containing the document types configured in this ConfigData instance
    • documentTypesAsJSONString

      public String documentTypesAsJSONString()
      Serialize the document types configured in this ConfigData as a JSON string
      Returns:
      String containing a JSON representation of the document types configured in this ConfigData instance
    • documentTypesAsXMLString

      public String documentTypesAsXMLString() throws net.sf.saxon.s9api.SaxonApiException
      Serialize the document types configured in this ConfigData instance as an XML string
      Returns:
      String containing an XML representation of the document types configured in this ConfigData instance
      Throws:
      net.sf.saxon.s9api.SaxonApiException - if there is an error constructing the XML data