}
public LinkedHashMultimap<String, String> guessType(Model model, String queryString, ImmutableList<String> searchPropertyUris, int limit) {
//reconcile then get types for each element in the reconciliation result assure that order is preserved
ReconciliationRequest request = new ReconciliationRequest(queryString, limit);
QueryExecutor queryExecutor = new DumpQueryExecutor(model);
List<ReconciliationCandidate> candidates = reconcileEntities(queryExecutor, request, searchPropertyUris, 2.0);
List<String> entities = new ArrayList<String>();
for(ReconciliationCandidate candidate:candidates){
entities.add(candidate.getId());
}
if(entities.isEmpty()){
//return empty result
return LinkedHashMultimap.create();
}
String sparql = this.queryFactory.getTypesOfEntitiesQuery(ImmutableList.copyOf(entities));
ResultSet resultSet = queryExecutor.sparql(sparql);
Multimap<String, String> typesMap = this.queryFactory.wrapTypesOfEntities(resultSet);
//order
LinkedHashMultimap<String, String> result = LinkedHashMultimap.create();
for(String uri:entities){
result.putAll(uri, typesMap.get(uri));