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

soprano

Soprano::Inference::RuleParser

Soprano::Inference::RuleParser Class Reference

The RuleParser can be used to parse Soprano rule files. More...

#include <Soprano/Inference/RuleParser>

List of all members.

Public Member Functions

 RuleParser ()
 ~RuleParser ()
void addPrefix (const QString &qname, const QUrl &uri)
void clear ()
bool parseFile (const QString &path)
Rule parseRule (const QString &line)
QHash< QString, QUrl > prefixes () const
RuleSet rules () const

Detailed Description

The RuleParser can be used to parse Soprano rule files.

See also:
RuleSet::standardRuleSet()
Author:
Sebastian Trueg <trueg@kde.org>

Definition at line 46 of file inferenceruleparser.h.


Constructor & Destructor Documentation

Soprano::Inference::RuleParser::RuleParser (  ) 
Soprano::Inference::RuleParser::~RuleParser (  ) 

Member Function Documentation

void Soprano::Inference::RuleParser::addPrefix ( const QString &  qname,
const QUrl &  uri 
)

Add a prefix to use during rule parsing.

Parameters:
qname The abbreviated name of the prefix
uri The namespace to use for the prefix
Since:
2.3
void Soprano::Inference::RuleParser::clear (  ) 

Clear all parsed rules and prefixes.

Since:
2.3
bool Soprano::Inference::RuleParser::parseFile ( const QString &  path  ) 

Parse rules from a file.

The parsed rules can be accessed via rules().

Returns:
true on success, false otherwise.
Rule Soprano::Inference::RuleParser::parseRule ( const QString &  line  ) 

Parse a single rule from a string.

Parameters:
line A single line defining the rule
Returns:
The parsed rule in case line is a valid rule line, an invalid rule otherwise. The parsed rule can also be accessed via rules().
Since:
2.3
QHash<QString, QUrl> Soprano::Inference::RuleParser::prefixes (  )  const

Retrieve all prefixes set via addPrefix.

Returns:
a QHash containing of the prefixe qnames and their URIs.
Since:
2.3
RuleSet Soprano::Inference::RuleParser::rules (  )  const

Retrieve the rules parsed in parseFile and parseRule.


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

soprano

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

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
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