A InfModelF extends the InfModel Class, with a forward chaining algorithm.
If a new statement is added, it is enferd at once and all the entailed statements are added too. When adding or removing a statement, that produced a new inference rule, all entailed statements are discarded and the whole base model is infered again. The InfModelF is safe for loops in Ontologies, that would cause infinite loops.
Located in /infModel/InfModelF.php (line 23)
Object | --Model | --MemModel | --InfModel | --InfModelF
Variable that influences the habbit when adding statements.
Used by the loadModel method to increase performance.
Array that holds the position of the infered statements in the model.
Inherited from InfModel
InfModel::$infRules
InfModel::$infRulesEntailIndex
InfModel::$infRulesTriggerIndex
InfModel::$statementRuleIndex
InfModel::$supportedInference
Inherited from MemModel
MemModel::$indexArr
MemModel::$indexed
MemModel::$parsedNamespaces
MemModel::$triples
Inherited from Model
Model::$baseURI
Model::$bNodeCount
Constructor You can supply a base_uri.
Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) The statement is infered and all entailed statements are added.
Adds another model to this MemModel.
Duplicate statements are not removed. If you don't want duplicates, use unite(). If any statement of the model to be added to this model contains a blankNode with an identifier already existing in this model, a new blankNode is generated.
Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
addWithoutDuplicates() is significantly slower then add(). Retruns TRUE if the statement is added. FALSE otherwise. The statement is infered and all entailed statements are added.
Entails every statement and adds the entailments if not already in the model.
Entails a statement by recursively using the _entailStatementRec method.
Create a MemModel containing only the base triples (without inferred statements) of the current InfModelF.
Create a MemModel containing all the triples (including inferred statements) of the current InfModelF.
Load a model from a file containing RDF, N3 or N-Triples.
This function recognizes the suffix of the filename (.n3 or .rdf) and calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt"); If the model is not empty, the contents of the file is added to this DbModel.
While loading the model, the inference entailing is disabled, but new inference rules are added to increase performance.
Removes the triple from the MemModel.
TRUE if the triple is removed. FALSE otherwise.
Checks, if it touches any statements, that added inference rules to the model
Removes all infered statements from the model but keeps the infernece rules.
Short Dump of the InfModelF.
Recursive method, that checks the statement with the trigger of every rule. If the trigger matches and entails new statements, those statements are recursively infered too.
The $infStatementsIndex array holds lready infered statements to prevent infinite loops.
Inherited From InfModel
InfModel::InfModel()
InfModel::add()
InfModel::findRegex()
InfModel::findVocabulary()
InfModel::getSchema()
InfModel::replace()
InfModel::_addInfRule()
InfModel::_addInfruleToIndex()
InfModel::_addToInference()
InfModel::_findRuleEntailmentInIndex()
InfModel::_findRuleTriggerInIndex()
InfModel::_removeFromInference()
Inherited From MemModel
MemModel::MemModel()
MemModel::add()
MemModel::addModel()
MemModel::addNamespace()
MemModel::addParsedNamespaces()
MemModel::addWithoutDuplicates()
MemModel::close()
MemModel::contains()
MemModel::containsAll()
MemModel::containsAny()
MemModel::equals()
MemModel::find()
MemModel::findAsIterator()
MemModel::findCount()
MemModel::findFirstMatchingStatement()
MemModel::findFirstMatchOff()
MemModel::findRegex()
MemModel::findVocabulary()
MemModel::getIndexType()
MemModel::getParsedNamespaces()
MemModel::getStatementIterator()
MemModel::index()
MemModel::intersect()
MemModel::isEmpty()
MemModel::isIndexed()
MemModel::iterFind()
MemModel::matchStatement()
MemModel::rdqlQuery()
MemModel::rdqlQueryAsIterator()
MemModel::reify()
MemModel::remove()
MemModel::removeNamespace()
MemModel::replace()
MemModel::saveAs()
MemModel::setBaseURI()
MemModel::size()
MemModel::subtract()
MemModel::toString()
MemModel::toStringIncludingTriples()
MemModel::unite()
MemModel::writeAsHtml()
MemModel::writeAsHtmlTable()
MemModel::writeRdfToString()
MemModel::_containsIndex()
MemModel::_findInIndex()
MemModel::_findMatchIndex()
MemModel::_indexOpr()
Inherited From Model
Model::Model()
Model::findForward()
Model::getBaseURI()
Model::getMemModelByRDQL()
Model::getOntModel()
Model::getResModel()
Model::getUniqueResourceURI()
Model::load()
Model::sparqlQuery()
Model::visualize()
Model::_addStatementFromAnotherModel()
Inherited From Object
Object::toString()
Documentation generated on Mon, 26 Jun 2006 14:25:32 +0200 by phpDocumentor 1.3.0RC6