Package lexis :: Module phyStorStructure :: Class MysqlPhyStorageStruct
[show private | hide private]
[frames | no frames]

Class MysqlPhyStorageStruct


Physical structure of the storage implemented as a Mysql db. It contains the tables and the fields and supply the methods for changing the database structure
Method Summary
  __init__(self, access)
  analyze(self)
Analyse the physical structure (tables and fields) of the database
  checkClassMapping(self, className)
Check if a class is mapped into a table
  checkPropertyMapping(self, className, propertyName, fieldType, cardinality)
Check if a property of a class is correctly mapped into a field or a pivot table depending on the cardinality of the relationship.
  checkUnused(self)
Check which tables and which fields are no more in the RDF domain description
  disableField(self, fieldName)
Field removed from the domain description are not removed: they are disabled changing their name.
  disableTable(self, tableName)
Classes removed from the domain description are not removed from the storage: they are disabled changing their name.
  dump(self, filepath)
Should dump the content of the database into a file for backup
  modifyField(self, tableName, oldFieldName, newFieldName, newFieldType)
  removeField(self, tableName, fieldName)
  removeTable(self, tableName)
  renameTable(self, oldTableName, newTableName)
  restore(self, filepath)
Should restore the content of the database from a backup file

Method Details

analyze(self)

Analyse the physical structure (tables and fields) of the database

checkClassMapping(self, className)

Check if a class is mapped into a table
Parameters:
className - name of the table to check @return True if the class is mapped

checkPropertyMapping(self, className, propertyName, fieldType, cardinality)

Check if a property of a class is correctly mapped into a field or a pivot table depending on the cardinality of the relationship.
Parameters:
className - name of the class
propertyName - name of the property
cardinality - cardinality of the relationship class-property @return True if the property is mapped

checkUnused(self)

Check which tables and which fields are no more in the RDF domain description

disableField(self, fieldName)

Field removed from the domain description are not removed: they are disabled changing their name. After a given period the disabled fields are removed

disableTable(self, tableName)

Classes removed from the domain description are not removed from the storage: they are disabled changing their name. After a given period the disabled classes are removed

dump(self, filepath)

Should dump the content of the database into a file for backup

restore(self, filepath)

Should restore the content of the database from a backup file

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