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 class
ConfigData.DocumentType
Document type information for the validator.class
ConfigData.Listen
Listen options for the server configurationclass
ConfigData.Server
Server configurationstatic class
ConfigData.UnknownKeywords
Defines the way to handle unknown keywords
-
Field Summary
Fields Modifier and Type Field Description boolean
autoReload
If set to true, the ValidatorManager will automatically reload validation files when they have changed on diskArrayList<ConfigData.DocumentType>
documentTypes
The document types that are configured to be validatedboolean
lazyLoad
If set to true, validation files are not loaded until the first time they are accessed though cursory checks (existence, read access) are performedConfigData.Server
server
Validation server configurationConfigData.UnknownKeywords
unknownKeywords
If 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.JSONObject
documentTypesAsJSON()
Serialize the document types configured in this ConfigData as a JSON objectString
documentTypesAsJSONString()
Serialize the document types configured in this ConfigData as a JSON stringString
documentTypesAsXMLString()
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
-
-