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

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


  /*
   * ONE-LABEL-PROPERTY (OPTIMIZED) RECONCILIATION QUERIES TESTS
   */
  @Test
  public void oneLabelsSimpleReconciliationTest(){
    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");
    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 oneLabelsWithTypeSimpleReconciliationTest(){
    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/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

  String query = "The Godfather";
 
  @Test
  public void oneLabelSimpleReconcileTest(){
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label");
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    String sparql = factory.getReconciliationSparqlQuery(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#> " +
      "SELECT ?entity ?label1 " +
View Full Code Here

  }
 
  @Test
  public void oneLabelOneTypeReconcileTest(){
    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"});
    String sparql = factory.getReconciliationSparqlQuery(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#> " +
      "SELECT ?entity ?label1 " +
View Full Code Here

  }
 
  @Test
  public void multiLabelsWithTypesReconcileTest(){
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://purl.org/dc/terms/title");
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film", "http://data.linkedmdb.org/resource/movie/film_series"});
    String sparql = factory.getReconciliationSparqlQuery(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#> " +
      "SELECT ?entity ?label1 ?label2 " +
View Full Code Here

  }
 
  @Test
  public void multiLabelsSimpleReconcileTest(){
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://purl.org/dc/terms/title");
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    //this will assure that empty string for type is ignored
    request.setTypes(new String[] {""});
    String sparql = factory.getReconciliationSparqlQuery(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#> " +
      "SELECT ?entity ?label1 ?label2 " +
View Full Code Here

  }
 
  @Test
  public void oneLabelOneTypeExactMatchReconcileTest(){
    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"});
    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#> " +
      "SELECT ?entity " +
View Full Code Here

  }
 
  @Test
  public void multiLabelsWithTypesExactMatchReconcileTest(){
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://purl.org/dc/terms/title");
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film", "http://data.linkedmdb.org/resource/movie/film_series"});
    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#> " +
      "SELECT ?entity " +
View Full Code Here

  }
 
  @Test
  public void multiLabelsExactMatchReconcileTest(){
    ImmutableList<String> searchPropertyUris = ImmutableList.of("http://www.w3.org/2000/01/rdf-schema#label", "http://purl.org/dc/terms/title");
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    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#> " +
      "SELECT ?entity " +
View Full Code Here

    assertEquals(sparql, expected);
  }
 
  @Test
  public void multiLabelsWithTypeWithContextReconciliationTest(){
    ReconciliationRequest request = new ReconciliationRequest(query, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film" ,
                    "http://data.linkedmdb.org/resource/movie/film_series"});
   
    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://purl.org/dc/terms/title");
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
   
    String expected =
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.