Builder
data class Builder(val displayName: String, var mdocBuilder: MdocDocumentType.Builder? = null, var jsonBuilder: JsonDocumentType.Builder? = null)
Builder class for class DocumentType
Parameters
displayName
the name suitable for display of the Document Type.
mdocBuilder
a builder for the MdocDocumentType.
jsonBuilder
a builder for the JsonDocumentType.
Constructors
Link copied to clipboard
constructor(displayName: String, mdocBuilder: MdocDocumentType.Builder? = null, jsonBuilder: JsonDocumentType.Builder? = null)
Functions
Link copied to clipboard
fun addAttribute(type: DocumentAttributeType, identifier: String, displayName: String, description: String, mandatory: Boolean, mdocNamespace: String, icon: Icon? = null, sampleValueMdoc: DataItem? = null, sampleValueJson: JsonElement? = null): DocumentType.Builder
Add an attribute for both ISO mdoc and JSON-based document, using the same identifier.
fun addAttribute(type: DocumentAttributeType, mdocIdentifier: String, jsonIdentifier: String, displayName: String, description: String, mandatory: Boolean, mdocNamespace: String, icon: Icon? = null, sampleValueMdoc: DataItem? = null, sampleValueJson: JsonElement? = null): DocumentType.Builder
Add an attribute for both ISO mdoc and JSON-based, using a different identifier.
Link copied to clipboard
fun addJsonAttribute(type: DocumentAttributeType, identifier: String, displayName: String, description: String, icon: Icon? = null, sampleValue: JsonElement? = null): DocumentType.Builder
Add an attribute for JSON-based only.
Link copied to clipboard
Initialize the jsonBuilder.
Link copied to clipboard
fun addMdocAttribute(type: DocumentAttributeType, identifier: String, displayName: String, description: String, mandatory: Boolean, mdocNamespace: String, icon: Icon? = null, sampleValue: DataItem? = null): DocumentType.Builder
Add an attribute for ISO mdoc only.
Link copied to clipboard
Initialize the mdocBuilder.
Link copied to clipboard
Link copied to clipboard
Build the DocumentType.