Package net.ionite.docval.config
Class ConfigData.DocumentType
java.lang.Object
net.ionite.docval.config.ConfigData.DocumentType
- Enclosing class:
- ConfigData
Document type information for the validator. A DocumentType entry specifies
the keyword and a list of validation files to validate against
- Author:
- Ionite
-
Field Summary
Modifier and TypeFieldDescriptionA description of this document type.The keyword that is used to match a given document to a set of validation files In principle, the keyword can be any unique value, as set by the caller of the validator.The (short) name for this document type, such as "SI-UBL 2.0" or "Peppol BIS 3 Invoice"The list of validation files to validate a document for this DocumentType against -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.json.simple.JSONObject
toJSON
(boolean addValidationFiles) Serialize this document type configuration as a JSON objecttoJSONString
(boolean addValidationFiles) Serialize this document type configuration as a JSON stringnet.sf.saxon.sapling.SaplingElement
Serialize this document type configuration as an XML Sapling
-
Field Details
-
name
The (short) name for this document type, such as "SI-UBL 2.0" or "Peppol BIS 3 Invoice" -
description
A description of this document type. MAy be null or empty -
keyword
The keyword that is used to match a given document to a set of validation files In principle, the keyword can be any unique value, as set by the caller of the validator. There is, however, a standard format for automatic processing. See the @see net.ionite.docval.KeywordDeriver#deriveKeyword(java.io.InputStream) deriveKeyword for more information -
validationFiles
The list of validation files to validate a document for this DocumentType against
-
-
Constructor Details
-
DocumentType
public DocumentType()Constructor for DocumentType options
-
-
Method Details
-
toJSON
public org.json.simple.JSONObject toJSON(boolean addValidationFiles) Serialize this document type configuration as a JSON object- Returns:
- JSONObject containing this document type configuration
-
toJSONString
Serialize this document type configuration as a JSON string- Returns:
- String containing a JSON representation of this document type configuration
-
toXMLSaplingElement
public net.sf.saxon.sapling.SaplingElement toXMLSaplingElement()Serialize this document type configuration as an XML Sapling- Returns:
- SaplingElement containing an XML representation of this document type configuration
-