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
    A 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

    Constructors
    Constructor
    Description
    Constructor for DocumentType options
  • Method Summary

    Modifier and Type
    Method
    Description
    org.json.simple.JSONObject
    toJSON(boolean addValidationFiles)
    Serialize this document type configuration as a JSON object
    toJSONString(boolean addValidationFiles)
    Serialize this document type configuration as a JSON string
    net.sf.saxon.sapling.SaplingElement
    Serialize this document type configuration as an XML Sapling

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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
    • validationFiles

      public ArrayList<String> 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

      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