xtuml/persist.py
def serialize_schema(metamodel):
    '''
    Serialize all class and association definitions in a *metamodel*.
    '''
    s = ''
    for kind in sorted(metamodel.metaclasses.keys()):
        s += serialize_class(metamodel.metaclasses[kind].clazz)
    
    for ass in sorted(metamodel.associations, key=lambda x: x.rel_id):
        s += serialize_association(ass)
    
    return s
def serialize_schema(metamodel):
    '''
    Serialize all class and association definitions in a *metamodel*.
    '''
    s = ''
    for kind in sorted(metamodel.metaclasses.keys()):
        s += serialize_class(metamodel.metaclasses[kind].clazz)
    
    for ass in sorted(metamodel.associations, key=lambda x: x.rel_id):
        s += serialize_association(ass)
    
    return s
def serialize_schema ( metamodel ) : s = '' for kind in sorted ( metamodel . metaclasses . keys ( ) ) : s += serialize_class ( metamodel . metaclasses [ kind ] . clazz ) for ass in sorted ( metamodel . associations , key = lambda x : x . rel_id ) : s += serialize_association ( ass ) return s
Serialize all class and association definitions in a *metamodel*.
Serialize all class and association definitions in a * metamodel * .