Exemplo n.º 1
0
#Copyright (C) 2000 Aloril
#Copyright (C) 2002 by AIR-IX SUUNNITTELU/Ahiplan Oy

#This library is free software; you can redistribute it and/or
#modify it under the terms of the GNU Lesser General Public
#License as published by the Free Software Foundation; either
#version 2.1 of the License, or (at your option) any later version.

#This library is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#Lesser General Public License for more details.

#You should have received a copy of the GNU Lesser General Public
#License along with this library; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


import init
import operator
from atlas.analyse import fill_attributes
from atlas.transport.file import read_file, write_file

if __name__=="__main__":
    filelist = ["root", "entity", "operation", "type"]
    filelist = map(lambda file:file+".atlas", filelist)
    objects = reduce(operator.add, map(read_file, filelist))
    fill_attributes(objects)
    write_file(objects, "atlas.atlas")
Exemplo n.º 2
0
#Copyright (C) 2000 Aloril
#Copyright (C) 2002 by AIR-IX SUUNNITTELU/Ahiplan Oy

#This library is free software; you can redistribute it and/or
#modify it under the terms of the GNU Lesser General Public
#License as published by the Free Software Foundation; either
#version 2.1 of the License, or (at your option) any later version.

#This library is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#Lesser General Public License for more details.

#You should have received a copy of the GNU Lesser General Public
#License along with this library; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


import init
import operator
from atlas.analyse import fill_attributes
from atlas.transport.file import read_file, write_file

if __name__=="__main__":
    filelist = ["root", "entity", "operation", "type", "interface"]
    filelist = map(lambda file:file+".atlas", filelist)
    objects = reduce(operator.add, map(read_file, filelist))
    fill_attributes(objects)
    write_file(objects, "atlas.atlas")
Exemplo n.º 3
0
 def write_in_order(self, amap, file):
     items = amap.objects.items()
     items.sort()
     write_file(map(lambda a: a[1], items), file)
Exemplo n.º 4
0
 def save(self):
     return
     name = save_file_name % self.save_no
     write_file(self.objects.values(), name)
     print "Wrote", name
     self.save_no = self.save_no + 1
Exemplo n.º 5
0
 def save(self):
     return
     name = save_file_name % self.save_no
     write_file(self.objects.values(), name)
     print "Wrote", name
     self.save_no = self.save_no + 1
Exemplo n.º 6
0
 def write_in_order(self, amap, file):
     items = list(amap.objects.items())
     items.sort()
     write_file([a[1] for a in items], file)
Exemplo n.º 7
0
#!/usr/bin/env python
from map_canvas import *
all_objects, all_media_info_dict = load_map_and_media_as_atlas_objects()
all_objects.update(all_media_info_dict)
fill_attributes(list(all_objects.values()))
from atlas.transport.file import write_file
write_file(list(all_objects.values()), "simple_core.atlas")
Exemplo n.º 8
0
 def write_in_order(self, amap, file):
     items = amap.objects.items()
     items.sort()
     write_file(map(lambda a:a[1], items), file)
Exemplo n.º 9
0
#!/usr/bin/env python
from map_canvas import *
all_objects, all_media_info_dict = load_map_and_media_as_atlas_objects()
all_objects.update(all_media_info_dict)
fill_attributes(all_objects.values())
from atlas.transport.file import write_file
write_file(all_objects.values(), "simple_core.atlas")