Package net.ionite.docval.config
Class ConfigData
java.lang.Object
net.ionite.docval.config.ConfigData
Configuration data class, for the several components of ion-docval
- Author:
- Ionite
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Document type information for the validator.class
Listen options for the server configurationclass
Server configurationstatic enum
Defines the way to handle unknown keywords -
Field Summary
Modifier and TypeFieldDescriptionboolean
If set to true, the ValidatorManager will automatically reload validation files when they have changed on diskThe document types that are configured to be validatedboolean
If set to true, validation files are not loaded until the first time they are accessed though cursory checks (existence, read access) are performedValidation server configurationIf set to true, validation will not validate documents with an unknown keyword, but return 0 errors and a single warning -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.json.simple.JSONObject
Serialize the document types configured in this ConfigData as a JSON objectSerialize the document types configured in this ConfigData as a JSON stringSerialize the document types configured in this ConfigData instance as an XML string
-
Field Details
-
autoReload
public boolean autoReloadIf set to true, the ValidatorManager will automatically reload validation files when they have changed on disk -
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 lazyLoadIf set to true, validation files are not loaded until the first time they are accessed though cursory checks (existence, read access) are performed -
server
Validation server configuration -
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
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
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
-