Search in sources :

Example 1 with ProtoFlowMapName

use of org.openlca.proto.grpc.ProtoFlowMapName in project olca-modules by GreenDelta.

the class FlowMapService method getAll.

@Override
public void getAll(Empty req, StreamObserver<ProtoFlowMapName> resp) {
    new MappingFileDao(db).getNames().stream().sorted(Strings::compare).map(name -> ProtoFlowMapName.newBuilder().setName(name).build()).forEach(resp::onNext);
    resp.onCompleted();
}
Also used : FlowMapServiceGrpc(org.openlca.proto.grpc.FlowMapServiceGrpc) Arrays(java.util.Arrays) In(org.openlca.proto.io.input.In) Refs(org.openlca.proto.io.output.Refs) MappingFileDao(org.openlca.core.database.MappingFileDao) Messages(org.openlca.proto.io.Messages) ProtoFlowMap(org.openlca.proto.ProtoFlowMap) ProtocolStringList(com.google.protobuf.ProtocolStringList) ProtoFlowMapRef(org.openlca.proto.ProtoFlowMapRef) FlowMapEntry(org.openlca.io.maps.FlowMapEntry) ProtoFlowMapEntry(org.openlca.proto.ProtoFlowMapEntry) FlowRef(org.openlca.io.maps.FlowRef) Empty(com.google.protobuf.Empty) ProtoFlowMapName(org.openlca.proto.grpc.ProtoFlowMapName) Strings(org.openlca.util.Strings) StreamObserver(io.grpc.stub.StreamObserver) MappingFile(org.openlca.core.model.MappingFile) IDatabase(org.openlca.core.database.IDatabase) FlowMap(org.openlca.io.maps.FlowMap) FlowDescriptor(org.openlca.core.model.descriptors.FlowDescriptor) ProcessDescriptor(org.openlca.core.model.descriptors.ProcessDescriptor) MappingFileDao(org.openlca.core.database.MappingFileDao) Strings(org.openlca.util.Strings)

Aggregations

Empty (com.google.protobuf.Empty)1 ProtocolStringList (com.google.protobuf.ProtocolStringList)1 StreamObserver (io.grpc.stub.StreamObserver)1 Arrays (java.util.Arrays)1 IDatabase (org.openlca.core.database.IDatabase)1 MappingFileDao (org.openlca.core.database.MappingFileDao)1 MappingFile (org.openlca.core.model.MappingFile)1 FlowDescriptor (org.openlca.core.model.descriptors.FlowDescriptor)1 ProcessDescriptor (org.openlca.core.model.descriptors.ProcessDescriptor)1 FlowMap (org.openlca.io.maps.FlowMap)1 FlowMapEntry (org.openlca.io.maps.FlowMapEntry)1 FlowRef (org.openlca.io.maps.FlowRef)1 ProtoFlowMap (org.openlca.proto.ProtoFlowMap)1 ProtoFlowMapEntry (org.openlca.proto.ProtoFlowMapEntry)1 ProtoFlowMapRef (org.openlca.proto.ProtoFlowMapRef)1 FlowMapServiceGrpc (org.openlca.proto.grpc.FlowMapServiceGrpc)1 ProtoFlowMapName (org.openlca.proto.grpc.ProtoFlowMapName)1 Messages (org.openlca.proto.io.Messages)1 In (org.openlca.proto.io.input.In)1 Refs (org.openlca.proto.io.output.Refs)1