コード例 #1
0
ファイル: SmartWrapper.py プロジェクト: agarrido/ro-manager
 def query(self) :
     """Execute the query and do an automatic conversion.
         
     Exceptions can be raised if either the URI is wrong or the HTTP sends
     back an error. The usual urllib2 exceptions are raised, which cover
     possible SPARQL errors, too.
     
     If the query type is *not* SELECT, the method falls back to the
     ``corresponding method in the superclass<SPARQLWrapper.query>``.
     
     :return: query result
     :rtype: ``Bindings`` instance
     """
     res = SPARQLWrapper.query(self)
     if self.queryType == SELECT :
         return Bindings(res)
     else :
         return res