Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
Marshall.namespaces.atns.Archetypes Class Reference
Inheritance diagram for Marshall.namespaces.atns.Archetypes:
Inheritance graph
[legend]
Collaboration diagram for Marshall.namespaces.atns.Archetypes:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getAttributeByName
def getAttributes

Public Attributes

 last_schema_id
 in_reference_mode
 new_reference_p
 at_fields

Static Public Attributes

 xmlns = config.AT_NS
 prefix = None
list attributes = []

Detailed Description

Definition at line 241 of file atns.py.


Constructor & Destructor Documentation

Definition at line 247 of file atns.py.

00247 
00248     def __init__(self):
00249         super(Archetypes, self).__init__()
00250         self.last_schema_id = None
00251         self.in_reference_mode = False
00252         self.new_reference_p = True
00253 
00254         uid_attribute  = ArchetypeUID('uid')
00255         uid_attribute.setNamespace( self )
00256         
00257         self.at_fields = {'uid' : uid_attribute}


Member Function Documentation

def Marshall.namespaces.atns.Archetypes.getAttributeByName (   self,
  schema_name,
  context = None 
)

Definition at line 258 of file atns.py.

00258 
00259     def getAttributeByName(self, schema_name, context=None):
00260         if context is not None and schema_name not in self.at_fields:
00261             if not context.instance.Schema().has_key( schema_name ):
00262                 return
00263                 raise AssertionError, \
00264                       "invalid attribute %s"%(schema_name)
00265         
00266         if schema_name in self.at_fields:
00267             return self.at_fields[ schema_name ]
00268 
00269         attribute = ATAttribute( schema_name )
00270         attribute.setNamespace( self )
00271         
00272         return attribute

Here is the caller graph for this function:

def Marshall.namespaces.atns.Archetypes.getAttributes (   self,
  instance,
  exclude_attrs = () 
)

Definition at line 273 of file atns.py.

00273 
00274     def getAttributes(self, instance, exclude_attrs=()):
00275 
00276         # remove fields delegated to other namespaces
00277         fields = []
00278         for ns in getRegisteredNamespaces():
00279             if ns.uses_at_fields:
00280                 fields.extend( ns.getATFields() )
00281         assert len(Set(fields)) == len(fields), (
00282             "Multiple NS multiplexing field")
00283 
00284         field_keys = [k for k in instance.Schema().keys()
00285                       if k not in exclude_attrs and k not in fields]
00286         #Set(instance.Schema().keys())-mset
00287 
        # remove primary field if still present

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 256 of file atns.py.

Definition at line 245 of file atns.py.

Definition at line 250 of file atns.py.

Definition at line 249 of file atns.py.

Definition at line 251 of file atns.py.

Definition at line 244 of file atns.py.

Definition at line 243 of file atns.py.


The documentation for this class was generated from the following file: