/** * Creates an IndexedDocument from the provided operation, with the provided * handler installed to receive document events. */ public IndexedDocument<N, E, T> build(DocInitialization operation, DocumentSchema schema, DocumentHandler<N, E, T> handler) throws OperationException { ObservableIndexedDocument<N, E, T, ?> doc = new ObservableIndexedDocument<N, E, T, Void>(handler, substrateProvider.create("doc", Attributes.EMPTY_MAP), schema); doc.consume(operation); return doc; } }