KDE 4.9 PyKDE API Reference

- KDE's Python API

# SparqlModel Class Reference

`from PyKDE4.soprano import *`

Inherits: Soprano.Model → QObject
Namespace: Soprano.Client

## Detailed Description

## Methods
| __init__ (self, QString host=QString(), int port=80, QString user=QString(), QString password=QString())
Soprano.Error.ErrorCode | addStatement (self, Soprano.Statement statement)
bool | containsAnyStatement (self, Soprano.Statement statement)
bool | containsStatement (self, Soprano.Statement statement)
Soprano.Node | createBlankNode (self)
Soprano.QueryResultIterator | executeQuery (self, QString query, Soprano.Query.QueryLanguage language=Soprano.Query.QueryLanguageSparql, QString userQueryLanguage=QString())
Soprano.Util.AsyncResult | executeQueryAsync (self, QString query, Soprano.Query.QueryLanguage language=Soprano.Query.QueryLanguageSparql, QString userQueryLanguage=QString())
bool | isEmpty (self)
Soprano.NodeIterator | listContexts (self)
Soprano.Util.AsyncResult | listContextsAsync (self)
Soprano.StatementIterator | listStatements (self, Soprano.Statement partial)
Soprano.Util.AsyncResult | listStatementsAsync (self, Soprano.Statement statement)
Soprano.Error.ErrorCode | removeAllStatements (self, Soprano.Statement statement)
Soprano.Error.ErrorCode | removeStatement (self, Soprano.Statement statement)
| setHost (self, QString host, int port=80)
| setPath (self, QString path)
| setUser (self, QString user, QString password=QString())
int | statementCount (self)

## Method Documentation

__init__ | ( | self, |
|  | QString | host=QString(),
|  | int | port=80,
|  | QString | user=QString(),
|  | QString | password=QString()
| ) |  |  |

Soprano.Error.ErrorCode addStatement | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

bool containsAnyStatement | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

bool containsStatement | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

Soprano.Node createBlankNode | ( |  | self ) |

Soprano.QueryResultIterator executeQuery | ( | self, |
|  | QString | query,
|  | Soprano.Query.QueryLanguage | language=Soprano.Query.QueryLanguageSparql,
|  | QString | userQueryLanguage=QString()
| ) |  |  |

Soprano.Util.AsyncResult executeQueryAsync | ( | self, |
|  | QString | query,
|  | Soprano.Query.QueryLanguage | language=Soprano.Query.QueryLanguageSparql,
|  | QString | userQueryLanguage=QString()
| ) |  |  |

bool isEmpty | ( |  | self ) |

Soprano.NodeIterator listContexts | ( |  | self ) |

Soprano.Util.AsyncResult listContextsAsync | ( |  | self ) |

Soprano.StatementIterator listStatements | ( | self, |
|  | Soprano.Statement | partial
| ) |  |  |

Soprano.Util.AsyncResult listStatementsAsync | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

Soprano.Error.ErrorCode removeAllStatements | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

Soprano.Error.ErrorCode removeStatement | ( | self, |
|  | Soprano.Statement | statement
| ) |  |  |

setHost | ( | self, |
|  | QString | host,
|  | int | port=80
| ) |  |  |

setPath | ( | self, |
|  | QString | path
| ) |  |  |

setUser | ( | self, |
|  | QString | user,
|  | QString | password=QString()
| ) |  |  |

int statementCount | ( |  | self ) |