soprano
Soprano::Inference::RuleParser Class Reference
The RuleParser can be used to parse Soprano rule files. More...
#include <Soprano/Inference/RuleParser>
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()
Definition at line 46 of file inferenceruleparser.h.
Constructor & Destructor Documentation
| Soprano::Inference::RuleParser::RuleParser | ( | ) |
| Soprano::Inference::RuleParser::~RuleParser | ( | ) |
Member Function Documentation
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:
trueon success,falseotherwise.
Parse a single rule from a string.
- Parameters:
-
line A single line defining the rule
- Returns:
- The parsed rule in case
lineis a valid rule line, an invalid rule otherwise. The parsed rule can also be accessed via rules().
- Since:
- 2.3
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:
KDE 4.4 API Reference