Package net.ionite.docval.config
Class ConfigData.DocumentType
- java.lang.Object
-
- net.ionite.docval.config.ConfigData.DocumentType
-
- Enclosing class:
- ConfigData
public class ConfigData.DocumentType extends Object
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
Fields Modifier and Type Field Description String
description
A description of this document type.String
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.String
name
The (short) name for this document type, such as "SI-UBL 2.0" or "Peppol BIS 3 Invoice"ArrayList<String>
validationFiles
The list of validation files to validate a document for this DocumentType against
-
Constructor Summary
Constructors Constructor Description DocumentType()
Constructor for DocumentType options
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.simple.JSONObject
toJSON(boolean addValidationFiles)
Serialize this document type configuration as a JSON objectString
toJSONString(boolean addValidationFiles)
Serialize this document type configuration as a JSON stringnet.sf.saxon.sapling.SaplingElement
toXMLSaplingElement()
Serialize this document type configuration as an XML Sapling
-
-
-
Field Detail
-
name
public String name
The (short) name for this document type, such as "SI-UBL 2.0" or "Peppol BIS 3 Invoice"
-
description
public String description
A description of this document type. MAy be null or empty
-
keyword
public String 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
-
-
Method Detail
-
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
public String toJSONString(boolean addValidationFiles)
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
-
-