# -*- coding: iso-8859-1 -*-
#-----------------------------------------------------------------------------
# Modeling Framework: an Object-Relational Bridge for python
#
# Copyright (c) 2001-2004 Sbastien Bigaret <sbigaret@users.sourceforge.net>
# All rights reserved.
#
# This file is part of the Modeling Framework.
#
# This code is distributed under a "3-clause BSD"-style license;
# see the LICENSE file for details.
#-----------------------------------------------------------------------------
"""
XMLCapability API
...
+ describe XMLUtils functions
CVS information
$Id: XMLCapability.py 932 2004-07-20 06:21:57Z sbigaret $
"""
__version__='$Revision: 932 $'[11:-2]
try:
from Interface import Base
except:
class Base:
pass
class XMLCapabilityInterface(Base):
"Mix-in class ..."
def xmlAttributeType(self, attributeName):
""
def xmlSetAttribute(self, attributeName):
""
def xmlGetAttribute(self, attributeName):
""
def xmlAttributesDict(self):
"""
raise 'AbstractInterface', 'xmlAttributesDict is an abstract method which should be defined in classes using the mix-in class XMLCapability'
Example::
return {'name': ('string',
lambda self=None,p=None: None,
self.name ),
'isAbstract': ( 'boolean',
self.setIsAbstract,
self.isAbstract ),
'typeName': ( 'string',
self.setTypeName,
self.typeName )
}
"""
def getXMLDOM(self, doc=None, parentNode=None):
"""
Returns the (DOM) DocumentObject for the receiver.
Parameters 'doc' and 'parentDoc' should be both omitted or supplied.
If they are omitted, a new DocumentObject is created.
If they are supplied, elements are added to the parentNode.
Returns: the (possibly new) DocumentObject.
"""
def getXMLNodeName(self):
"Returns the node name corresponding to the receiver (e.g. 'relationship')"
|