Source for file ResResource.php
Documentation is available at ResResource.php
* ----------------------------------------------------------------------------------
* ----------------------------------------------------------------------------------
* Resource instances, when created, are associated with a specific model. They support a
* range of methods, such as getProperty() and addProperty() which will access or modify
* that model. This enables the programmer to write code in a compact and easy style.
* @version $Id: fsource_resModel__resModelResResource.php.html 443 2007-06-01 16:25:38Z cax $
* @author Daniel Westphal <mail at d-westphal dot de>
* Holds a reference to the associated model
* Is true, if this resource is an anonymous node.
$this->isAnon =
($uri ===
null);
* Sets the reference to the assocoated model.
* @param object Model $model
$this->uri=
$this->model->getUniqueResourceURI(BNODE_PREFIX);
* Get the reference to the assocoated model.
* @return object Model $model
* Sets the URI of this resource
* Add a property to this resource.
* A statement with this resource as the subject, p as the predicate and o
* as the object is added to the model associated with this resource.
* @param ResResource $property
* @param ResResource/ResLiteral $object
* @return object ResResource
* List all the values with the property p as statements in an array.
* @param ResResource $property
return $this->model->find($this,$property,null);
* Answer some statement (this, p, O) in the associated model.
* If there are several such statements, any one of them may be returned.
* If no such statements exist, null is returned.
* @param ResResource $property
* @return object ResResource
* Determine whether this resource has any values for a given property.
* @param ResResource $property
* @param ResResource $value
* @return object ResResource
* Determine whether this resource is an anonymous resource
* Set whether this resource is an anonymous resource
* Checks if the resource equals another resource.
* Two resources are equal, if they have the same URI
* @param object resource $that
if (is_a($that,'ResLiteral'))
return $that->equals($this);
return ($that!==
null &&
($this->getURI() ==
$that->getURI()));
* Delete all the statements with predicate p for this resource from
* @param object resource $property
* @return object ResResource
foreach ($this->model->find($this,$property,null) as $statement)
$this->model->remove($statement);
* Delete all the properties for this resource from the associated model.
* @return object ResResource
Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2