Class UntypedTagService

  • All Implemented Interfaces:
    TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>

    public class UntypedTagService
    extends Object
    implements TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
    Service to tag metadata with simple String terms.
    • Constructor Summary

      Constructors 
      Constructor Description
      UntypedTagService​(org.molgenis.data.DataService dataService, TagRepository tagRepository)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAttributeTag​(org.molgenis.data.meta.model.EntityType entityType, org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.Attribute,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
      Tags an attribute.
      void addEntityTag​(org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.EntityType,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
      Tags an entity.
      org.molgenis.data.Entity getTagEntity​(org.molgenis.data.semantic.SemanticTag<?,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)  
      com.google.common.collect.Multimap<org.molgenis.data.semantic.Relation,​org.molgenis.data.semantic.LabeledResource> getTagsForAttribute​(org.molgenis.data.meta.model.EntityType entityType, org.molgenis.data.meta.model.Attribute attribute)
      Retrieves all tags for an attribute, and groups them by relation
      Iterable<org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.EntityType,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>> getTagsForEntity​(org.molgenis.data.meta.model.EntityType entityType)
      Retrieves all tags for an entity.
      Iterable<org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.Package,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>> getTagsForPackage​(org.molgenis.data.meta.model.Package p)
      Retrieves all tags for a package
      void removeAllTagsFromEntity​(String entityTypeId)
      Removes all tags for a given entity
      void removeAttributeTag​(org.molgenis.data.meta.model.EntityType entityType, org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.Attribute,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> removeTag)
      Removes attribute tag
      void removeEntityTag​(org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.EntityType,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
      Removes an entity tag.
    • Constructor Detail

      • UntypedTagService

        public UntypedTagService​(org.molgenis.data.DataService dataService,
                                 TagRepository tagRepository)
    • Method Detail

      • removeAttributeTag

        public void removeAttributeTag​(org.molgenis.data.meta.model.EntityType entityType,
                                       org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.Attribute,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> removeTag)
        Description copied from interface: TagService
        Removes attribute tag
        Specified by:
        removeAttributeTag in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
        Parameters:
        entityType - the entity the tagged attribute sits on
        removeTag - the tag to remove
      • getTagsForAttribute

        public com.google.common.collect.Multimap<org.molgenis.data.semantic.Relation,​org.molgenis.data.semantic.LabeledResource> getTagsForAttribute​(org.molgenis.data.meta.model.EntityType entityType,
                                                                                                                                                            org.molgenis.data.meta.model.Attribute attribute)
        Description copied from interface: TagService
        Retrieves all tags for an attribute, and groups them by relation
        Specified by:
        getTagsForAttribute in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
      • getTagsForEntity

        public Iterable<org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.EntityType,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>> getTagsForEntity​(org.molgenis.data.meta.model.EntityType entityType)
        Description copied from interface: TagService
        Retrieves all tags for an entity.
        Specified by:
        getTagsForEntity in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
      • addAttributeTag

        public void addAttributeTag​(org.molgenis.data.meta.model.EntityType entityType,
                                    org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.Attribute,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
        Description copied from interface: TagService
        Tags an attribute.
        Specified by:
        addAttributeTag in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
        Parameters:
        entityType - the entity the tagged attribute sits on
        tag - the tag to add
      • addEntityTag

        public void addEntityTag​(org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.EntityType,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
        Description copied from interface: TagService
        Tags an entity.
        Specified by:
        addEntityTag in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
        Parameters:
        tag - the tag to add
      • getTagEntity

        public org.molgenis.data.Entity getTagEntity​(org.molgenis.data.semantic.SemanticTag<?,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
      • getTagsForPackage

        public Iterable<org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.Package,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>> getTagsForPackage​(org.molgenis.data.meta.model.Package p)
        Description copied from interface: TagService
        Retrieves all tags for a package
        Specified by:
        getTagsForPackage in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
      • removeEntityTag

        public void removeEntityTag​(org.molgenis.data.semantic.SemanticTag<org.molgenis.data.meta.model.EntityType,​org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource> tag)
        Description copied from interface: TagService
        Removes an entity tag.
        Specified by:
        removeEntityTag in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
        Parameters:
        tag - the tag to remove
      • removeAllTagsFromEntity

        public void removeAllTagsFromEntity​(String entityTypeId)
        Description copied from interface: TagService
        Removes all tags for a given entity
        Specified by:
        removeAllTagsFromEntity in interface TagService<org.molgenis.data.semantic.LabeledResource,​org.molgenis.data.semantic.LabeledResource>
        Parameters:
        entityTypeId - the name of the entity for which all tags should be removed