当前位置: 首页>>代码示例>>Java>>正文


Java AttributeExpr类代码示例

本文整理汇总了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(); 
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:23,代码来源:PropertyBridge.java

示例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;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:8,代码来源:Pattern.java

示例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);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:10,代码来源:Pattern.java

示例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;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:8,代码来源:BlankNodeID.java

示例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);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:10,代码来源:BlankNodeID.java

示例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));
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:14,代码来源:PatternTest.java

示例7: toExpression

import de.fuberlin.wiwiss.d2rq.expr.AttributeExpr; //导入依赖的package包/类
public Expression toExpression() {
	return new AttributeExpr(this);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:4,代码来源:Attribute.java

示例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;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:7,代码来源:Attribute.java

示例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));
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:5,代码来源:Column.java

示例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());
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:7,代码来源:NodeSetTest.java


注:本文中的de.fuberlin.wiwiss.d2rq.expr.AttributeExpr类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。