本文整理汇总了Java中de.fuberlin.wiwiss.d2rq.expr.Expression.TRUE属性的典型用法代码示例。如果您正苦于以下问题:Java Expression.TRUE属性的具体用法?Java Expression.TRUE怎么用?Java Expression.TRUE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类de.fuberlin.wiwiss.d2rq.expr.Expression
的用法示例。
在下文中一共展示了Expression.TRUE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSimpleRelation
public static Relation createSimpleRelation(
ConnectedDB database, Attribute[] attributes) {
return new RelationImpl(database, AliasMap.NO_ALIASES, Expression.TRUE, Expression.TRUE,
Collections.<Join>emptySet(),
new HashSet<ProjectionSpec>(Arrays.asList(attributes)),
false, Collections.<OrderSpec>emptyList(), -1, -1);
}
示例2: setUp
public void setUp() {
db = new DummyDB();
projections1 = Collections.<ProjectionSpec>singleton(new Attribute(null, "table", "unique"));
projections2 = Collections.<ProjectionSpec>singleton(new Attribute(null, "table", "not_unique"));
unique = new RelationImpl(
db, AliasMap.NO_ALIASES, Expression.TRUE, Expression.TRUE,
Collections.<Join>emptySet(),
projections1, true, OrderSpec.NONE, Relation.NO_LIMIT, Relation.NO_LIMIT);
notUnique = new RelationImpl(
db, AliasMap.NO_ALIASES, Expression.TRUE, Expression.TRUE,
Collections.<Join>emptySet(),
projections2, false, OrderSpec.NONE, Relation.NO_LIMIT, Relation.NO_LIMIT);
}
示例3: testWithPrefix
public void testWithPrefix() {
RelationName original = new RelationName(null, "original");
RelationName alias = new RelationName(null, "alias");
AliasMap aliases = AliasMap.create1(original, alias);
Set<ProjectionSpec> projections = new HashSet<ProjectionSpec>(Arrays.asList(new Attribute[]{
new Attribute(original, "id"),
new Attribute(alias, "value")}));
Relation rel = new RelationImpl(
null, aliases, Expression.TRUE, Expression.TRUE,
Collections.<Join>emptySet(), projections, false, OrderSpec.NONE, Relation.NO_LIMIT, Relation.NO_LIMIT);
TripleRelation t = new TripleRelation(rel,
new TypedNodeMaker(TypedNodeMaker.URI, new Pattern("http://example.org/original/@@[email protected]@"), true),
new FixedNodeMaker(Node.createURI("http://example.org/property"), false),
new TypedNodeMaker(TypedNodeMaker.PLAIN_LITERAL, new Column(new Attribute(alias, "value")), false));
assertEquals("URI(Pattern(http://example.org/original/@@[email protected]@))",
t.nodeMaker(TripleRelation.SUBJECT).toString());
assertEquals("Literal(Column(alias.value))",
t.nodeMaker(TripleRelation.OBJECT).toString());
assertEquals("AliasMap(original AS alias)",
t.baseRelation().aliases().toString());
NodeRelation t4 = t.withPrefix(4);
assertEquals("URI(Pattern(http://example.org/original/@@[email protected]@))",
t4.nodeMaker(TripleRelation.SUBJECT).toString());
assertEquals("Literal(Column(T4_alias.value))",
t4.nodeMaker(TripleRelation.OBJECT).toString());
assertEquals("AliasMap(original AS T4_alias, original AS T4_original)",
t4.baseRelation().aliases().toString());
}
示例4: setUp
public void setUp() {
Relation base = new RelationImpl(null, AliasMap.NO_ALIASES,
Expression.TRUE, Expression.TRUE,
Collections.<Join>emptySet(), Collections.<ProjectionSpec>emptySet(),
false, OrderSpec.NONE, Relation.NO_LIMIT, Relation.NO_LIMIT);
this.withURIPatternSubject = new TripleRelation(base,
new TypedNodeMaker(TypedNodeMaker.URI,
new Pattern("http://test/[email protected]@[email protected]@"), true),
new FixedNodeMaker(RDF.type.asNode(), false),
new FixedNodeMaker(FOAF.Person.asNode(), false));
this.withURIPatternSubjectAndObject = new TripleRelation(base,
new TypedNodeMaker(TypedNodeMaker.URI,
new Pattern("http://test/[email protected]@[email protected]@"), true),
new FixedNodeMaker(FOAF.knows.asNode(), false),
new TypedNodeMaker(TypedNodeMaker.URI,
new Pattern("http://test/[email protected]@[email protected]@"), true));
this.withURIColumnSubject = new TripleRelation(base,
new TypedNodeMaker(TypedNodeMaker.URI,
new Column(new Attribute(null, "employees", "homepage")), false),
new FixedNodeMaker(RDF.type.asNode(), false),
new FixedNodeMaker(FOAF.Document.asNode(), false));
this.withURIPatternSubjectAndURIColumnObject = new TripleRelation(base,
new TypedNodeMaker(TypedNodeMaker.URI,
new Pattern("http://test/[email protected]@[email protected]@"), true),
new FixedNodeMaker(FOAF.homepage.asNode(), false),
new TypedNodeMaker(TypedNodeMaker.URI,
new Column(new Attribute(null, "employees", "homepage")), false));
this.employeeChecker = new URIMakerRule().createRuleChecker(
Node.createURI("http://test/person1"));
this.foobarChecker = new URIMakerRule().createRuleChecker(
Node.createURI("http://test/foobar"));
}
示例5: notNullExpression
public Expression notNullExpression(ConnectedDB db, AliasMap aliases) {
if (db.isNullable(aliases.originalOf(this))) {
return NotNull.create(new AttributeExpr(this));
}
return Expression.TRUE;
}
示例6: valueExpression
public Expression valueExpression(String value) {
return this.value.equals(value) ? Expression.TRUE : Expression.FALSE;
}
示例7: getRowNumLimitAsExpression
@Override
public Expression getRowNumLimitAsExpression(int limit) {
if (limit == Database.NO_LIMIT) return Expression.TRUE;
return SQLExpression.create("ROWNUM <= " + limit);
}
示例8: getRowNumLimitAsExpression
public Expression getRowNumLimitAsExpression(int limit) {
return Expression.TRUE;
}
示例9: condition
public Expression condition() { return Expression.TRUE; }
示例10: softCondition
public Expression softCondition() { return Expression.TRUE; }