• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

soprano

Soprano::RdfSchemaModel

Soprano::RdfSchemaModel Class Reference

#include <Soprano/RdfSchemaModel>

Inheritance diagram for Soprano::RdfSchemaModel:

Inheritance graph
[legend]

List of all members.


Detailed Description

Provides convenience methods to handle RDFS data.

Interface based on Sesame's RdfSchemaSource. (Copyright (C) 2002-2006 Aduna BV, GNU LGPL License applies.)

Warning:
Backward inferencing has not been implemented yet. Thus, methods like subClassOf() return the same as directSubClassOf().
Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 45 of file rdfschemamodel.h.


Public Member Functions

StatementIterator classes () const
StatementIterator directSubClassOf (const Node &subClass, const Node &superClass=Node()) const
StatementIterator directSubPropertyOf (const Node &subProperty, const Node &superProperty=Node()) const
StatementIterator directType (const Node &someClass, const Node &someType) const
StatementIterator domain (const Node &prop, const Node &domain) const
bool isClass (const Node &resource) const
bool isDirectSubClassOf (const Node &subClass, const Node &superClass) const
bool isDirectSubPropertyOf (const Node &subProperty, const Node &superProperty) const
bool isDirectType (const Node &someClass, const Node &someType) const
bool isProperty (const Node &resource) const
bool isSubClassOf (const Node &subClass, const Node &superClass) const
bool isSubPropertyOf (const Node &subProperty, const Node &superProperty) const
bool isType (const Node &someClass, const Node &someType) const
StatementIterator properties () const
StatementIterator range (const Node &prop, const Node &range) const
 RdfSchemaModel (Model *parentModel=0)
StatementIterator subClassOf (const Node &subClass, const Node &superClass=Node()) const
StatementIterator subPropertyOf (const Node &subProperty, const Node &superProperty=Node()) const
StatementIterator type (const Node &someClass, const Node &someType) const
 ~RdfSchemaModel ()

Constructor & Destructor Documentation

Soprano::RdfSchemaModel::RdfSchemaModel ( Model *  parentModel = 0  ) 

Create a new RDF Schema wrapper model that performs actions on model.

Soprano::RdfSchemaModel::~RdfSchemaModel (  ) 

Destructor.


Member Function Documentation

StatementIterator Soprano::RdfSchemaModel::classes (  )  const

Get all defined RDF/S classes.

Returns:
a StatementIterator that iterates over all statements in the model defining an RDF/S class.

StatementIterator Soprano::RdfSchemaModel::directSubClassOf ( const Node &  subClass,
const Node &  superClass = Node() 
) const

Gets all direct subClassOf relations with a specific sub- and/or superclass.

A class A is a direct subclass of class B if there is no class C such that A is a subclass of C and C is a subclass of B.

Parameters:
subClass The subclass of the relations that should be returned, or an empty node if relations with any subclass should be returned.
superClass The superclass of the relations that should be returned, or an empty node if relations with any superclass should be returned.
Returns:
A StatementIterator containing statements of the form (subClass, rdfs:subClassOf, superClass).

StatementIterator Soprano::RdfSchemaModel::directSubPropertyOf ( const Node &  subProperty,
const Node &  superProperty = Node() 
) const

Gets all direct subPropertyOf relations with a specific sub- and/or superproperty.

A property A is a direct subproperty of property B if there is no property C such that A is a subproperty of C and C is a subproperty of B.

Parameters:
subProperty The subproperty of the relations that should be returned, or an empty node if relations with any subproperty should be returned.
superProperty The superproperty of the relations that should be returned, or an empty node if relations with any superproperty should be returned.
Returns:
A StatementIterator containing statements of the form (subProperty, rdfs:subPropertyOf, superProperty).

StatementIterator Soprano::RdfSchemaModel::directType ( const Node &  someClass,
const Node &  someType 
) const

Gets all direct type relations with a specific instance and/or class.

Parameters:
someClass The instance of the relations that should be returned, or an empty node if relations with any instance should be returned.
someType The class of the relations that should be returned, or an empty node if relations with any class should be returned.
Returns:
A StatementIterator containing statements of the form (someClass, rdf:type, someType).

StatementIterator Soprano::RdfSchemaModel::domain ( const Node &  prop,
const Node &  domain 
) const

Gets all domain relations with a specific property and/or domain class.

Parameters:
prop The property of the relations that should be returned, or an empty node if relations with any property should be returned.
domain The domain of the relations that should be returned, or an empty node if relations with any domain should be returned.
Returns:
A StatementIterator containing statements of the form (prop, rdfs:domain, domain).

bool Soprano::RdfSchemaModel::isClass ( const Node &  resource  )  const

Checks whether the supplied resource represents a class.

Parameters:
resource The resource to check.
Returns:
true if resource is a class, false otherwise.

bool Soprano::RdfSchemaModel::isDirectSubClassOf ( const Node &  subClass,
const Node &  superClass 
) const

Checks whether one resource is a direct subclass of another.

