Search in sources :

Example 1 with AbstractConcreteDocumentFactory

use of com.yahoo.docproc.AbstractConcreteDocumentFactory in project vespa by vespa-engine.

the class ProcessingFactory method createConcreteDocument.

private Document createConcreteDocument(Document document, ContainerDocumentConfig.Doctype typeConfig) {
    // Class name of the factory
    String componentId = typeConfig.factorycomponent();
    AbstractConcreteDocumentFactory cdf = docFactoryRegistry.getComponent(new ComponentId(componentId));
    if (cdf == null) {
        log.fine("Unable to get document factory component '" + componentId + "' from document factory registry.");
        return document;
    }
    return cdf.getDocumentCopy(document.getDataType().getName(), document, document.getId());
}
Also used : AbstractConcreteDocumentFactory(com.yahoo.docproc.AbstractConcreteDocumentFactory) ComponentId(com.yahoo.component.ComponentId)

Aggregations

ComponentId (com.yahoo.component.ComponentId)1 AbstractConcreteDocumentFactory (com.yahoo.docproc.AbstractConcreteDocumentFactory)1