@Test void testConvertAttribute() { when(dataService.getEntityType(ATTRIBUTE_META_DATA)).thenReturn(attributeMetadata); Explanation explanation = Explanation.match(0.3f, "match"); when(elasticSearchExplainService.explain(query, attributeMetadata, "attrID")) .thenReturn(explanation); when(elasticSearchExplainService.findQueriesFromExplanation( collectExpandedQueryMap, explanation)) .thenReturn(explainedQueryStrings); assertEquals( explainedQueryStrings, semanticSearchService.convertAttributeToExplainedAttribute( attribute, collectExpandedQueryMap, query)); }
public Set<ExplainedQueryString> convertAttributeToExplainedAttribute( Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query) { EntityType attributeMetaData = dataService.getEntityType(ATTRIBUTE_META_DATA); String attributeID = attribute.getIdentifier(); Explanation explanation = elasticSearchExplainService.explain(query, attributeMetaData, attributeID); return elasticSearchExplainService.findQueriesFromExplanation( collectExpandedQueryMap, explanation); }
SemanticSearchServiceImpl implements SemanticSearchService { public Set<ExplainedQueryString> convertAttributeToExplainedAttribute( Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query) { EntityType attributeMetaData = dataService.getEntityType(ATTRIBUTE_META_DATA); String attributeID = attribute.getIdentifier(); Explanation explanation = elasticSearchExplainService.explain(query, attributeMetaData, attributeID); return elasticSearchExplainService.findQueriesFromExplanation( collectExpandedQueryMap, explanation); } }
SemanticSearchServiceImpl implements SemanticSearchService { public Set<ExplainedQueryString> convertAttributeToExplainedAttribute( Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query) { EntityType attributeMetaData = dataService.getEntityType(ATTRIBUTE_META_DATA); String attributeID = attribute.getIdentifier(); Explanation explanation = elasticSearchExplainService.explain(query, attributeMetaData, attributeID); return elasticSearchExplainService.findQueriesFromExplanation( collectExpandedQueryMap, explanation); } SemanticSearchServiceImpl(
      DataService dataService,
      OntologyService ontologyService,
      SemanticSearchServiceHelper semanticSearchServiceHelper,
      ElasticSearchExplainService elasticSearchExplainService,
      OntologyTagService ontologyTagService); }
SemanticSearchServiceImpl implements SemanticSearchService { public Set<ExplainedQueryString> convertAttributeToExplainedAttribute( Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query) { EntityType attributeMetaData = dataService.getEntityType(ATTRIBUTE_META_DATA); String attributeID = attribute.getIdentifier(); Explanation explanation = elasticSearchExplainService.explain(query, attributeMetaData, attributeID); return elasticSearchExplainService.findQueriesFromExplanation( collectExpandedQueryMap, explanation); } SemanticSearchServiceImpl(
      DataService dataService,
      OntologyService ontologyService,
      SemanticSearchServiceHelper semanticSearchServiceHelper,
      ElasticSearchExplainService elasticSearchExplainService,
      OntologyTagService ontologyTagService); Hits<ExplainedAttribute> findAttributes(
      EntityType sourceEntityType, Set<String> queryTerms, Collection<OntologyTerm> ontologyTerms); @Override EntityTypeSearchResults findAttributes(
      EntityType sourceEntityType, EntityType targetEntityType, Set<String> searchTerms); @Override AttributeSearchResults findAttributes(
      EntityType sourceEntityType,
      EntityType targetEntityType,
      Attribute targetAttribute,
      Set<String> searchTerms); Set<String> createLexicalSearchQueryTerms(
      Attribute targetAttribute, Set<String> searchTerms); Set<ExplainedQueryString> convertAttributeToExplainedAttribute(
      Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query); @Override Hits<OntologyTerm> findOntologyTerms(
      Attribute attribute, Collection<Ontology> ontologies); }
SemanticSearchServiceImpl implements SemanticSearchService { public Set<ExplainedQueryString> convertAttributeToExplainedAttribute( Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query) { EntityType attributeMetaData = dataService.getEntityType(ATTRIBUTE_META_DATA); String attributeID = attribute.getIdentifier(); Explanation explanation = elasticSearchExplainService.explain(query, attributeMetaData, attributeID); return elasticSearchExplainService.findQueriesFromExplanation( collectExpandedQueryMap, explanation); } SemanticSearchServiceImpl(
      DataService dataService,
      OntologyService ontologyService,
      SemanticSearchServiceHelper semanticSearchServiceHelper,
      ElasticSearchExplainService elasticSearchExplainService,
      OntologyTagService ontologyTagService); Hits<ExplainedAttribute> findAttributes(
      EntityType sourceEntityType, Set<String> queryTerms, Collection<OntologyTerm> ontologyTerms); @Override EntityTypeSearchResults findAttributes(
      EntityType sourceEntityType, EntityType targetEntityType, Set<String> searchTerms); @Override AttributeSearchResults findAttributes(
      EntityType sourceEntityType,
      EntityType targetEntityType,
      Attribute targetAttribute,
      Set<String> searchTerms); Set<String> createLexicalSearchQueryTerms(
      Attribute targetAttribute, Set<String> searchTerms); Set<ExplainedQueryString> convertAttributeToExplainedAttribute(
      Attribute attribute, Map<String, String> collectExpandedQueryMap, Query<Entity> query); @Override Hits<OntologyTerm> findOntologyTerms(
      Attribute attribute, Collection<Ontology> ontologies);  }