KDE 4.2 PyKDE API Reference

- KDE's Python API

# Soprano.Query Namespace Reference

`from PyKDE4.soprano.Soprano.Query import *`

## Detailed Description

## Enumerations

QueryLanguage | { QueryLanguageNone, QueryLanguageSparql, QueryLanguageRdql, QueryLanguageSerql, QueryLanguageUser, QUERY_LANGUAGE_NONE, QUERY_LANGUAGE_SPARQL, QUERY_LANGUAGE_RDQL, QUERY_LANGUAGE_SERQL, QUERY_LANGUAGE_USER }

## Functions

Soprano.Query.QueryLanguage | queryLanguageFromString (QString queryLanguage)
QString | queryLanguageToString (Soprano.Query.QueryLanguage lang, QString userQueryLanguage=QString())

## Enumeration Documentation

QueryLanguage

%Soprano defines a set of well-known query languages that can be used to serialize queries. Additional languages may be supported using Query.QueryLanguageUser in combination with string codes.

\sa Model.executeQuery, Query.Parser, Query.Serializer

Enumerator:

  QueryLanguageNone = 0x0 No query language < p> |
  QueryLanguageSparql = 0x1 The SPARQL query language: http: www.w3.org TR rdf-sparql-query < p> |
  QueryLanguageRdql = 0x2 The RDQL RDF query language: http: www.w3.org Submission 2004 SUBM-RDQL-20040109 < p> |
  QueryLanguageSerql = 0x4 Sesame RDF %Query Language: http: openrdf.org doc sesame2 users ch05.html < p> |
  QueryLanguageUser = 0x1000 The user type can be used to introduce unknown query lanaguages by name < p> |

  QUERY_LANGUAGE_NONE = QueryLanguageNone
  Deprecated:< b>< dt>
    use QueryLanguageNone < dd>< dl> < p>

  QUERY_LANGUAGE_SPARQL = QueryLanguageSparql
  Deprecated:< b>< dt>
    use QueryLanguageSparql < dd>< dl> < p>

  QUERY_LANGUAGE_RDQL = QueryLanguageRdql
  Deprecated:< b>< dt>
    use QueryLanguageRdql < dd>< dl> < p>

  QUERY_LANGUAGE_SERQL = QueryLanguageSerql
  Deprecated:< b>< dt>
    use QueryLanguageSerql < dd>< dl> < p>

  QUERY_LANGUAGE_USER = QueryLanguageUser
  Deprecated:< b>< dt>
    use QueryLanguageUser < dd>< dl> < p>

## Function Documentation

Soprano.Query.QueryLanguage queryLanguageFromString | ( | QString | queryLanguage
| ) |  |  |

Convert a query language string into a Soprano.Query.QueryLanguage value.

Parameters:

  | queryLanguage | The query language string to convert.

Returns:
  The QueryLanguage value corresponding to queryLanguage or Soprano.Query.QueryLanguageUser if it is unknown.

QString queryLanguageToString | ( | Soprano.Query.QueryLanguage | lang,
|  | QString | userQueryLanguage=QString()
| ) |  |  |

Convert a Soprano.Query.QueryLanguage value into a string representation.

Parameters:

  | lang | The query language to convert

Parameters:

  | userQueryLanguage | If lang equals Query.QueryLanguageUser, userQueryLanguage defines the language to use.

Returns:
  A string representation of lang. If lang equals Soprano.Query.QueryLanguageUser, the method simply returns userQueryLanguage.