Parameters:
subClass A class.
superClass A class.
Returns:
true if subClass is a direct subclass of superClass, false otherwise.

bool Soprano::RdfSchemaModel::isDirectSubPropertyOf ( const Node &  subProperty,
const Node &  superProperty 
) const

Checks whether one resource is a direct subproperty of another.

Parameters:
subProperty A property.
superProperty A property.
Returns:
true if subProperty is a direct subproperty of superProperty, false otherwise.

bool Soprano::RdfSchemaModel::isDirectType ( const Node &  someClass,
const Node &  someType 
) const

Checks whether one resource is a direct instance of another.

Parameters:
someClass An instance.
someType A class.
Returns:
true if someClass is a direct instance of someType, false otherwise.

bool Soprano::RdfSchemaModel::isProperty ( const Node &  resource  )  const

Checks whether the supplied resource represents a property.

Parameters:
resource The resource to check.
Returns:
true if resource is a property, false otherwise.

bool Soprano::RdfSchemaModel::isSubClassOf ( const Node &  subClass,
const Node &  superClass 
) const

Checks whether one resource is a subclass of another.

Do not use this method if the Soprano backend supports inferencing. Use isDirectSubClassOf instead which is much faster.

Parameters:
subClass A class.
superClass A class.
Returns:
true if subClass is a subclass of superClass, false otherwise.

bool Soprano::RdfSchemaModel::isSubPropertyOf ( const Node &  subProperty,
const Node &  superProperty 
) const

Checks whether one resource is a subproperty of another.

Do not use this method if the Soprano backend supports inferencing. Use isDirectSubPropertyOf instead which is much faster.

Parameters:
subProperty A property.
superProperty A property.
Returns:
true if subProperty is a subproperty of superProperty, false otherwise.

bool Soprano::RdfSchemaModel::isType ( const Node &  someClass,
const Node &  someType 
) const

Checks whether one resource is a instance of another.

Do not use this method if the Soprano backend supports inferencing. Use isDirectType instead which is much faster.

Parameters:
someClass An instance.
someType A class.
Returns:
true if someClass is an instance of someType, false otherwise.

StatementIterator Soprano::RdfSchemaModel::properties (  )  const

Gets all defined properties.

Returns:
A StatementIterator containing statements of the form (someProperty, rdf:type, rdf:Property).

StatementIterator Soprano::RdfSchemaModel::range ( const Node &  prop,
const Node &  range 
) const

Gets all range relations with a specific property and/or range class.

Parameters:
prop The property of the relations that should be returned, or an empty node if relations with any property should be returned.
range The range of the relations that should be returned, or an empty node if relations with any range should be returned.
Returns:
A StatementIterator containing statements of the form (prop, rdfs:range, range).

StatementIterator Soprano::RdfSchemaModel::subClassOf ( const Node &  subClass,
const Node &  superClass = Node() 
) const

Gets all subClassOf relations with a specific sub- and/or superclass.

Note that the subClassOf relation is reflexive: a class is implicitly always a subclass of itself.

Do not use this method if the Soprano backend supports inferencing. Use directSubClassOf instead which is much faster.

Parameters:
subClass The subclass of the relations that should be returned, or an empty node if relations with any subclass should be returned.
superClass The superclass of the relations that should be returned, or an emtpy node if relations with any superclass should be returned.
Returns:
A StatementIterator containing all valid statements of the form (subClass, rdfs:subClassOf, superClass) including those calculated through direct inferencing.

StatementIterator Soprano::RdfSchemaModel::subPropertyOf ( const Node &  subProperty,
const Node &  superProperty = Node() 
) const

Gets all subPropertyOf relations with a specific sub- and/or superproperty.

Note that the subPropertyOf relation is reflexive: a property is implicitly always a subproperty of itself.

Do not use this method if the Soprano backend supports inferencing. Use directSubPropertyOf instead which is much faster.

Parameters:
subProperty The subproperty of the relations that should be returned, or an empty node if relations with any subproperty should be returned.
superProperty The superproperty of the relations that should be returned, or an empty node if relations with any superproperty should be returned.
Returns:
A StatementIterator containing all valid statements of the form (subProperty, rdfs:subPropertyOf, superProperty) including those calculated through direct inferencing.

StatementIterator Soprano::RdfSchemaModel::type ( const Node &  someClass,
const Node &  someType 
) const

Gets all type relations with a specific instance and/or class.

Do not use this method if the Soprano backend supports inferencing. Use directType instead which is much faster.

Parameters:
someClass The instance of the relations that should be returned, or an empty node if relations with any instance should be returned.
someType The class of the relations that should be returned, or an empty node if relations with any class should be returned.
Returns:
A StatementIterator containing all valid statements of the form (someClass, rdf:type, someType) including those calculated through direct inferencing.


The documentation for this class was generated from the following file:
  • rdfschemamodel.h

soprano

Skip menu "soprano"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • akonadi
  • Decibel
  • eigen
  • Eigen2
  • kdewin32
  • Phonon
  •     Backend
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal