本文整理匯總了Python中askomics.libaskomics.rdfdb.SparqlQueryBuilder.SparqlQueryBuilder.prepare_query方法的典型用法代碼示例。如果您正苦於以下問題:Python SparqlQueryBuilder.prepare_query方法的具體用法?Python SparqlQueryBuilder.prepare_query怎麽用?Python SparqlQueryBuilder.prepare_query使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類askomics.libaskomics.rdfdb.SparqlQueryBuilder.SparqlQueryBuilder
的用法示例。
在下文中一共展示了SparqlQueryBuilder.prepare_query方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: deleteMoState
# 需要導入模塊: from askomics.libaskomics.rdfdb.SparqlQueryBuilder import SparqlQueryBuilder [as 別名]
# 或者: from askomics.libaskomics.rdfdb.SparqlQueryBuilder.SparqlQueryBuilder import prepare_query [as 別名]
def deleteMoState(self,urimo):
self.log.debug(' ***** Delete module '+urimo+' on TPS ***** ')
sqb = SparqlQueryBuilder(self.settings, self.session)
ql = QueryLauncher(self.settings, self.session)
ql.execute_query(sqb.prepare_query(
"""
DELETE WHERE { GRAPH <"""+self.graph_modules+"""> { <"""+urimo+"""> ?p ?o } }
"""
).query)
示例2: test_prepare_query
# 需要導入模塊: from askomics.libaskomics.rdfdb.SparqlQueryBuilder import SparqlQueryBuilder [as 別名]
# 或者: from askomics.libaskomics.rdfdb.SparqlQueryBuilder.SparqlQueryBuilder import prepare_query [as 別名]
def test_prepare_query(self):
request = testing.DummyRequest()
sqb = SparqlQueryBuilder(self.settings, request.session)
temp = self.get_template1()
sqb.prepare_query(temp)