Trigger find of serialized sources and build objects
555723
def map(self, options=None):
        """"""
        for path, data in self.paths.items():
            for obj in self.create_class(data, options=options):
                self.add_object(obj)
17559
def _ReferenceFromSerialized(serialized):
  """"""
  if not isinstance(serialized, basestring):
    raise TypeError('serialized must be a string; received %r' % serialized)
  elif isinstance(serialized, unicode):
    serialized = serialized.encode('utf8')
  return entity_pb.Reference(serialized)
565730
def _update_datasource(self, source, data):
        
        if not self.document:
            return

        data = self._postprocess_data(data)
        empty = all(len(v) == 0 for v in data.values())
        if (self.streaming and self.streaming[0].data is self.current_frame.data
            and self._stream_data and not empty):
            stream = self.streaming[0]
            if stream._triggering:
                data = {k: v[-stream._chunk_length:] for k, v in data.items()}
                source.stream(data, stream.length)
            return

        if cds_column_replace(source, data):
            source.data = data
        else:
            source.data.update(data)
1059496
def stream_object_data(self, ref):
		""""""
		cmd = self.__get_persistent_cmd("cat_file_all", "cat_file", batch=True)
		hexsha, typename, size = self.__get_object_header(cmd, ref)
		return (hexsha, typename, size, self.CatFileContentStream(size, cmd.stdout))
941291
def _get_serializer(output):
    '''
    
    '''
    serializers = salt.loader.serializers(__opts__)
    try:
        return getattr(serializers, output)
    except AttributeError:
        raise CommandExecutionError(
            "Unknown serializer '{0}' found for output option".format(output)
        )
1065605
function dataSource(type) {
  if (arguments.length === 1 && (utils.isObject(type) || typeof type === 'string')) {
    return type
  }
  else if (!ds.hasOwnProperty(type)) {
    throw new FieldError('Unknown data source type: ' + type)
  }

  var args = utils.args(arguments, 1)
    , dataSource = {
      type: type
    }

  ds[type].apply(dataSource, args)

  return dataSource
}
684762
async def post_list(cls, sender, db, instances):
        '''
        
        '''
        serialized_objects = await asyncio.gather(*[obj.serialize() for obj in instances])
        await cls.emit(db, 'resource_get_list', serialized_objects)
