本文整理匯總了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; }