Package net.ionite.docval.config
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classConfigData.DocumentTypeDocument type information for the validator.classConfigData.ListenListen options for the server configurationclassConfigData.ServerServer configurationstatic classConfigData.UnknownKeywordsDefines the way to handle unknown keywords
-
Field Summary
Fields Modifier and Type Field Description booleanautoReloadIf set to true, the ValidatorManager will automatically reload validation files when they have changed on diskArrayList<ConfigData.DocumentType>documentTypesThe document types that are configured to be validatedbooleanlazyLoadIf set to true, validation files are not loaded until the first time they are accessed though cursory checks (existence, read access) are performedConfigData.ServerserverValidation server configurationConfigData.UnknownKeywordsunknownKeywordsIf set to true, validation will not validate documents with an unknown keyword, but return 0 errors and a single warning
-
Constructor Summary
Constructors Constructor Description ConfigData()Constructor for an empty ConfigData instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.simple.JSONObjectdocumentTypesAsJSON()Serialize the document types configured in this ConfigData as a JSON objectStringdocumentTypesAsJSONString()Serialize the document types configured in this ConfigData as a JSON stringStringdocumentTypesAsXMLString()Serialize the document types configured in this ConfigData instance as an XML string
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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
-
-