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


Java DummyDB类代码示例

本文整理汇总了Java中de.fuberlin.wiwiss.d2rq.sql.DummyDB的典型用法代码示例。如果您正苦于以下问题:Java DummyDB类的具体用法?Java DummyDB怎么用?Java DummyDB使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DummyDB类属于de.fuberlin.wiwiss.d2rq.sql包,在下文中一共展示了DummyDB类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
public void setUp() {
	this.model = ModelFactory.createDefaultModel();
	this.mapping = new Mapping();
	this.database = new Database(this.model.createResource());
	database.useConnectedDB(new DummyDB());
	this.mapping.addDatabase(this.database);

	employees = createClassMap("http://test/[email protected]@[email protected]@");
	employees.addAlias("employees AS e");
	employees.addJoin("e.ID = foo.bar");
	employees.addCondition("e.status = 'active'");
	managerBridge = createPropertyBridge(employees, "http://terms.example.org/manager");
	managerBridge.addAlias("e AS m");
	managerBridge.setRefersToClassMap(this.employees);
	managerBridge.addJoin("e.manager = m.ID");
	
	cities = createClassMap("http://test/[email protected]@[email protected]@");
	citiesTypeBridge = createPropertyBridge(cities, RDF.type.getURI());
	citiesTypeBridge.setConstantValue(model.createResource("http://terms.example.org/City"));
	citiesNameBridge = createPropertyBridge(cities, "http://terms.example.org/name");
	citiesNameBridge.setColumn("c.name");
	countries = createClassMap("http://test/countries/@@[email protected]@");
	countries.setContainsDuplicates(true);
	countriesTypeBridge = createPropertyBridge(countries, RDF.type.getURI());
	countriesTypeBridge.setConstantValue(model.createResource("http://terms.example.org/Country"));
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:27,代码来源:CompileTest.java

示例2: setUp

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
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);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:14,代码来源:CompatibleRelationGroupTest.java

示例3: connectToDummyDB

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
public static void connectToDummyDB(Database db) {
	db.useConnectedDB(new DummyDB());
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:4,代码来源:MappingHelper.java

示例4: setUp

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
public void setUp() {
	db = new DummyDB();
	rel1 = Relation.createSimpleRelation(db, 
			new Attribute[]{new Attribute(null, "foo", "bar")});
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:6,代码来源:RelationTest.java

示例5: testConstantToSQL

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
public void testConstantToSQL() {
	assertEquals("'foo'", new Constant("foo").toSQL(new DummyDB(), AliasMap.NO_ALIASES));
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:4,代码来源:ExpressionTest.java

示例6: testConstantToSQLWithType

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
public void testConstantToSQLWithType() {
	Attribute attribute = SQL.parseAttribute("table.col1");
	DummyDB db = new DummyDB(Collections.singletonMap("table.col1", GenericType.NUMERIC));
	assertEquals("42", new Constant("42", attribute).toSQL(db, AliasMap.NO_ALIASES));
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:6,代码来源:ExpressionTest.java

示例7: testConstantToSQLWithTypeAndAlias

import de.fuberlin.wiwiss.d2rq.sql.DummyDB; //导入依赖的package包/类
public void testConstantToSQLWithTypeAndAlias() {
	Attribute aliasedAttribute = SQL.parseAttribute("alias.col1");
	DummyDB db = new DummyDB(Collections.singletonMap("table.col1", GenericType.NUMERIC));
	assertEquals("42", new Constant("42", aliasedAttribute).toSQL(db, aliases));
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:6,代码来源:ExpressionTest.java


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