Package lexis :: Module resource :: Class Resource
[show private | hide private]
[frames | no frames]

Class Resource

IResource --+
            |
           Resource


A URIRef resource -> an istance of a class
Method Summary
  __init__(self, rdfclass, resourceID, dbaccess, db)
Initiale the resource
  __call__(self)
  __str__(self)
If the object is casted to a string, this method is called
  commit(self)
Do the definitive updates on the storage system
  get(self, propertyName, *args)
Get the value of a property
  getID(self)
@return the ID of the resource
  set(self, propertyName, resource)
First check if the resource is compatible with the property, then apply the change.
    Inherited from IResource
  getClass(self)
  hasProperty(self, propertyName)

Method Details

__init__(self, rdfclass, resourceID, dbaccess, db)
(Constructor)

Initiale the resource
Parameters:
rdfclass - rdfclass object ref of the resource class
resourceID - ID of the resource (as on the storage)
dbaccess - access interface to the storage system
db - interface to the resources
Overrides:
lexis.resource.IResource.__init__

__str__(self)
(Informal representation operator)

If the object is casted to a string, this method is called
Returns:
the ID of the resource

commit(self)

Do the definitive updates on the storage system

get(self, propertyName, *args)

Get the value of a property
Parameters:
propertyName - QName of the required property
args - arbitrary sequence of property QNames
Returns:
a list of resources of the range type of the required properties

getID(self)

@return the ID of the resource

set(self, propertyName, resource)

First check if the resource is compatible with the property, then apply the change. The changes are not applied on the storage until commit() is called.
Parameters:
propertyName - QName of the property to set
resource - resource instance to set as property value

Generated by Epydoc 2.0 on Sat Feb 07 21:05:40 2004 http://epydoc.sf.net