Package com.google.refine.rdf

Examples of com.google.refine.rdf.CellResourceNode


  @Test(groups={"rdf-schema-test"})
  public void testRowNumberCell(){
    Node rowNumberNode = getLink(root,"http://reference.data.gov.uk/def/central-government/heldBy");
    assertNotNull(rowNumberNode);
    assertTrue(rowNumberNode instanceof CellResourceNode );
    CellResourceNode rowNumber = (CellResourceNode) rowNumberNode;
    //test URI expression
    assertEquals(rowNumber.getUriExpression(),"('#person' + value).urlify()");
    //test column name
    assertNull(rowNumber.getColumnName());
    testLinks(rowNumber, "http://xmlns.com/foaf/0.1/name","http://xmlns.com/foaf/0.1/mbox");
    testRdfTypes(rowNumber, "http://xmlns.com/foaf/0.1/Person");
  }
View Full Code Here


    testRdfTypes(rowNumber, "http://xmlns.com/foaf/0.1/Person");
  }
 
  @Test(groups={"rdf-schema-test"})
  public void testNameCell(){
    CellResourceNode rowNumber = (CellResourceNode)getLink(root,"http://reference.data.gov.uk/def/central-government/heldBy");
    Node nameNode = getLink(rowNumber, "http://xmlns.com/foaf/0.1/name");
    assertTrue(nameNode instanceof CellLiteralNode );
    CellLiteralNode name = (CellLiteralNode) nameNode;
    assertNull(name.getLang());
    assertEquals(name.getColumnName(), "Name");
View Full Code Here

    assertNull(name.getValueType());   
  }
 
  @Test(groups={"rdf-schema-test"})
  public void testEmailCell(){
    CellResourceNode rowNumber = (CellResourceNode)getLink(root,"http://reference.data.gov.uk/def/central-government/heldBy");
    Node emailNode = getLink(rowNumber, "http://xmlns.com/foaf/0.1/mbox");
    assertTrue(emailNode instanceof CellResourceNode);
    CellResourceNode email = (CellResourceNode) emailNode;
   
    assertEquals(email.getUriExpression(), "'mailto:' + value");
    testLinks(email);
    testRdfTypes(email);
  }
View Full Code Here

    testRdfTypes(email);
  }
 
  @Test(groups={"rdf-schema-test"})
  public void testInverseProperty(){
    CellResourceNode n1 = (CellResourceNode)getLink(root,"http://reference.data.gov.uk/def/central-government/postIn");
    CellResourceNode n2 = (CellResourceNode)getLink(n1,"http://reference.data.gov.uk/def/central-government/hasPost");
    assertEquals(n2.getUriExpression(),"'http://reference.data.gov.uk/id/department/bis/post/' + value");
    assertEquals(n2.getColumnName(), "Post unique reference");
    testLinks(n2);
    testRdfTypes(n2);
  }
View Full Code Here

TOP

Related Classes of com.google.refine.rdf.CellResourceNode

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.