Class ResResource

Description

An RDF Resource.

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.

Located in /resModel/ResResource.php (line 22)

Object
   |
   --Node
      |
      --Resource
         |
         --ResResource
Direct descendents
Class Description
OntResource Provides a common super-type for all of the abstractions in this ontology representation package.
ResContainer An RDF Container.
ResList Implementation of an rdf:Collection (rdf:List) Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure.
ResProperty An RDF Property.
Method Summary
ResResource ResResource (string $uri)
object ResResource addProperty (ResResource $property, ResResource/ResLiteral $object)
boolean equals (object resource $that)
object Model getAssociatedModel ()
boolean getIsAnon ()
object ResResource hasProperty (ResResource $property, [ResResource $value = null])
ResIterator listProperties ([ResResource $property = null])
object ResResource removeAll ([object resource $property = null])
void setAssociatedModel ( &$model, object Model $model)
void setIsAnon (boolean $isAnon)
void setURI (string $uri)
Methods
Constructor ResResource (line 46)

Constructor You can supply a uri

  • access: public
ResResource ResResource (string $uri)
  • string $uri
addProperty (line 97)

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.

  • access: public
object ResResource addProperty (ResResource $property, ResResource/ResLiteral $object)

Redefined in descendants as:
equals (line 175)

Checks if the resource equals another resource.

Two resources are equal, if they have the same URI

  • access: public
boolean equals (object resource $that)
  • object resource $that

Redefinition of:
Resource::equals()
Checks if the resource equals another resource.
getAssociatedModel (line 71)

Get the reference to the assocoated model.

  • access: public
object Model getAssociatedModel ()
getIsAnon (line 151)

Determine whether this resource is an anonymous resource

  • access: public
boolean getIsAnon ()
getProperty (line 125)

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.

  • access: public
object ResResource getProperty (ResResource $property)
hasProperty (line 138)

Determine whether this resource has any values for a given property.

  • access: public
object ResResource hasProperty (ResResource $property, [ResResource $value = null])
listProperties (line 111)

List all the values with the property p as statements in an array.

  • access: public
ResIterator listProperties ([ResResource $property = null])
removeAll (line 191)

Delete all the statements with predicate p for this resource from its associated model.

  • access: public
object ResResource removeAll ([object resource $property = null])
  • object resource $property
removeProperties (line 206)

Delete all the properties for this resource from the associated model.

  • access: public
object ResResource removeProperties ()
setAssociatedModel (line 58)

Sets the reference to the assocoated model.

  • access: public
void setAssociatedModel ( &$model, object Model $model)
  • object Model $model
  • &$model
setIsAnon (line 162)

Set whether this resource is an anonymous resource

  • access: public
void setIsAnon (boolean $isAnon)
  • boolean $isAnon
setURI (line 82)

Sets the URI of this resource

  • access: public
void setURI (string $uri)
  • string $uri

Inherited Methods

Inherited From Resource

Resource::Resource()
Resource::equals()
Resource::getLabel()
Resource::getLocalName()
Resource::getNamespace()
Resource::getURI()
Resource::toString()

Inherited From Object

Object::toString()

Documentation generated on Fri, 1 Jun 2007 16:51:38 +0200 by phpDocumentor 1.3.2