MilanoEngine

class MilanoEngine(vocabularyJson: String, registry: MilanoRegistry, val defaultUnknownTypePolicy: MilanoUnknownTypePolicy = MilanoUnknownTypePolicy.FAIL, val limits: MilanoLimits = MilanoLimits(), observer: MilanoObserver? = null, userInteractionObserver: MilanoUserInteractionObserver? = null, functionHandler: MilanoFunctionHandler? = null)

The instantiable root of the framework. An engine holds one configuration: the vocabulary, the registry, the default unknown-type policy, resource limits, the two observers, and the host function handler. It is immutable after creation and safe to share across threads. MilanoViewBuilders are obtained from an engine, so every MilanoView is traceable to exactly one configuration.

Constructors

Link copied to clipboard
constructor(vocabularyJson: String, registry: MilanoRegistry, defaultUnknownTypePolicy: MilanoUnknownTypePolicy = MilanoUnknownTypePolicy.FAIL, limits: MilanoLimits = MilanoLimits(), observer: MilanoObserver? = null, userInteractionObserver: MilanoUserInteractionObserver? = null, functionHandler: MilanoFunctionHandler? = null)

Properties

Link copied to clipboard
Link copied to clipboard

The held vocabulary's identity, for tooling such as generated bindings that assert they were generated from this vocabulary.

Link copied to clipboard

Functions

Link copied to clipboard

Creates a builder for one document given as raw bytes. The document-size limit is checked against these bytes exactly; the text is decoded as UTF-8.

Creates a builder for one document given as text.