當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。