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

com.yahoo.schema.ImmutableSchema Maven / Gradle / Ivy

There is a newer version: 8.441.21
Show newest version
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;

import com.yahoo.config.application.api.ApplicationPackage;
import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.config.model.api.ModelContext;
import com.yahoo.schema.document.ImmutableSDField;
import com.yahoo.schema.document.SDDocumentType;
import com.yahoo.schema.document.SDField;
import com.yahoo.searchlib.rankingexpression.Reference;
import com.yahoo.vespa.documentmodel.SummaryField;

import java.io.Reader;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Stream;

/**
 * An interface containing the non-mutating methods of {@link Schema}.
 * For description of the methods see {@link Schema}.
 *
 * @author bjorncs
 */
public interface ImmutableSchema {

    String getName();
    Optional inherited();
    Index getIndex(String name);
    ImmutableSDField getConcreteField(String name);
    //TODO split in mutating/immutable by returning List
    List allConcreteFields();
    List getExplicitIndices();
    Reader getRankingExpression(String fileName);
    ApplicationPackage applicationPackage();
    DeployLogger getDeployLogger();
    ModelContext.Properties getDeployProperties();
    Map constants();
    LargeRankingExpressions rankExpressionFiles();
    Map onnxModels();
    Stream allImportedFields();
    SDDocumentType getDocument();
    ImmutableSDField getField(String name);

    default Stream allFields() {
        return allFieldsList().stream();
    }
    List allFieldsList();

    List getSummaryFields(ImmutableSDField field);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy