Class SemanticSearchServiceImpl

    • Method Detail

      • findAttributes

        public Hits<ExplainedAttribute> findAttributes​(org.molgenis.data.meta.model.EntityType sourceEntityType,
                                                       Set<String> queryTerms,
                                                       Collection<org.molgenis.ontology.core.model.OntologyTerm> ontologyTerms)
        public for testability
      • findAttributes

        public EntityTypeSearchResults findAttributes​(org.molgenis.data.meta.model.EntityType sourceEntityType,
                                                      org.molgenis.data.meta.model.EntityType targetEntityType,
                                                      Set<String> searchTerms)
        Description copied from interface: SemanticSearchService
        Find attributes in a source entity type that match attributes in a target entity type. Optionally constrain the search using one or more search terms.
        Specified by:
        findAttributes in interface SemanticSearchService
      • findAttributes

        public AttributeSearchResults findAttributes​(org.molgenis.data.meta.model.EntityType sourceEntityType,
                                                     org.molgenis.data.meta.model.EntityType targetEntityType,
                                                     org.molgenis.data.meta.model.Attribute targetAttribute,
                                                     Set<String> searchTerms)
        Description copied from interface: SemanticSearchService
        Find attributes in an entity type that match the given target attribute in the target entity type. Optionally constrain the search using one or more search terms.
        Specified by:
        findAttributes in interface SemanticSearchService
      • createLexicalSearchQueryTerms

        public Set<String> createLexicalSearchQueryTerms​(org.molgenis.data.meta.model.Attribute targetAttribute,
                                                         Set<String> searchTerms)
        A helper function to create a list of queryTerms based on the information from the targetAttribute as well as user defined searchTerms. If the user defined searchTerms exist, the targetAttribute information will not be used.
        Returns:
        list of queryTerms
      • convertAttributeToExplainedAttribute

        public Set<ExplainedQueryString> convertAttributeToExplainedAttribute​(org.molgenis.data.meta.model.Attribute attribute,
                                                                              Map<String,​String> collectExpandedQueryMap,
                                                                              org.molgenis.data.Query<org.molgenis.data.Entity> query)
        A helper function to explain each of the matched attributes returned by the explain-API
        Parameters:
        attribute - The attribute found
        collectExpandedQueryMap - ?
        query - the query used to find the attribute
        Returns:
        Set of explained query strings
      • findOntologyTerms

        public Hits<org.molgenis.ontology.core.model.OntologyTerm> findOntologyTerms​(org.molgenis.data.meta.model.Attribute attribute,
                                                                                     Collection<org.molgenis.ontology.core.model.Ontology> ontologies)
        Description copied from interface: SemanticSearchService
        Finds ontology terms in the given ontologies that can be used to tag an attribute.
        Specified by:
        findOntologyTerms in interface SemanticSearchService