Package com.google.refine.org.deri.reconcile.model

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


    assertEquals(sparql, expected);
  }
 
  @Test
  public void oneLabelWithTypeTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    //this will assure that empty string for type is ignored
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Person" , "http://example.org/ontology/Person"});
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+
View Full Code Here


    assertEquals(sparql, expected);
  }
 
  @Test
  public void oneLabelWithTypeWithContextTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    //this will assure that empty string for type is ignored
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Person" , "http://example.org/ontology/Person"});
    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));
   
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
View Full Code Here

    assertEquals(sparql, expected);
  }
 
  @Test
  public void multiLabelsTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label" ,
        "http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
View Full Code Here

    assertEquals(sparql, expected);
  }
 
  @Test
  public void multiLabelsWithTypeTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Person" });
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label" ,
        "http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
View Full Code Here

  }
 
  @Test
  public void queryForReconcileTest(){
    int computedLimit = limit * 2;
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label","http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "SELECT DISTINCT ?entity ?label ?score1 " +
View Full Code Here

  }
 
  @Test
  public void queryWithTypeForReconcileTest(){
    int computedLimit = limit * 2;
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Agent","http://xmlns.com/foaf/0.1/Person"});
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "SELECT DISTINCT ?entity ?label ?score1 " +
      "WHERE" +
View Full Code Here

    assertEquals(sparql, expected);
  }
 
  @Test
  public void multiLabelsWithTypeWithContextReconciliationTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Person" , "http://example.org/ontology/Person"});
   
    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));
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "SELECT DISTINCT ?entity ?label ?score1 " +
View Full Code Here

   * RECONCILIATION QUERIES TESTS
   */
 
  @Test
  public void multiLabelsSimpleReconciliationTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    //this will assure that empty string for type is ignored
    request.setTypes(new String[] {""});
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> " +
View Full Code Here

    assertEquals(sparql, expected);
  }
 
  @Test
  public void multiLabelsWithTypeSimpleReconciliationTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Person" , "http://example.org/ontology/Person"});
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> " +
View Full Code Here

    assertEquals(sparql, expected);
  }
 
  @Test
  public void multiLabelsWithTypeWithContextReconciliationTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://xmlns.com/foaf/0.1/Person" , "http://example.org/ontology/Person"});
   
    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));
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://www.w3.org/2004/02/skos/core#prefLabel");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
      "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> " +
View Full Code Here

TOP

Related Classes of com.google.refine.org.deri.reconcile.model.ReconciliationRequest

Copyright © 2018 www.massapicom. 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.