Class InfModel

Description

A InfModel Model extends a MemModel , by adding the ability to infer statements from known statements and RDFS/OWL-Schematas.

It uses the same interface as MemModel, thus making the infererence process hidden.

Located in /infModel/InfModel.php (line 19)

Object
   |
   --Model
      |
      --MemModel
         |
         --InfModel
Direct descendents
Class Description
InfModelB A InfModelB extends the InfModel Class, with a backward chaining algorithm.
InfModelF A InfModelF extends the InfModel Class, with a forward chaining algorithm.
Method Summary
InfModel InfModel ([string $baseURI = NULL])
void add (object Statement $statement)
object MemModel findRegex (string $subject_regex, string $predicate_regex, string $object_regex)
object MemModel findVocabulary (string $vocabulary)
object Model getSchema ()
void replace (object Node $subject, object Node $predicate, object Node $object, object Node $replacement)
Variables

Inherited Variables

Inherited from Model

Model::$queryParser
Methods
Constructor InfModel (line 78)

Constructor You can supply a base_uri

  • access: public
InfModel InfModel ([string $baseURI = NULL])
  • string $baseURI
add (line 172)

Adds a new triple to the Model without checking if the statement is already in the Model.

So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add()) If the statement's predicate label is supported by the inference, the matching rules are added.

  • throws: PhpError
  • access: public
void add (object Statement $statement)
  • object Statement $statement

Redefinition of:
MemModel::add()
Adds a new triple to the MemModel without checking if the statement is already in the MemModel.

Redefined in descendants as:
  • InfModelB::add() : 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())
  • InfModelF::add() : Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
findRegex (line 446)

Method to search for triples using Perl-style regular expressions.

NULL input for any parameter will match anything. Example: $result = $m->find_regex( NULL, NULL, $regex ); Finds all triples where the label of the object node matches the regular expression. Returns an empty MemModel if nothing is found.

This function is disabled in the Inference Model

  • access: public
object MemModel findRegex (string $subject_regex, string $predicate_regex, string $object_regex)
  • string $subject_regex
  • string $predicate_regex
  • string $object_regex

Redefinition of:
MemModel::findRegex()
Method to search for triples using Perl-style regular expressions.
findVocabulary (line 468)

Returns all tripels of a certain vocabulary.

$vocabulary is the namespace of the vocabulary inluding a # : / char at the end. e.g. http://www.w3.org/2000/01/rdf-schema# Returns an empty MemModel if nothing is found.

This function is disabled in the Inference Model.

  • access: public
object MemModel findVocabulary (string $vocabulary)
  • string $vocabulary

Redefinition of:
MemModel::findVocabulary()
Returns all tripels of a certain vocabulary.
getSchema (line 400)

Returns a model, containing all Statements, having a Predicate, that is supported by the inference.

  • access: public
object Model getSchema ()
replace (line 423)

General method to replace nodes of a MemModel.

This function is disabled in the Inference Model.

  • throws: PhpError
  • access: public
void replace (object Node $subject, object Node $predicate, object Node $object, object Node $replacement)
  • object Node $subject
  • object Node $predicate
  • object Node $object
  • object Node $replacement

Redefinition of:
MemModel::replace()
General method to replace nodes of a MemModel.

Inherited Methods

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:25 +0200 by phpDocumentor 1.3.2