datahub.protobuf.visitors.dataset.TermAssociationVisitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datahub-protobuf Show documentation
Show all versions of datahub-protobuf Show documentation
DataHub integration with Protobuf schemas for metadata
package datahub.protobuf.visitors.dataset;
import com.linkedin.common.GlossaryTermAssociation;
import datahub.protobuf.visitors.ProtobufModelVisitor;
import datahub.protobuf.visitors.ProtobufExtensionUtil;
import datahub.protobuf.visitors.VisitContext;
import java.util.stream.Stream;
import static datahub.protobuf.ProtobufUtils.getMessageOptions;
public class TermAssociationVisitor implements ProtobufModelVisitor {
@Override
public Stream visitGraph(VisitContext context) {
return ProtobufExtensionUtil.extractTermAssociationsFromOptions(getMessageOptions(context.root().messageProto()),
context.getGraph().getRegistry());
}
}