Examples of compiledPropertyBridges()


Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.compiledPropertyBridges()

  }

  public void testParseAlias() {
    Mapping mapping = MappingHelper.readFromTestFile("parser/alias.ttl");
    MappingHelper.connectToDummyDBs(mapping);
    assertEquals(1, mapping.compiledPropertyBridges().size());
    TripleRelation bridge = (TripleRelation) mapping.compiledPropertyBridges().iterator().next();
    assertTrue(bridge.baseRelation().condition().isTrue());
    AliasMap aliases = bridge.baseRelation().aliases();
    AliasMap expected = new AliasMap(Collections.singleton(SQL.parseAlias("People AS Bosses")));
    assertEquals(expected, aliases);
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.compiledPropertyBridges()

  public void testParseAlias() {
    Mapping mapping = MappingHelper.readFromTestFile("parser/alias.ttl");
    MappingHelper.connectToDummyDBs(mapping);
    assertEquals(1, mapping.compiledPropertyBridges().size());
    TripleRelation bridge = (TripleRelation) mapping.compiledPropertyBridges().iterator().next();
    assertTrue(bridge.baseRelation().condition().isTrue());
    AliasMap aliases = bridge.baseRelation().aliases();
    AliasMap expected = new AliasMap(Collections.singleton(SQL.parseAlias("People AS Bosses")));
    assertEquals(expected, aliases);
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.compiledPropertyBridges()

    loader.setGenerateW3CDirectMapping(true);
    Mapping mapping = loader.getMapping();

    // Print some internal stuff that shows how D2RQ maps the
    // database to RDF triples
    for (TripleRelation internal: mapping.compiledPropertyBridges()) {
      System.out.println(internal);
    }

    // Write the contents of the virtual RDF model as N-Triples
    Model model = loader.getModelD2RQ();
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.compiledPropertyBridges()

    loader.setResultSizeLimit(Database.NO_LIMIT);
    Mapping mapping = loader.getMapping();
    try {
      // Trigger compilation
      mapping.compiledPropertyBridges();
      // Override the d2rq:resultSizeLimit given in the mapping
      for (Database db: mapping.databases()) {
        db.connectedDB().setDefaultFetchSize(DUMP_DEFAULT_FETCH_SIZE);
     
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.compiledPropertyBridges()

    Model m = ModelFactory.createDefaultModel();
    Resource dummyDB = m.getResource(Test.DummyDatabase.getURI());
    dummyDB.addProperty(RDF.type, D2RQ.Database);
    m.read(D2RQTestSuite.class.getResourceAsStream(mappingFileName), null, "TURTLE");
    Mapping mapping = new MapParser(m, null).parse();
    return mapping.compiledPropertyBridges();
  }
}
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.