Examples of ReconciliationRequest


Examples of com.google.refine.org.deri.reconcile.model.ReconciliationRequest

  }
 
  @Test
  public void oneLabelOneTypeWithContextExactMatchReconcileTest(){
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label");
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film"});
    PropertyContext prop1 = new PropertyContext("http://example.org/ontology/worksFor", new IdentifiedValueContext("http://example.org/resource/DERI"));
    PropertyContext prop2 = new PropertyContext("http://xmlns.com/foaf/0.1/nick", new TextualValueContext("fadmaa"));
    request.setContext(new ReconciliationRequestContext(prop1, prop2));
   
    String sparql = factory.getExactMatchReconciliationSparqlQuery(request, searchPropertyUris);
    String expected =
      "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> " +
      "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> " +
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationRequest

    JsonNode root = mapper.readValue(queries, JsonNode.class);
    Iterator<String> keysIter = root.getFieldNames();
    while(keysIter.hasNext()){
      String key = keysIter.next();
      //FIXME parsed twice
      ReconciliationRequest request = ReconciliationRequest.valueOf(root.path(key).toString());
      multiRequest.put(key, request);
    }
   
    return ImmutableMap.copyOf(multiRequest);
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationRequest

    this.queryFactory = factory;
  }
 
  public boolean hasResult(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);
    return ! candidates.isEmpty();
  }
View Full Code Here

Examples of org.deri.grefine.reconcile.model.ReconciliationRequest

    return ! candidates.isEmpty();
  }
 
  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());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.