# Path: kosek/ImplementationDefinition/NestableDefinition.py
# class NestableDefinition(object):
#     def __init__(self, *args, **kws):
#         pass
# 
#     def validate(self, parameter, path):
#         parameterName = parameter.parameterName
#         path.append(parameterName)
#         self.setDefaults(parameter)
#         print "Validating '%s'" % ('::'.join(path))
#         self._validate(parameter, path)
#         path.pop(-1)
# 
# 
#     def setDefaults(self, parameter):
#         ImplRefDef = {}
#         """
#         actualParameters = set([p.parameterName for p in parameter.parameterList])
#         if isinstance(parameter, ImplRefDef):
#             defaultParameters = set()
#         else:
#             defaultParameters = set([key for key, value in parameter.implDefinition.items() if not isinstance(value, ImplRefDef) and value.default])
#             
#         defaultsNeeded = defaultParameters - actualParameters
#         """


import unittest
from kosek.Logger import Logger
from kosek.ImplementationDefinition.NestableDefinition import NestableDefinition

   s. FLOSS-EXCEPTION.txt
"""


#from kosek.ImplementationDefinition.AttributeDefinitions import ImplAttrDef, ImplAttrType

logger = Logger()

class Enumeration(object):
    def __init__(self, enumerationList):
        self._dict = dict([(e.name, e) for e in enumerationList])
        self._enumerationList = enumerationList

    def values(self):
        return self._dict.values()

    def items(self):
        return self._dict

    def __getitem__(self, item):
        return self._dict[item]
    
    def __contains__(self, item):
        return item in self._dict
    
    def __repr__(self):
        return "ENUMERATION(%s)" % str(self._enumerationList)



# Path: kosek/ImplementationDefinition/NestableDefinition.py
# class NestableDefinition(object):
#     def __init__(self, *args, **kws):
#         pass
# 
#     def validate(self, parameter, path):
#         parameterName = parameter.parameterName
#         path.append(parameterName)
#         self.setDefaults(parameter)
#         print "Validating '%s'" % ('::'.join(path))
#         self._validate(parameter, path)
#         path.pop(-1)
# 
# 
#     def setDefaults(self, parameter):
#         ImplRefDef = {}
#         """
#         actualParameters = set([p.parameterName for p in parameter.parameterList])
#         if isinstance(parameter, ImplRefDef):
#             defaultParameters = set()
#         else:
#             defaultParameters = set([key for key, value in parameter.implDefinition.items() if not isinstance(value, ImplRefDef) and value.default])
#             
#         defaultsNeeded = defaultParameters - actualParameters
#         """


# Path: kosek/ImplementationDefinition/Enumeration.py
import unittest
from kosek.Logger import Logger
from kosek.ImplementationDefinition.NestableDefinition import NestableDefinition


   s. FLOSS-EXCEPTION.txt
"""


#from kosek.ImplementationDefinition.AttributeDefinitions import ImplAttrDef, ImplAttrType

logger = Logger()

class Enumeration(object):
    def __init__(self, enumerationList):
        self._dict = dict([(e.name, e) for e in enumerationList])
        self._enumerationList = enumerationList

    def values(self):
        return self._dict.values()

    def items(self):
        return self._dict

    def __getitem__(self, item):
        return self._dict[item]
    
    def __contains__(self, item):
        return item in self._dict
    
    def __repr__(self):
        return "ENUMERATION(%s)" % str(self._enumerationList)



class Enumerator(NestableDefinition):