A InfModelB extends the InfModel Class, with a backward chaining algorithm.
Only the loaded or added base-triples are stored. A find-query evaluates the inference rules and recursively tries to find the statements. InfModelB memorises "Dead-Ends" until the next add() command, thus makin a second find much faster. InfModelB is safe for loops in Ontologies, that would cause infinite loops. WARNING: A find(null,null,null) might take very long.
Located in /infModel/InfModelB.php (line 23)
Object | --Model | --MemModel | --InfModel | --InfModelB
Constructor You can supply a base_uri
Adds a new triple to the Model without checking, if the statement is already in the Model. So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
Tests if the Model contains the given triple.
TRUE if the triple belongs to the Model; FALSE otherwise.
General method to search for triples.
NULL input for any parameter will match anything. Example: $result = $m->find( NULL, NULL, $node ); Finds all triples with $node as object. Returns an empty MemModel if nothing is found. To improve the search speed with big Models, call index(INDEX_TYPE) before seaching.
It recursively searches in the statements and rules to find matching statements.
Returns a FindIterator for traversing the MemModel.
Disabled in InfModelB.
Searches for triples and returns the first matching statement.
NULL input for any parameter will match anything. Example: $result = $m->findFirstMatchingStatement( NULL, NULL, $node ); Returns the first statement of the MemModel where the object equals $node. Returns an NULL if nothing is found. You can define an offset to search for. Default = 0
Create a MemModel containing only the base triples (without inferred statements) of the current InfModelB.
Create a MemModel containing all the triples (including inferred statements) of the current InfModelB.
Returns a StatementIterator for traversing the Model.
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.
Saves the RDF,N3 or N-Triple serialization of the full InfModelB (including inferred triples) to a file.
You can decide to which format the model should be serialized by using a corresponding suffix-string as $type parameter. If no $type parameter is placed this method will serialize the model to XML/RDF format. Returns FALSE if the InfModelB couldn't be saved to the file.
Number of all inferable triples in the Model.
WARNING: uses a find(null,null,null) to find all statements! (might take a while)
Short Dump of the InfModelB.
Dumps of the InfModelB including ALL inferable triples.
Writes the RDF serialization of the Model including ALL inferable triples as HTML.
Writes the RDF serialization of the Model including ALL inferable triples as HTML table.
Writes the RDF serialization of the Model including ALL inferable triples.
Inherited From InfModel
InfModel::InfModel()
InfModel::add()
InfModel::findRegex()
InfModel::findVocabulary()
InfModel::getSchema()
InfModel::replace()
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::findRegex()
MemModel::findVocabulary()
MemModel::getIndexType()
MemModel::getParsedNamespaces()
MemModel::getStatementIterator()
MemModel::index()
MemModel::intersect()
MemModel::isEmpty()
MemModel::isIndexed()
MemModel::iterFind()
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()
Inherited From Model
Model::Model()
Model::findForward()
Model::getBaseURI()
Model::getMemModelByRDQL()
Model::getOntModel()
Model::getResModel()
Model::load()
Model::sparqlPrepare()
Model::sparqlQuery()
Model::visualize()
Model::_parseSparqlQuery()
Model::_prepareSparql()
Inherited From Object
Object::toString()
Documentation generated on Fri, 1 Jun 2007 16:49:27 +0200 by phpDocumentor 1.3.2