Implements interfaces:
A wrapper around the librdf_model datatype.
A LibRDF_Model is a collection of LibRDF_Statement objects using a LibRDF_Storage object to save the statements. Statements are added using addStatement or through the use of a LibRDF_Parser and loadStatementsFromString or loadStatementsFromURI, and statements are removed using removeStatement. Statements can be queried through the use of either findStatements or a LibRDF_Query object. The statements can be written to a stream using LibRDF_Serializer and serializeStatements or serializeStatementsToFile.
This object is iterable. When used as part of a foreach statement, it will iterate over every statement contained in the model. For example,
will echo each statement individually. Unlike LibRDF_StreamIterator, the Model can be rewound and used for multiple iterations.
Located in /Model.php (line 103)
Create a new librdf_model.
See the librdf documentation for information on the possible options.
Free a model's resources.
Add a statement to the model.
A statement can be added more than once by adding it under different contexts, otherwise adding a duplicate statement will have no effect. Not all models support contexts.
Return the current statement on the iterator.
Find a statement in the model.
A NULL argument for any of source, predicate or target is treated as a wildcard. If a context is given, only statements from that context will be returned. The result is an object that be used in foreach iteration. The returned iterator cannot be rewound.
The search arguments can be either a (source, predicate target) triple of LibRDF_Node objects or a LibRDF_Statement object. Valid argument lists are (source, predicate, target, [context]) or (statement, [context]).
For more complex queries, see LibRDF_Query.
Return a single predicate node that is part of a statement containing the given source and target.
This function is equivalent to
Return the model resource.
This function is intended for other LibRDF classes and should not be called.
Return a single source node that is part of a statement containing the given predicate and target.
This function is equivalent to
Return a single target node that is part of a statement containing the given source and predicate.
This function is equivalent to
Test whether the model contains a statement.
Return the current iteration key.
Load statements using a LibRDF_Parser.
If no $base_uri is given, the RDF namespace URI will be used as the base for relative URIs.
Load statements from a URI using a LibRDF_Parser.
Advance the iterator's position.
Remove a statement from the model.
Reset the statement iterator.
Serialize the model as a string.
Serialize the model and write the contents to a file.
Return the number of statements in the model.
Check whether the statement iterator is still valid.
Create a copy of the model.
Whether a model can be copied depends upon the underlying model factory. In-memory storages cannot be cloned, so a clone of models using this form of storage will fail.
Return a string representation of the model.
This function can be used as a lazy form of serializtion. Use a LibRDF_Serializer if you care about the format of the output.
Documentation generated on Thu, 15 Jun 2006 19:25:12 -0400 by phpDocumentor 1.3.0