Package lexis :: Module wskProperty :: Class WSKProperty
[show private | hide private]
[frames | no frames]

Class WSKProperty

Known Subclasses:
WSKComputedProperty

A property that describe a class. attribute namespace prefix of the XML namespace where this property is defined attribute name local property name attribute computedProperty if is a real property or a computed property attribute domain list of the classes that have this property attribute range class of the value of this property attribute superProperties list of properties that are parents of this class attribute subProperties list of properties that have this property as parent attribute equivProperty list of property that have equivalent meaning attribute deprecated if this property might be removed and should not be used
Method Summary
  __init__(self, namespace, name, label, computedProperty, deprecated)
initialize the property
  addConstraint(self, constraint)
Add a constraint to the value of this property.
  addDomain(self, className)
Add a class to which this property can be applied For instance if the property is 'name', a class to which this property can be applied is 'Person'
  addEquivalentProperty(self, propertyName)
Add a property that is equivalent to this one.
  addRange(self, className)
Add a class to which the value of this property must belong For example if the property is name, then the range can be a xml:string literal
  addSubProperty(self, propertyName)
Add a property that derives from this.
  addSuperProperty(self, propertyName)
Add a property from which this property derive.
  dump(self)
  getQName(self)
  getRange(self)
Return the range for this property
  isInRange(self, className)
Check if the class given can be the value for this property
  isSuperProperty(self, propertyName)
Check if the given property is parent of this property (recursively)

Method Details

__init__(self, namespace, name, label='', computedProperty=False, deprecated=False)
(Constructor)

initialize the property
Parameters:
namespace - prefix of the XML namespace where this property is defined
name - local property name
label - label for the property (if not defined, QName is used)
computedProperty - if is a real property or a computed property [default false]
deprecated - if this property might be removed and should not be used [default false]

addConstraint(self, constraint)

Add a constraint to the value of this property. For instance if the property is age, then a constraint could be '>=0'
Parameters:
constraint - property constraint -> STUDY ITS FORMAT!!

addDomain(self, className)

Add a class to which this property can be applied For instance if the property is 'name', a class to which this property can be applied is 'Person'
Parameters:
className - QName of the class [namespace prefix:classname]

addEquivalentProperty(self, propertyName)

Add a property that is equivalent to this one. Its name can be used instead of this property.
Parameters:
propertyName - name of the equivalent property

addRange(self, className)

Add a class to which the value of this property must belong For example if the property is name, then the range can be a xml:string literal
Parameters:
className - QName of the class [namespace prefix:classname]

addSubProperty(self, propertyName)

Add a property that derives from this. The domain, range and constraints of this property are inherited by the subclass
Parameters:
propertyName - QName of the property [namespace prefix:property name]

addSuperProperty(self, propertyName)

Add a property from which this property derive. The domain, range and constraints of the parent property are inherited
Parameters:
propertyName - QName of the parent property [namespace prefix:classname]

getRange(self)

Return the range for this property

isInRange(self, className)

Check if the class given can be the value for this property
Parameters:
className - QName of the class [namespace prefix:classname]
Returns:
True if the class is in the range of this property or in any of its parents.

isSuperProperty(self, propertyName)

Check if the given property is parent of this property (recursively)
Parameters:
propertyName - QName of the property [namespace prefix:property name]

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