use of org.molgenis.data.meta.model.AttributeMetadata.ATTRIBUTE_META_DATA in project molgenis by molgenis.
the class OntologyTagServiceImpl method removeAttributeTag.
@Override
public void removeAttributeTag(String entity, String attribute, String relationIRI, String ontologyTermIRI) {
Entity attributeEntity = findAttributeEntity(entity, attribute);
Iterable<Entity> tags = attributeEntity.getEntities(AttributeMetadata.TAGS);
Iterable<Entity> newTags = StreamSupport.stream(tags.spliterator(), false).filter(e -> !isSameTag(relationIRI, ontologyTermIRI, e)).collect(Collectors.toList());
attributeEntity.set(AttributeMetadata.TAGS, newTags);
dataService.update(ATTRIBUTE_META_DATA, attributeEntity);
updateEntityTypeEntityWithNewAttributeEntity(entity, attribute, attributeEntity);
}
Aggregations