Obtain the value-to-class mapping set by user.

        :returns: The complete mapping as a dict of lists.
        :rtype: dict
190507
def get_value_map(self):
        
        value_map = {}
        tree_clone = self.tree_mapping_widget.invisibleRootItem().clone()
        for tree_branch in tree_clone.takeChildren():
            value_list = []
            for tree_leaf in tree_branch.takeChildren():
                value_list += [tree_leaf.data(0, Qt.UserRole)]
            if value_list:
                value_map[tree_branch.data(0, Qt.UserRole)] = value_list
        return value_map
134061
def get_field_mapping(self):
        
        fields = {}
        values = {}
        for tab in self.tabs:
            parameter_values = tab.get_parameter_value()
            fields.update(parameter_values['fields'])
            values.update(parameter_values['values'])
        return {
            'fields': fields,
            'values': values
        }
1360917
def to_dict(self):
        '''
        '''
        mapping = dict()
        for attr in dir(self):
            if attr.startswith('_'):
                continue
            if not isinstance(getattr(self.__class__, attr), property):
                continue
            try:
                value = getattr(self, attr)
            except AttributeError:
                if attr in self._OPTIONAL_ATTRS:
                    continue
                else:
                    raise AttributeError(
                        'Required attribute "{0}" does not exist on '
                        'instance of type "{1}.'.format(
                            attr, self.__class__.__name__
                        )
                    )
            mapping[attr] = value
        return mapping
1024568
def as_dict(self):
        
        out = {}
        for prop in self:
            propval = getattr(self, prop)

            if hasattr(propval, 'for_json'):
                out[prop] = propval.for_json()
            elif isinstance(propval, list):
                out[prop] = [getattr(x, 'for_json', lambda:x)() for x in propval]
            elif isinstance(propval, (ProtocolBase, LiteralValue)):
                out[prop] = propval.as_dict()
            elif propval is not None:
                out[prop] = propval

        return out
127856
def to_dict(self):
        
        result = {}
        result["type"] = "Configurable"
        result["class"] = get_classname(self)
        result["config"] = {}
        for k in self._config:
            v = self._config[k]
            if isinstance(v, JSONObject):
                result["config"][k] = v.to_dict()
            else:
                result["config"][k] = v
        return result
379636
def to_dict(self):
        
        
        ret = merge_dicts(self.__attributes__, self.__relations__, self.__fields__)
        ret = {k : v.value for k,v in ret.items()}
        ret['maps'] = {k : v.value for k,v in self.maps.items()}
        return ret
382839
def _setup(self):
        

        cls = self.__class__
        if cls._map is None or cls._reverse_map is not None:
            return
        cls._reverse_map = {}
        for key, value in cls._map.items():
            cls._reverse_map[value] = key
167573
def to_mapping(self,**values):
        
        strike, dip, rake = self.strike_dip_rake()
        min, max = self.angular_errors()

        try:
            disabled = self.disabled
        except AttributeError:
            disabled = False

        mapping = dict(
            uid=self.hash,
            axes=self.axes.tolist(),
            hyperbolic_axes=self.hyperbolic_axes.tolist(),
            max_angular_error=max,
            min_angular_error=min,
            strike=strike,
            dip=dip,
            rake=rake,
            disabled=disabled)

        # Add in user-provided-values, overwriting if
        # necessary
        for k,v in values.items():
            mapping[k] = v
        return mapping
787810
def attrs(self) -> Mapping:
        
        if self._attrs is None:
            self._attrs = OrderedDict()
        return self._attrs
372156
def list_mapped_classes():
        
        cls_dict = {key: value
                    for key, value in MODULE.rdfclass.__dict__.items()
                    if not isinstance(value, RdfConfigManager)
                    and key not in ['properties']
                    and hasattr(value, 'es_defs')
                    and value.es_defs.get('kds_esIndex')}
        new_dict = {}
        # remove items that are appearing as a subclass of a main mapping class
        # the intersion of the set of the cls_dict values and the a classes
        # individual hierarchy will be >1 if the class is a subclass of another
        # class in the list
        potential_maps = set([cls_.__name__ for cls_ in cls_dict.values()])
        for name, cls_ in cls_dict.items():
            parents = set(cls_.hierarchy)
            if len(parents.intersection(potential_maps)) <= 1:
                new_dict[name] = cls_
        return new_dict
1046099
def as_dict(self):
        

        output_dictionary = dict()

        for attribute_name, type_instance in inspect.getmembers(self):

            if attribute_name.startswith('__') or inspect.ismethod(type_instance):
                continue

            if isinstance(type_instance, bool):
                output_dictionary[attribute_name] = type_instance
            elif isinstance(type_instance, self.__class__):
                output_dictionary[attribute_name] = type_instance.as_dict()

        return output_dictionary
616661
def as_dict(self):
        
        return {"name": self.name,
                "@module": self.__class__.__module__,
                "@class": self.__class__.__name__}
335816
def to_dict(self):
        
        result_dict = {}
        for column in self.__table__.columns.keys():  # pylint: disable=no-member
            value = result_dict[column] = getattr(self, column, None)
            if isinstance(value, Decimal):
                result_dict[column] = float(result_dict[column])
            elif isinstance(value, datetime.datetime):
                result_dict[column] = value.isoformat()
        return result_dict
626795
def selected_mapping(self):
        
        value_map = {}
        tree_clone = self.treeClasses.invisibleRootItem().clone()
        for tree_branch in tree_clone.takeChildren():
            value_list = []
            for tree_leaf in tree_branch.takeChildren():
                value_list += [tree_leaf.data(0, Qt.UserRole)]
            if value_list:
                value_map[tree_branch.data(0, Qt.UserRole)] = value_list
        return value_map
396977
def serialize(self):
        

        def _serialize(value):
            if hasattr(value, 'serialize'):
                return value.serialize()
            elif hasattr(value, 'to_dict'):
                return value.to_dict()
            else:
                return value

        return list(map(_serialize, self.items))
1154909
def get_es_mappings(self):
        

        es_mappings = json.loads(requests.get(self.mapping_url).text)
        es_mappings = {"_".join(key.split("_")[:-1]): value['mappings'] \
                       for key, value in es_mappings.items()}
        return es_mappings
194615
def as_dict(self):
        
        d = MSONable.as_dict(self)
        d["data"] = self.data.tolist()
        return d