xtuml/persist.py
def persist_schema(metamodel, path, mode='w'):
    '''
    Persist all class and association definitions in a *metamodel* by 
    serializing them and saving to a *path* on disk.
    '''
    with open(path, mode) as f:
        for kind in sorted(metamodel.metaclasses.keys()):
            s = serialize_class(metamodel.metaclasses[kind].clazz)
            f.write(s)
            
        for ass in sorted(metamodel.associations, key=lambda x: x.rel_id):
            s = serialize_association(ass)
            f.write(s)
def persist_schema(metamodel, path, mode='w'):
    '''
    Persist all class and association definitions in a *metamodel* by 
    serializing them and saving to a *path* on disk.
    '''
    with open(path, mode) as f:
        for kind in sorted(metamodel.metaclasses.keys()):
            s = serialize_class(metamodel.metaclasses[kind].clazz)
            f.write(s)
            
        for ass in sorted(metamodel.associations, key=lambda x: x.rel_id):
            s = serialize_association(ass)
            f.write(s)
def persist_schema ( metamodel , path , mode = 'w' ) : with open ( path , mode ) as f : for kind in sorted ( metamodel . metaclasses . keys ( ) ) : s = serialize_class ( metamodel . metaclasses [ kind ] . clazz ) f . write ( s ) for ass in sorted ( metamodel . associations , key = lambda x : x . rel_id ) : s = serialize_association ( ass ) f . write ( s )
Persist all class and association definitions in a *metamodel* by 
    serializing them and saving to a *path* on disk.
Persist all class and association definitions in a * metamodel * by serializing them and saving to a * path * on disk .