Class DocumentType

    • Constructor Detail

      • DocumentType

        protected DocumentType​(String id)
        Creates a new instance.
        Parameters:
        id - this document type identifier.
        Since:
        8.1.0
    • Method Detail

      • getId

        public String getId()
        Returns the identifier.
        Returns:
        the identifier.
        Since:
        8.1.0
      • getFields

        public Map<String,​DocumentTypeField> getFields()
        Returns an unmodifiable map of fields, using the field identifier as the key.
        Returns:
        an unmodifiable map of fields, using the field identifier as the key.
        Since:
        8.1.0
      • addField

        protected void addField​(DocumentTypeField field)
        Adds the given field in this document type.
        Parameters:
        field - the field in this document type.
        Since:
        8.1.0
        See Also:
        DocumentTypeFields
      • removeField

        protected void removeField​(String fieldId)
        Removes the field with the given identifier of this document type.
        Parameters:
        field - the field identifier.
        Since:
        8.1.0
      • createDocument

        public Document createDocument()
        Returns a new empty document of this document type.
        Returns:
        the document.
        Since:
        8.1.0