Soprano  2.7.56
Namespaces | Classes | Typedefs | Enumerations | Functions
Soprano Namespace Reference

Namespaces

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

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  Graph
 A simple collection of statements. 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  LanguageTag
 A LanguageTag represents a language according to RFC 3066 and RFC 4646. 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  N3NodeParser
 Parser which converts N3 string representation of nodes into Node objects. 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 makes working with NRL data simpler. 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...

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,
  BackendOptionHost = 0x8, BackendOptionPort = 0x10, BackendOptionUsername = 0x20, BackendOptionPassword = 0x40,
  BackendOptionUser = 0x1000
}
enum  BackendFeature {
  BackendFeatureNone = 0x0, BackendFeatureAddStatement = 0x1, BackendFeatureRemoveStatements = 0x2, BackendFeatureListStatements = 0x4,
  BackendFeatureQuery = 0x8, BackendFeatureInference = 0x10, BackendFeatureInferenceOptional = 0x20, BackendFeatureContext = 0x40,
  BackendFeatureStorageMemory = 0x80, BackendFeatureAll, 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 BackendSettings &settings=BackendSettings())
SOPRANO_EXPORT QDebug operator<< (QDebug dbg, const Graph &graph)
SOPRANO_EXPORT uint qHash (const LanguageTag &node)
SOPRANO_EXPORT uint qHash (const LiteralValue &lit)
SOPRANO_EXPORT QString serializationMimeType (RdfSerialization serialization, const QString &userSerialization=QString())
SOPRANO_EXPORT RdfSerialization mimeTypeToSerialization (const QString &mimetype)

Typedef Documentation

List of BackendSetting.

See also:
isOptionInSettings, settingInSettings, valueInSettings

Definition at line 122 of file backend.h.


Enumeration Type Documentation

Different types of RDF serialization.

See also:
serializationMimeType, mimeTypeToSerialization
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 39 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.

BackendOptionHost 

A string option defining a host to connect to (IP address or domain name).

Since:
2.3
BackendOptionPort 

An integer option defining the port on which to connect the host.

Since:
2.3
BackendOptionUsername 

A string option optionally defining the username.

Since:
2.3
BackendOptionPassword 

A string option optionally defining the password.

Since:
2.3
BackendOptionUser 

Additional options can be supported through user options which are identified by a string key in BackendSetting::userSettingName.

Definition at line 77 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)

BackendFeatureAll 

All features.

Since:
2.3
BackendFeatureUser 

Backends may support additional features that are not officially supported by Soprano.

Definition at line 98 of file sopranotypes.h.


Function Documentation

Find a backend plugin by its name.

Returns:
the backend specified by name or null if could not be found.
See also:
PluginManager::discoverBackendByName()
SOPRANO_EXPORT const Backend * discoverBackendByFeatures ( BackendFeatures  features,
const QStringList userFeatures = QStringList() 
)

Find a backend plugin by its features.

Parameters:
featuresThe features that are requested.
userFeaturesIf 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 setUsedBackend ( const Backend *  )

Set the Backend to globally use in createModel.

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

Retrieve the Backend to globally use in createModel.

Can be set via setUsedBackend.

SOPRANO_EXPORT Model * createModel ( const BackendSettings &  settings = BackendSettings())

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

Parameters:
settingsThe 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, BackendSetting
SOPRANO_EXPORT QDebug Soprano::operator<< ( QDebug  dbg,
const Graph &  graph 
)
SOPRANO_EXPORT uint Soprano::qHash ( const LanguageTag &  node)
SOPRANO_EXPORT uint Soprano::qHash ( const LiteralValue &  lit)
SOPRANO_EXPORT QString Soprano::serializationMimeType ( RdfSerialization  serialization,
const QString userSerialization = QString() 
)

Get the mimetype string of a serialization.

Parameters:
serializationThe serialization the mimetype is wanted for.
userSerializationIf 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.

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.