1213738
def system_find_data_objects(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/findDataObjects', input_params, always_retry=always_retry, **kwargs)
844584
def find(handle)
      handle = build_handle(handle)
      entity_hash = get_data(handle)
      entity = build(entity_hash)
      entity.persisted = true
      entity
    end
1301947
def build_sourcemap(sources):
    
    sourcemap = {}
    for sfile in sources:
        inc = find_includes(sfile)
        sourcemap[sfile] = set(inc)
    return sourcemap
1161439
def __initializeFromRaw(self):
        """"""

        for (key, value) in self.raw_data.items():
            if key.startswith("@"):
                # be compatible with IncludedInBuild
                if "@oslc_cm:label" != key:
                    continue

            attr = key.split(":")[-1].replace("-", "_")
            attr_list = attr.split(".")

            # ignore long attributes
            if len(attr_list) > 1:
                # attr = "_".join([attr_list[-2],
                #                  attr_list[-1]])
                continue

            self.field_alias[attr] = key

            if isinstance(value, OrderedDict):
                value_text = value.get("#text")
                if value_text is not None:
                    value = value_text
                else:
                    # request detailed info using rdf:resource
                    value = list(value.values())[0]

                    try:
                        value = self.__get_rdf_resource_title(value)
                    except (exception.RTCException, Exception):
                        self.log.error("Unable to handle %s", value)
            self.setattr(attr, value)
283332
function reloadSources(names) {

    names = u.isArray(names) ? names :
           names ? [names] :
           u.keys(opts.source$);

    var results = [];

    u.each(names, function(name) {
      var source = opts.source$[name];
      if (source) {
        source._reloadFromSource = true;
        results.push(name);
      } else {
        results.push(log('reloadSources unknown source ' + name));
      }
    });

    generator.reload(); // throttled
    return results;
  }
1163807
def get_source(self, objtxt):
        """"""
        obj, valid = self._eval(objtxt)
        if valid:
            return getsource(obj)
1296972
def dump_bulk(cls, parent=None, keep_ids=True):
        """"""

        serializable_cls = cls._get_serializable_model()
        if (
                parent and serializable_cls != cls and
                parent.__class__ != serializable_cls
        ):
            parent = serializable_cls.objects.get(pk=parent.pk)

        # a list of nodes: not really a queryset, but it works
        objs = serializable_cls.get_tree(parent)

        ret, lnk = [], {}
        for node, pyobj in zip(objs, serializers.serialize('python', objs)):
            depth = node.get_depth()
            # django's serializer stores the attributes in 'fields'
            fields = pyobj['fields']
            del fields['parent']

            # non-sorted trees have this
            if 'sib_order' in fields:
                del fields['sib_order']

            if 'id' in fields:
                del fields['id']

            newobj = {'data': fields}
            if keep_ids:
                newobj['id'] = pyobj['pk']

            if (not parent and depth == 1) or\
               (parent and depth == parent.get_depth()):
                ret.append(newobj)
            else:
                parentobj = lnk[node.parent_id]
                if 'children' not in parentobj:
                    parentobj['children'] = []
                parentobj['children'].append(newobj)
            lnk[node.pk] = newobj
        return ret
241677
function serialEach(object, fn, callback) {
  var keys = Object.keys(object);
  next();
  function next(err) {
    if (err) return callback(err);
    var key = keys.shift();
    if (!key) return callback();
    fn(key, object[key], next);
  }
}
1039791
def from_object(updates):
    ""
    import sys
    config = sys.modules[__name__]
    
    prefix = config.__name__.split('.')[0].upper()
    keys = [k for k in config.__dict__ if \
        k != from_object.__name__ and not k.startswith('_')]
    get_value = lambda c, k: hasattr(c, k) and getattr(c, k) or None
    for key in keys:
        prefix_key = '%s_%s' % (prefix, key)
        value = get_value(updates, prefix_key) or get_value(updates, key)
        if value: setattr(config, key, value)
1146024
def _serialize(self, target_obj, data_type=None, **kwargs):
        
        key_transformer = kwargs.get("key_transformer", self.key_transformer)
        keep_readonly = kwargs.get("keep_readonly", False)
        if target_obj is None:
            return None

        attr_name = None
        class_name = target_obj.__class__.__name__

        if data_type:
            return self.serialize_data(
                target_obj, data_type, **kwargs)

        if not hasattr(target_obj, "_attribute_map"):
            data_type = type(target_obj).__name__
            if data_type in self.basic_types.values():
                return self.serialize_data(
                    target_obj, data_type, **kwargs)

        # Force "is_xml" kwargs if we detect a XML model
        try:
            is_xml_model_serialization = kwargs["is_xml"]
        except KeyError:
            is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model())

        serialized = self._create_serialized_base(target_obj)  # Could be JSON or XML
        try:
            attributes = target_obj._attribute_map
            for attr, attr_desc in attributes.items():
                attr_name = attr
                if not keep_readonly and target_obj._validation.get(attr_name, {}).get('readonly', False):
                    continue

                if attr_name == "additional_properties" and attr_desc["key"] == '':
                    if target_obj.additional_properties is not None:
                        serialized.update(target_obj.additional_properties)
                    continue
                try:
                    ### Extract sub-data to serialize from model ###
                    orig_attr = getattr(target_obj, attr)
                    if target_obj.is_xml_model():
                        pass # Don't provide "transformer" for XML for now. Keep "orig_attr"
                    else: # JSON
                        keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr)
                        keys = keys if isinstance(keys, list) else [keys]

                    ### Serialize this data ###
                    kwargs["serialization_ctxt"] = attr_desc
                    new_attr = self.serialize_data(orig_attr, attr_desc['type'], **kwargs)

                    ### Incorporate this data in the right place ###
                    if is_xml_model_serialization:
                        xml_desc = attr_desc['xml']
                        xml_name = xml_desc['name']
                        if "attr" in xml_desc and xml_desc["attr"]:
                            serialized.set(xml_name, new_attr)
                            continue
                        if isinstance(new_attr, list):
                            serialized.extend(new_attr)
                        elif isinstance(new_attr, ET.Element):
                            # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces.
                            if 'name' not in getattr(orig_attr, '_xml_map', {}):
                                splitted_tag = new_attr.tag.split("}")
                                if len(splitted_tag) == 2: # Namespace
                                    new_attr.tag = "}".join([splitted_tag[0], xml_name])
                                else:
                                    new_attr.tag = xml_name
                            serialized.append(new_attr)
                        else:  # That's a basic type
                            # Integrate namespace if necessary
                            local_node = _create_xml_node(
                                xml_name,
                                xml_desc.get('prefix', None),
                                xml_desc.get('ns', None)
                            )
                            local_node.text = str(new_attr)
                            serialized.append(local_node)
                    else: # JSON
                        for k in reversed(keys):
                            unflattened = {k: new_attr}
                            new_attr = unflattened

                        _new_attr = new_attr
                        _serialized = serialized
                        for k in keys:
                            if k not in _serialized:
                                _serialized.update(_new_attr)
                            _new_attr = _new_attr[k]
                            _serialized = _serialized[k]
                except ValueError:
                    continue

        except (AttributeError, KeyError, TypeError) as err:
            msg = "Attribute {} in object {} cannot be serialized.\n{}".format(
                attr_name, class_name, str(target_obj))
            raise_with_traceback(SerializationError, msg, err)
        else:
            return serialized