All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.vespa.model.container.docproc.DocprocChain Maven / Gradle / Ivy

// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container.docproc;

import com.yahoo.collections.Pair;
import com.yahoo.component.chain.model.ChainSpecification;
import com.yahoo.vespa.model.container.component.chain.Chain;

import java.util.Map;

import static com.yahoo.container.core.ChainsConfig.Chains.Type;

/**
 * @author Einar M R Rosenvinge
 */
public class DocprocChain extends Chain {

    private final Map, String> fieldNameSchemaMap;
    private static final Type.Enum TYPE = Type.Enum.DOCPROC;

    public DocprocChain(ChainSpecification specWithoutInnerComponents, Map, String> fieldNameSchemaMap) {
        super(specWithoutInnerComponents);
        this.fieldNameSchemaMap = fieldNameSchemaMap;
    }

    /**
     * The field name schema map that applies to this whole chain.
     *
     * @return doctype, from → to
     */
    public Map,String> fieldNameSchemaMap() {
        return fieldNameSchemaMap;
    }

    public String getServiceName() {
        return getParent().getParent().getParent().getConfigId() + "/" + getSessionName();
    }

    public String getSessionName() {
        return "chain." + getComponentId().stringValue();
    }

    public Type.Enum getType() {
        return TYPE;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy