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