本文整理汇总了Java中de.fuberlin.wiwiss.d2rq.expr.AttributeExpr类的典型用法代码示例。如果您正苦于以下问题:Java AttributeExpr类的具体用法?Java AttributeExpr怎么用?Java AttributeExpr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AttributeExpr类属于de.fuberlin.wiwiss.d2rq.expr包,在下文中一共展示了AttributeExpr类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildRelation
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
protected Relation buildRelation() {
ConnectedDB database = belongsToClassMap.database().connectedDB();
RelationBuilder builder = belongsToClassMap.relationBuilder(database);
builder.addOther(relationBuilder(database));
if (this.refersToClassMap != null) {
builder.addAliased(this.refersToClassMap.relationBuilder(database));
}
for (String pattern: dynamicPropertyPatterns) {
builder.addOther(new PropertyMap(pattern, belongsToClassMap.database()).relationBuilder(database));
}
if (this.limit!=null) {
builder.setLimit(this.limit.intValue());
}
if (this.limitInverse!=null) {
builder.setLimitInverse(this.limitInverse.intValue());
}
if (this.order!=null) {
builder.setOrderSpecs(Collections.singletonList(
new OrderSpec(new AttributeExpr(SQL.parseAttribute(this.order)), this.orderDesc.booleanValue())));
}
return builder.buildRelation();
}
示例2: orderSpecs
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public List<OrderSpec> orderSpecs(boolean ascending) {
List<OrderSpec> result = new ArrayList<OrderSpec>(columns.size());
for (Attribute column: columns) {
result.add(new OrderSpec(new AttributeExpr(column), ascending));
}
return result;
}
示例3: toExpression
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public Expression toExpression() {
List<Expression> parts = new ArrayList<Expression>(literalParts.size() * 2 + 1);
parts.add(new Constant(firstLiteralPart));
for (int i = 0; i < columns.size(); i++) {
parts.add(new AttributeExpr(columns.get(i)));
parts.add(new Constant(literalParts.get(i)));
}
return Concatenation.create(parts);
}
示例4: orderSpecs
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public List<OrderSpec> orderSpecs(boolean ascending) {
List<OrderSpec> result = new ArrayList<OrderSpec>(attributes.size());
for (Attribute column: attributes) {
result.add(new OrderSpec(new AttributeExpr(column), ascending));
}
return result;
}
示例5: toExpression
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public Expression toExpression() {
List<Expression> parts = new ArrayList<Expression>();
parts.add(new Constant(classMapID));
for (Attribute attribute: attributes) {
parts.add(new Constant(DELIMITER));
parts.add(new AttributeExpr(attribute));
}
return Concatenation.create(parts);
}
示例6: assertPatternValues
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
private void assertPatternValues(Pattern pattern, String value, Map<String,String> expectedValues) {
assertTrue(matches(pattern, value));
Collection<Expression> expressions = new HashSet<Expression>();
for (String attributeName: expectedValues.keySet()) {
String attributeValue = (String) expectedValues.get(attributeName);
Attribute attribute = SQL.parseAttribute(attributeName);
expressions.add(Equality.create(
new AttributeExpr(attribute),
new Constant(attributeValue, attribute)));
}
Expression expr = Conjunction.create(expressions);
assertEquals(expr, pattern.valueExpression(value));
}
示例7: toExpression
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public Expression toExpression() {
return new AttributeExpr(this);
}
示例8: notNullExpression
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public Expression notNullExpression(ConnectedDB db, AliasMap aliases) {
if (db.isNullable(aliases.originalOf(this))) {
return NotNull.create(new AttributeExpr(this));
}
return Expression.TRUE;
}
示例9: orderSpecs
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public List<OrderSpec> orderSpecs(boolean ascending) {
return Collections.singletonList(
new OrderSpec(new AttributeExpr(attribute), ascending));
}
示例10: testExpressionEqualsAttribute
import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public void testExpressionEqualsAttribute() {
nodes.limitValuesToExpression(expression1);
nodes.limitValuesToAttribute(table1bar);
assertEquals(Equality.create(expression1, new AttributeExpr(table1bar)),
nodes.constraint());
}