|
5 | 5 |
|
6 | 6 | import com.linkedin.common.Deprecation;
|
7 | 7 | import com.linkedin.common.Forms;
|
| 8 | +import com.linkedin.common.GlobalTags; |
8 | 9 | import com.linkedin.common.InstitutionalMemory;
|
9 | 10 | import com.linkedin.common.Ownership;
|
10 | 11 | import com.linkedin.common.urn.Urn;
|
|
23 | 24 | import com.linkedin.datahub.graphql.types.glossary.GlossaryTermUtils;
|
24 | 25 | import com.linkedin.datahub.graphql.types.mappers.ModelMapper;
|
25 | 26 | import com.linkedin.datahub.graphql.types.structuredproperty.StructuredPropertiesMapper;
|
| 27 | +import com.linkedin.datahub.graphql.types.tag.mappers.GlobalTagsMapper; |
26 | 28 | import com.linkedin.domain.Domains;
|
27 | 29 | import com.linkedin.entity.EntityResponse;
|
28 | 30 | import com.linkedin.entity.EnvelopedAspectMap;
|
@@ -92,6 +94,9 @@ public GlossaryTerm apply(
|
92 | 94 | entity.setStructuredProperties(
|
93 | 95 | StructuredPropertiesMapper.map(
|
94 | 96 | context, new StructuredProperties(dataMap), entityUrn))));
|
| 97 | + mappingHelper.mapToResult( |
| 98 | + GLOBAL_TAGS_ASPECT_NAME, |
| 99 | + (dataset, dataMap) -> mapGlobalTags(context, dataset, dataMap, entityUrn)); |
95 | 100 | mappingHelper.mapToResult(
|
96 | 101 | FORMS_ASPECT_NAME,
|
97 | 102 | ((entity, dataMap) ->
|
@@ -124,4 +129,15 @@ private void mapDomains(
|
124 | 129 | final Domains domains = new Domains(dataMap);
|
125 | 130 | glossaryTerm.setDomain(DomainAssociationMapper.map(context, domains, glossaryTerm.getUrn()));
|
126 | 131 | }
|
| 132 | + |
| 133 | + private static void mapGlobalTags( |
| 134 | + @Nullable final QueryContext context, |
| 135 | + @Nonnull GlossaryTerm glossaryTerm, |
| 136 | + @Nonnull DataMap dataMap, |
| 137 | + @Nonnull final Urn entityUrn) { |
| 138 | + com.linkedin.datahub.graphql.generated.GlobalTags globalTags = |
| 139 | + GlobalTagsMapper.map(context, new GlobalTags(dataMap), entityUrn); |
| 140 | + glossaryTerm.setGlobalTags(globalTags); |
| 141 | + glossaryTerm.setTags(globalTags); |
| 142 | + } |
127 | 143 | }
|
0 commit comments