Package de.fuberlin.wiwiss.d2rq.algebra

Examples of de.fuberlin.wiwiss.d2rq.algebra.TripleRelation.baseRelation()


  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


    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);
  }
 
  public void testParseResourceInsteadOfLiteral() {
View Full Code Here

  }
 
  public void testJoinConditionsInRefersToClassMapAreRenamed() {
    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    Set<String> joinsToString = new HashSet<String>();
    for (Join join: relation.baseRelation().joinConditions()) {
      joinsToString.add(join.toString());
    }
    assertEquals(new HashSet<String>(Arrays.asList(new String[]{
        "Join(e.manager <=> m.ID)",
        "Join(m.ID <=> foo.bar)",
View Full Code Here

  }
 
  public void testConditionInRefersToClassMapIsRenamed() {
    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    assertEquals("Conjunction(SQL(e.status = 'active'), SQL(m.status = 'active'))",
        relation.baseRelation().condition().toString());
  }

  public void testAliasesInRefersToClassMapAreRenamed() {
    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    assertEquals(
View Full Code Here

    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    assertEquals(
        new AliasMap(Arrays.asList(new Alias[]{
            SQL.parseAlias("employees AS e"),
            SQL.parseAlias("employees AS m")})),
        relation.baseRelation().aliases());
  }
 
  public void testSimpleTypeBridgeContainsNoDuplicates() {
    assertTrue(this.citiesTypeBridge.buildRelation().isUnique());
  }
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.