Examples of nodeMaker()


Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.nodeMaker()

    assertEquals(Collections.singleton(table1id), r.projections());
    assertEquals(Expression.TRUE, r.condition());
    assertEquals(AliasMap.NO_ALIASES, r.aliases());
    assertEquals(Collections.singleton(x), nodeRel.variables());
    assertEquals("URI(Pattern(http://example.org/res@@table1.id@@))",
        nodeRel.nodeMaker(x).toString());
  }
 
  public void testConstraintInTripleNoMatch() {
    assertNull(translate1("?x rdf:type ?x", "engine/type-bridge.n3"));
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.nodeMaker()

  public void testAskTwoTriplePatternsMatch() {
    NodeRelation nodeRel = translate1(
        "ex:res1 rdf:type ex:Class1 . ex:res1 ex:foo ?foo",
        "engine/simple.n3");
    assertEquals(Collections.singleton(foo), nodeRel.variables());
    assertEquals("Literal(Column(T2_table1.foo))", nodeRel.nodeMaker(foo).toString());
    Relation r = nodeRel.baseRelation();
    assertEquals("Conjunction(" +
        "Equality(" +
            "AttributeExpr(@@T1_table1.id@@), " +
            "Constant(1@T1_table1.id)), " +
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.nodeMaker()

    NodeRelation intvalue = search("table2", "intvalue", rels);
 
    Expr disjunction = new E_LogicalOr(new E_Equals(new ExprVar("o"),  NodeValue.makeNode("1", XSDDatatype.XSDint)), new E_Equals(new ExprVar("o"), NodeValue.makeNode("2", XSDDatatype.XSDint)));
   
    Expression result = TransformExprToSQLApplyer.convert(disjunction, intvalue);
    TypedNodeMaker nm = (TypedNodeMaker) intvalue.nodeMaker(Var.alloc("o"));
    Expression e1 = nm.valueMaker().valueExpression("1");
    Expression e2 = nm.valueMaker().valueExpression("2");
    Expression expected = e1.or(e2);
   
    assertEquals("?o = \"1\"^^xsd:int || ?o = \"2\"^^xsd:int", expected, result);
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.nodeMaker()

    NodeRelation intvalue = search("table2", "intvalue", rels);
 
    Expr sameTerm = new E_SameTerm(new ExprVar("o"),  NodeValue.makeNode("1", XSDDatatype.XSDint));
   
    Expression result = TransformExprToSQLApplyer.convert(sameTerm, intvalue);
    TypedNodeMaker nm = (TypedNodeMaker) intvalue.nodeMaker(Var.alloc("o"));
    Expression expected = nm.valueMaker().valueExpression("1");
   
    assertEquals("sameTerm(?o, \"1\"^^xsd:int)", expected, result);
   
    sameTerm = new E_SameTerm(new ExprVar("o"),  NodeValue.makeNode("1", XSDDatatype.XSDdecimal));
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.nodeMaker()

    NodeRelation nodeRel = translate1(
        "?x rdf:type ex:Class1 . ?x ex:foo ?foo",
        "engine/simple.n3");
    assertEquals(2, nodeRel.variables().size());
    assertEquals("Literal(Column(T2_table1.foo))",
        nodeRel.nodeMaker(foo).toString());
    assertEquals("URI(Pattern(http://example.org/res@@T1_table1.id@@))",
        nodeRel.nodeMaker(x).toString());
    Relation r = nodeRel.baseRelation();
    assertEquals(Equality.createAttributeEquality(t1table1id, t2table1id),
        r.condition());
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.nodeMaker()

        "engine/simple.n3");
    assertEquals(2, nodeRel.variables().size());
    assertEquals("Literal(Column(T2_table1.foo))",
        nodeRel.nodeMaker(foo).toString());
    assertEquals("URI(Pattern(http://example.org/res@@T1_table1.id@@))",
        nodeRel.nodeMaker(x).toString());
    Relation r = nodeRel.baseRelation();
    assertEquals(Equality.createAttributeEquality(t1table1id, t2table1id),
        r.condition());
  }
View Full Code Here

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

  }
 
  public void testAttributesInRefersToClassMapAreRenamed() {
    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    assertEquals("URI(Pattern(http://test/employee@@e.ID@@))",
        relation.nodeMaker(TripleRelation.SUBJECT).toString());
    assertEquals("URI(Pattern(http://test/employee@@m.ID@@))",
        relation.nodeMaker(TripleRelation.OBJECT).toString());
  }
 
  public void testJoinConditionsInRefersToClassMapAreRenamed() {
View Full Code Here

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

  public void testAttributesInRefersToClassMapAreRenamed() {
    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    assertEquals("URI(Pattern(http://test/employee@@e.ID@@))",
        relation.nodeMaker(TripleRelation.SUBJECT).toString());
    assertEquals("URI(Pattern(http://test/employee@@m.ID@@))",
        relation.nodeMaker(TripleRelation.OBJECT).toString());
  }
 
  public void testJoinConditionsInRefersToClassMapAreRenamed() {
    TripleRelation relation = (TripleRelation) this.managerBridge.toTripleRelations().iterator().next();
    Set<String> joinsToString = new HashSet<String>();
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.map.DownloadMap.nodeMaker()

    assertEquals("image/png",
        d.getMediaTypeValueMaker().makeValue(
            new ResultRow() {public String get(ProjectionSpec column) {return null;}}));
    assertEquals("People.pic", d.getContentDownloadColumn().qualifiedName());
    assertEquals("URI(Pattern(http://example.org/downloads/@@People.ID@@))",
        d.nodeMaker().toString());
    assertEquals(
        new HashSet<ProjectionSpec>() {{
          add(SQL.parseAttribute("People.ID"));
          add(SQL.parseAttribute("People.pic"));
        }},
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.