Package com.google.refine.rdf.app

Examples of com.google.refine.rdf.app.ApplicationContext


  Repository expected;
  RdfSchema schema;
  @BeforeClass
  public void init()throws Exception{
    expected = buildExpectedModel();
    ApplicationContext ctxt = new ApplicationContext();
    schema = getRdfSchema();
    project = buildTheSampleProject(schema);
    engine = new Engine(project);
    exporter = new RdfExporter(ctxt,RDFFormat.RDFXML);
    ControlFunctionRegistry.registerFunction("urlify", new Urlify());
View Full Code Here


  Repository expected;
  RdfSchema schema;
  @BeforeClass
  public void init()throws Exception{
    expected = buildExpectedModel();
    ApplicationContext ctxt = new ApplicationContext();
    schema = getRdfSchema();
    project = RdfExporterFacultyDataTest.buildTheSampleProject(schema);
    engine = new Engine(project);
    exporter = new RdfExporter(ctxt,RDFFormat.RDFXML);
    ControlFunctionRegistry.registerFunction("urlify", new Urlify());
View Full Code Here

  private String json = "{\"baseUri\":\"http://www.rbwm.gov.uk/public/finance_supplier_payments_2010_q2#\",\"rootNodes\":[{\"nodeType\":\"resource\",\"value\":\"http://www.rbwm.gov.uk/public/finance_supplier_payments_2010_q2\",\"rdfTypes\":[],\"links\":[{\"uri\":\"http://purl.org/linked-data/cube#slice\",\"curie\":\"http://purl.org/linked-data/cube#slice\",\"target\":{\"nodeType\":\"cell-as-resource\",\"expression\":\"'http://www.rbwm.gov.uk/id/transaction/' + value\",\"columnName\":\"TransNo\",\"isRowNumberCell\":false,\"rdfTypes\":[{\"uri\":\"http://reference.data.gov.uk/def/payment#Payment\",\"curie\":\"http://reference.data.gov.uk/def/payment#Payment\"},{\"uri\":\"http://purl.org/linked-data/cube#Slice\",\"curie\":\"http://purl.org/linked-data/cube#Slice\"}],\"links\":[{\"uri\":\"http://reference.data.gov.uk/def/payment#payer\",\"curie\":\"http://reference.data.gov.uk/def/payment#payer\",\"target\":{\"nodeType\":\"resource\",\"value\":\"http://statistics.data.gov.uk/id/local-authority/00ME\",\"rdfTypes\":[],\"links\":[]}},{\"uri\":\"http://reference.data.gov.uk/def/payment#payee\",\"curie\":\"http://reference.data.gov.uk/def/payment#payee\",\"target\":{\"nodeType\":\"cell-as-resource\",\"expression\":\"'http://www.rbwm.gov.uk/id/supplier/' +value.urlify()\",\"columnName\":\"Supplier Name\",\"isRowNumberCell\":false,\"rdfTypes\":[],\"links\":[]}},{\"uri\":\"http://reference.data.gov.uk/def/payment#transactionReference\",\"curie\":\"http://reference.data.gov.uk/def/payment#transactionReference\",\"target\":{\"nodeType\":\"cell-as-literal\",\"expression\":\"value\",\"columnName\":\"TransNo\",\"isRowNumberCell\":false}},{\"uri\":\"http://www.w3.org/2000/01/rdf-schema#label\",\"curie\":\"rdfs:label\",\"target\":{\"nodeType\":\"cell-as-literal\",\"expression\":\"value\",\"lang\":\"en\",\"columnName\":\"TransNo\",\"isRowNumberCell\":false}},{\"uri\":\"http://purl.org/linked-data/cube#sliceStructure\",\"curie\":\"http://purl.org/linked-data/cube#sliceStructure\",\"target\":{\"nodeType\":\"resource\",\"value\":\"http://reference.data.gov.uk/def/payment#payment-slice\",\"rdfTypes\":[],\"links\":[]}},{\"uri\":\"http://reference.data.gov.uk/def/payment#expenditureLine\",\"curie\":\"http://reference.data.gov.uk/def/payment#expenditureLine\",\"target\":{\"nodeType\":\"cell-as-resource\",\"expression\":\"row.index.urlify()\",\"isRowNumberCell\":true,\"rdfTypes\":[{\"uri\":\"http://reference.data.gov.uk/def/payment#ExpenditureLine\",\"curie\":\"http://reference.data.gov.uk/def/payment#ExpenditureLine\"}],\"links\":[{\"uri\":\"http://reference.data.gov.uk/def/payment#amountExcludingVAT\",\"curie\":\"http://reference.data.gov.uk/def/payment#amountExcludingVAT\",\"target\":{\"nodeType\":\"cell-as-literal\",\"expression\":\"value\",\"valueType\":\"http://www.w3.org/2001/XMLSchema#double\",\"columnName\":\"Amount excl vat\",\"isRowNumberCell\":false}},{\"uri\":\"http://reference.data.gov.uk/def/payment#expenditureCode\",\"curie\":\"http://reference.data.gov.uk/def/payment#expenditureCode\",\"target\":{\"nodeType\":\"cell-as-resource\",\"expression\":\"'http://www.rbwm.gov.uk/def/cost-centre/' + value\",\"columnName\":\"Cost Centre\",\"isRowNumberCell\":false,\"rdfTypes\":[],\"links\":[]}},{\"uri\":\"http://purl.org/linked-data/cube#dataset\",\"curie\":\"http://purl.org/linked-data/cube#dataset\",\"target\":{\"nodeType\":\"resource\",\"value\":\"http://www.rbwm.gov.uk/public/finance_supplier_payments_2010_q2\",\"rdfTypes\":[],\"links\":[]}}]}}]}}]}]}";
 
  @BeforeClass
  public void init()throws Exception{
    InputStream in = this.getClass().getResourceAsStream("/rdfschema-payment.csv");
    ApplicationContext ctxt = new ApplicationContext();
   
    ControlFunctionRegistry.registerFunction("urlify", new Urlify());
    ExpressionUtils.registerBinder(new RdfBinder(ctxt));
   
    project = new Project();
View Full Code Here

  @BeforeClass
  public void init()throws Exception{
    expected = buildExpectedModel();
    schema = getRdfSchema();
   
    ApplicationContext ctxt = new ApplicationContext();
   
    buildTheSampleProject();
    engine = new Engine(project);
    exporter = new RdfExporter(ctxt,RDFFormat.RDFXML);
    ControlFunctionRegistry.registerFunction("urlify", new Urlify());
View Full Code Here

  public void init() throws VocabularyIndexException, IOException, PrefixExistException{
    //gurad assert
    assertFalse(new File(TEMP_TEST_DIRECTORY).exists());
    importer = new FakeImporter();
    searcher = new FakeVocabularySearcher(new File(TEMP_TEST_DIRECTORY),this.importer);
    ctxt = new ApplicationContext();
    ctxt.setVocabularySearcher(searcher);
  }
View Full Code Here

TOP

Related Classes of com.google.refine.rdf.app.ApplicationContext

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.