ai.grakn.engine.rpc.GrpcConverter Maven / Gradle / Ivy
/*
* Grakn - A Distributed Semantic Database
* Copyright (C) 2016-2018 Grakn Labs Limited
*
* Grakn is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Grakn is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Grakn. If not, see .
*/
package ai.grakn.engine.rpc;
import ai.grakn.concept.Concept;
import ai.grakn.graql.GraqlConverter;
import ai.grakn.graql.admin.Answer;
import ai.grakn.graql.internal.printer.Printers;
import ai.grakn.grpc.GrpcUtil;
import ai.grakn.rpc.generated.GrpcConcept;
import ai.grakn.rpc.generated.GrpcGrakn;
import ai.grakn.rpc.generated.GrpcGrakn.QueryResult;
import java.util.Collection;
import java.util.Map;
import java.util.Optional;
/**
* Converts to GRPC result format. This is a special format for {@link Answer}s, but JSON strings for everything else.
*
* @author Felix Chapman
*/
class GrpcConverter implements GraqlConverter
© 2015 - 2025 Weber Informatics LLC | Privacy Policy