Soprano Namespace Reference


Classes

class  BackendSetting
 Wraps one setting for Model creation. More...
class  Backend
 Soprano::Backend defines the interface for a Soprano backend plugin. More...
class  BindingSet
 Represents one set of bindings in the result of a select query. More...
class  FilterModel
 A FilterModel is a virtual model that wraps another Model. More...
class  Iterator
 The basic Soprano iterator class. More...
class  IteratorBackend
 The actual work in a Iterator instance is done by an IteratorBackend. More...
class  LiteralValue
 Represents a literal value of an RDF Node. More...
class  Model
 A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements. More...
class  Node
 A Node represents one RDF resource. More...
class  NodeIterator
 An iterator that provides a stream of Nodes. More...
class  NRLModel
 Model filter that enforces NRL cardinality rules. More...
class  Parser
 Soprano::Parser defines the interface for a Soprano RDF parser plugin. More...
class  Plugin
 Base class for all plugins in Soprano. More...
class  PluginManager
 The PluginManager loads and maintains all Soprano plugins. More...
class  QueryResultIterator
 An iterator for query results. More...
class  QueryResultIteratorBackend
 QueryResultIteratorBackend is the actual working horse behind QueryResultIterator. More...
class  RdfSchemaModel
 Provides convenience methods to handle RDFS data. More...
class  Serializer
 Soprano::Serializer defines the interface for a Soprano RDF serializer plugin. More...
class  Statement
 A Statement instance represents one RDF quadruple. More...
class  StatementIterator
 An iterator that provides a stream of Statements. More...
class  StorageModel
 Base class for all Model implementations that store data (as compared to FilterModel). More...

Namespaces

namespace  Error
namespace  Query
namespace  Vocabulary
namespace  Inference
namespace  Util
namespace  Index
namespace  Server
namespace  Client

Typedefs

typedef QList< BackendSettingBackendSettings

Enumerations

enum  RdfSerialization {
  SerializationUnknown = 0x0, SerializationRdfXml = 0x1, SerializationN3 = 0x2, SerializationNTriples = 0x4,
  SerializationTurtle = 0x8, SerializationTrig = 0x10, SerializationNQuads = 0x20, SerializationUser = 0x0
}
enum  BackendOption {
  BackendOptionNone = 0x0, BackendOptionStorageMemory = 0x1, BackendOptionEnableInference = 0x2, BackendOptionStorageDir = 0x4,
  BackendOptionUser = 0x1000
}
enum  BackendFeature {
  BackendFeatureNone = 0x0, BackendFeatureAddStatement = 0x1, BackendFeatureRemoveStatements = 0x2, BackendFeatureListStatements = 0x4,
  BackendFeatureQuery = 0x8, BackendFeatureInference = 0x10, BackendFeatureInferenceOptional = 0x20, BackendFeatureContext = 0x40,
  BackendFeatureStorageMemory = 0x80, BackendFeatureUser = 0x1000
}

Functions

SOPRANO_EXPORT const BackenddiscoverBackendByName (const QString &name)
SOPRANO_EXPORT const BackenddiscoverBackendByFeatures (BackendFeatures features, const QStringList &userFeatures=QStringList())
SOPRANO_EXPORT void setUsedBackend (const Backend *)
SOPRANO_EXPORT const BackendusedBackend ()
SOPRANO_EXPORT ModelcreateModel (const QList< BackendSetting > &settings=QList< BackendSetting >())
SOPRANO_EXPORT QString serializationMimeType (RdfSerialization serialization, const QString &userSerialization=QString())
SOPRANO_EXPORT RdfSerialization mimeTypeToSerialization (const QString &mimetype)
SOPRANO_EXPORT unsigned int versionMajor ()
 Returns the major number of Soprano's version, e.g. 1 for Soprano 1.0.2.
SOPRANO_EXPORT unsigned int versionMinor ()
 Returns the minor number of Soprano's version, e.g. 0 for Soprano 1.0.2.
SOPRANO_EXPORT unsigned int versionRelease ()
 Returns the release of Soprano's version, e.g. 2 for Soprano 1.0.2.
SOPRANO_EXPORT const char * versionString ()
 Returns the Soprano version as string, e.g. "1.0.2".


Typedef Documentation

Definition at line 117 of file backend.h.


Enumeration Type Documentation

Different types of RDF serialization.

Enumerator:
SerializationUnknown  The serialization is unknown.
SerializationRdfXml  Standard RDF/XML serialization
SerializationN3  Notation 3: http://www.w3.org/DesignIssues/Notation3
SerializationNTriples  N-Triples as defined by W3: http://www.w3.org/TR/rdf-testcases/#ntriples
SerializationTurtle  Turtle - Terse RDF Triple Language: http://www.dajobe.org/2004/01/turtle/
SerializationTrig  TriG - Turtle + Named Graphs: http://sites.wiwiss.fu-berlin.de/suhl/bizer/TriG/
SerializationNQuads  N-Quads extends over N-Triples in that it adds an optional context node.
SerializationUser  The user type can be used to introduce unknown RDF serializations by name

Definition at line 37 of file sopranotypes.h.

There are two types of backend settings: boolean flags and key/value pairs. The boolean flags are identified by BackendFlag.

