# Path: omelette/fromage/common.py
# class DrawableNode(Drawable):
#     """Base class for node-like diagram elements (e.g. classes, use cases)."""
# 
#     def __init__(self, uml_object):
#         super(DrawableNode, self).__init__(uml_object)
# 
# class DrawableEdge(Drawable):
#     """Base class for edgy things (e.g. lines, relations)."""
# 
#     def __init__(self, uml_object):
#         super(DrawableEdge, self).__init__(uml_object)
# 
#         self.source_anchor = None
#         self.target_anchor = None
# 
# class Anchor(object):
#     """
#     Class representing connection between edge (connector) and something else
#     (slot).
#     """
# 
#     def __init__(self):
#         self.connector = None
#         self.slot = None


import inspect
from omelette.fromage.common import DrawableNode, DrawableEdge, Anchor
        name = "Drawable" + type_
        match = filter(lambda n: n.lower() == name.lower(), dir(module)).pop()
        drawable = getattr(module, match, None)

        if inspect.isclass(drawable):
            return drawable
        else: 
            raise ImportError("Couldn't find expected class " + name )

    def __import(self, name):
        module = __import__(name)
        components = name.split(".")

        for component in components[1:]:
            module = getattr(module, component)

        return module


class Diagram(object):
    def __init__(self, parent=None, modules_path="omelette.fromage.modules"):
        self.factory = _DrawableFactory(modules_path)
        self.nodes = {}
        self.edges = {}

    def add(self, uml_object):
        drawable = self.factory.create(uml_object)

        if isinstance(drawable, DrawableNode):
            self.nodes[uml_object.name] = drawable

# Path: omelette/fromage/common.py
# class DrawableNode(Drawable):
#     """Base class for node-like diagram elements (e.g. classes, use cases)."""
# 
#     def __init__(self, uml_object):
#         super(DrawableNode, self).__init__(uml_object)
# 
# class DrawableEdge(Drawable):
#     """Base class for edgy things (e.g. lines, relations)."""
# 
#     def __init__(self, uml_object):
#         super(DrawableEdge, self).__init__(uml_object)
# 
#         self.source_anchor = None
#         self.target_anchor = None
# 
# class Anchor(object):
#     """
#     Class representing connection between edge (connector) and something else
#     (slot).
#     """
# 
#     def __init__(self):
#         self.connector = None
#         self.slot = None


# Path: omelette/fromage/diagram.py
import inspect
from omelette.fromage.common import DrawableNode, DrawableEdge, Anchor

        name = "Drawable" + type_
        match = filter(lambda n: n.lower() == name.lower(), dir(module)).pop()
        drawable = getattr(module, match, None)

        if inspect.isclass(drawable):
            return drawable
        else: 
            raise ImportError("Couldn't find expected class " + name )

    def __import(self, name):
        module = __import__(name)
        components = name.split(".")

        for component in components[1:]:
            module = getattr(module, component)

        return module


class Diagram(object):
    def __init__(self, parent=None, modules_path="omelette.fromage.modules"):
        self.factory = _DrawableFactory(modules_path)
        self.nodes = {}
        self.edges = {}

    def add(self, uml_object):
        drawable = self.factory.create(uml_object)

        if isinstance(drawable, DrawableNode):
            self.nodes[uml_object.name] = drawable

        elif isinstance(drawable, DrawableEdge):