See also:
BackendSetting, Backend::createModel()
Enumerator:
BackendOptionNone 
BackendOptionStorageMemory  A boolean option, if set means that the Model should be a pure memory model which does not store any data on disk. Only backend supporting Soprano::BackendFeatureStorageMemory can handle this option. Other backends should return 0 if this option is specified in createModel()
BackendOptionEnableInference  A boolean option, if set means that the Model should have inference enabled. FIXME: but what kind of inference? RDFS only? rule-based?
BackendOptionStorageDir  A key/value option that states the directory where the model should actually store the data.
BackendOptionUser  Additional options can be supported through user options which are identified by a string key in BackendSetting::userSettingName.

Definition at line 75 of file sopranotypes.h.

Each Backend plugin can support different features. Soprano defines a list of well-known features that each backend implementation should try to realize. In addition user features can be defined. For this BackendFeatureUser has to be included in the supported features. Then additional features may be reported through Backend::supportedUserFeatures().

See also:
Backend::supportedFeatures(), Backend::supportedUserFeatures()
Enumerator:
BackendFeatureNone 
BackendFeatureAddStatement  The backend supports the adding of statements (Model::addStatement()).
BackendFeatureRemoveStatements  The backend supports the removal of statements (Model::removeStatement()).
BackendFeatureListStatements  The backend supports the listing of statements (Model::listStatements(), Model::containsStatement())
BackendFeatureQuery  The backend supports RDF queries (Model::executeQuery())
BackendFeatureInference  The backend provides includes inference engine.
BackendFeatureInferenceOptional  The backend's inference engine is optional, i.e. it can be disabled.
BackendFeatureContext  The backend supports contexts, i.e. named graphs. If this feature is not present Statement::context() will always return an empty node.
BackendFeatureStorageMemory  The backend supports pure memory Models. (Soprano::BackendOptionStorageMemory)
BackendFeatureUser  Backends may support additional features that are not officially supported by Soprano.

Definition at line 92 of file sopranotypes.h.


Function Documentation

SOPRANO_EXPORT const Backend* Soprano::discoverBackendByName ( const QString name  ) 

Find a backend plugin by its name.

Returns:
the backend specified by name or null if could not be found.

SOPRANO_EXPORT const Backend* Soprano::discoverBackendByFeatures ( BackendFeatures  features,
const QStringList userFeatures = QStringList() 
)

Find a backend plugin by its features.

Parameters:
features The features that are requested.
userFeatures If features contain Soprano::BackendFeatureUser this paramter states the additionally requested user features.
Returns:
a backend that supports the features defined in features.
See also:
PluginManager::discoverBackendByFeatures()

SOPRANO_EXPORT void Soprano::setUsedBackend ( const Backend *   ) 

By default and if available backend "redland" is used.

SOPRANO_EXPORT const Backend* Soprano::usedBackend (  ) 

SOPRANO_EXPORT Model* Soprano::createModel ( const QList< BackendSetting > &  settings = QList< BackendSetting >()  ) 

Creates a new RDF storage using the backend set via setUsedBackend. The caller takes ownership and has to care about deletion.

Parameters:
settings The settings that should be used to create the Model. Backend implementations should never ignore settings but rather return 0 if an option is not supported. Backends can, however, define their own default settings.
See also:
Model, Backend::createModel

SOPRANO_EXPORT QString Soprano::serializationMimeType ( RdfSerialization  serialization,
const QString userSerialization = QString() 
)

Get the mimetype string of a serialization.

Parameters:
serialization The serialization the mimetype is wanted for.
userSerialization If serialization is SerializationUser then this is the user defined serialization. (this parameter is added for convinience to avoid having an additional check before using this method.)
Returns:
The mimetype of serialization, an empty string is serialization is SerializationUnknown, or userSerialization if serialization is SerializationUser.

SOPRANO_EXPORT RdfSerialization Soprano::mimeTypeToSerialization ( const QString mimetype  ) 

Parse a mimetype and match it to the Soprano::RdfSerialization enum.

Returns:
the Soprano::RdfSerialization type that matches mimetype or SerializationUnknown if the mimetype could not be parsed. Be aware that Soprano is very lax in parsing the mimetype, i.e. you can use simple strings like 'trig' or 'n-quads' instead of the proper mimetype for convenience.

SOPRANO_EXPORT unsigned int Soprano::versionMajor (  ) 

Returns the major number of Soprano's version, e.g. 1 for Soprano 1.0.2.

Returns:
the major version number at runtime.

SOPRANO_EXPORT unsigned int Soprano::versionMinor (  ) 

Returns the minor number of Soprano's version, e.g. 0 for Soprano 1.0.2.

Returns:
the minor version number at runtime.

SOPRANO_EXPORT unsigned int Soprano::versionRelease (  ) 

Returns the release of Soprano's version, e.g. 2 for Soprano 1.0.2.

Returns:
the release number at runtime.

SOPRANO_EXPORT const char* Soprano::versionString (  ) 

Returns the Soprano version as string, e.g. "1.0.2".

On contrary to the macro SOPRANO_VERSION_STRING this function returns the version number of Soprano at runtime.

Returns:
the Soprano version. You can keep the string forever


Generated on Tue Jul 22 17:39:34 2008 for Soprano by  doxygen 1.5.6