Populate the ``acquisition_source`` key.
507846
def acquisition_source(self, key, value):
    """"""
    def _get_datetime(value):
        d_value = force_single_element(value.get('d', ''))
        if d_value:
            try:
                date = PartialDate.loads(d_value)
            except ValueError:
                return d_value
            else:
                datetime_ = datetime(year=date.year, month=date.month, day=date.day)
                return datetime_.isoformat()

    internal_uid, orcid, source = None, None, None

    a_values = force_list(value.get('a'))
    for a_value in a_values:
        if IS_INTERNAL_UID.match(a_value):
            if a_value.startswith('inspire:uid:'):
                internal_uid = int(a_value[12:])
            else:
                internal_uid = int(a_value)
        elif IS_ORCID.match(a_value):
            if a_value.startswith('orcid:'):
                orcid = a_value[6:]
            else:
                orcid = a_value
        else:
            source = a_value

    c_value = force_single_element(value.get('c', ''))
    normalized_c_value = c_value.lower()

    if normalized_c_value == 'batchupload':
        method = 'batchuploader'
    elif normalized_c_value == 'submission':
        method = 'submitter'
    else:
        method = normalized_c_value

    return {
        'datetime': _get_datetime(value),
        'email': value.get('b'),
        'internal_uid': internal_uid,
        'method': method,
        'orcid': orcid,
        'source': source,
        'submission_number': value.get('e'),
    }
574347
def _populate(self):
        """"""
        self.add(self._core_data)
        if self.initial_data:
            self.add(self.initial_data)
903838
public void acquire() 
    { 
        if (_hasAcquired)
            return;

        // Deliver the onAcquire event to registered listeners
        for (ResourceEvents resourceListener : _listeners)
            resourceListener.onAcquire();

        // Register this ResourceContext with associated container context
        _containerContext.addResourceContext(this, _bean);

        // Set the flag to indicate resources have been acquired.
        _hasAcquired = true;
    }
719995
def import_source(self, CachableSource):
        """"""
        _count = 0
        for item in CachableSource.items():
            if self.cache(item):
                _count += 1
        return _count
746878
def lookup(source, keys, fallback = None):
  """"""
  try:
    for key in keys:
      source = source[key]
    return source
  except (KeyError, AttributeError, TypeError):
    return fallback
109631
def get_sourced_from(entry):
    """"""
    sourced_from = 'http://worldmodelers.com/DataProvenance#sourced_from'

    if sourced_from in entry:
        values = entry[sourced_from]
        values = [i['@id'] for i in values]
        return values
446150
def acquire(self, resources, prop_name):
        

        # Instance
        custom_prop = getattr(self.props, prop_name, None)
        if custom_prop:
            return custom_prop

        # Parents...can't use acquire as have to keep going on acquireds
        for parent in self.parents(resources):
            acquireds = parent.props.acquireds
            if acquireds:
                # First try in the per-type acquireds
                rtype_acquireds = acquireds.get(self.rtype)
                if rtype_acquireds:
                    prop_acquired = rtype_acquireds.get(prop_name)
                    if prop_acquired:
                        return prop_acquired

                # Next in the "all" section of acquireds
                all_acquireds = acquireds.get('all')
                if all_acquireds:
                    prop_acquired = all_acquireds.get(prop_name)
                    if prop_acquired:
                        return prop_acquired

        return
799059
def source_get(method_name):
    

    def source_get(_value, context, **_params):
        method = getattr(context["model"].source, method_name)
        return _get(method, context["key"], (), {})

    return source_get
431209
def populateFromRow(self, referenceSetRecord):
        
        self._dataUrl = referenceSetRecord.dataurl
        self._description = referenceSetRecord.description
        self._assemblyId = referenceSetRecord.assemblyid
        self._isDerived = bool(referenceSetRecord.isderived)
        self._md5checksum = referenceSetRecord.md5checksum
        species = referenceSetRecord.species
        if species is not None and species != 'null':
            self.setSpeciesFromJson(species)
        self._sourceAccessions = json.loads(
            referenceSetRecord.sourceaccessions)
        self._sourceUri = referenceSetRecord.sourceuri
1054567
def acquire(self):
    """"""
    self.parent.__set__(self.instance, self.parent.state + 1)
    try:
      yield
    finally:
      self.parent.__set__(self.instance, self.parent.state - 1)
645981
def _populate_data(self):
        """"""
        if self.id is None:
            self.id = self.meta_data.get("id")

        self.stop_time = None
        self.creation_time = None
        self.start_time = None
        self.populate_times()
        self.protocol = self.meta_data.get("af")
        self.target_ip = self.meta_data.get("target_ip")
        self.target_asn = self.meta_data.get("target_asn")
        self.target = self.meta_data.get("target")
        self.description = self.meta_data.get("description")
        self.is_oneoff = self.meta_data.get("is_oneoff")
        self.is_public = self.meta_data.get("is_public")
        self.interval = self.meta_data.get("interval")
        self.resolve_on_probe = self.meta_data.get("resolve_on_probe")
        self.status_id = self.meta_data.get("status", {}).get("id")
        self.status = self.meta_data.get("status", {}).get("name")
        self.type = self.get_type()
        self.result_url = self.meta_data.get("result")
463912
private void populateIndexer(String indexerClass, Client client)
    {
        if (indexerClass != null && indexerClass.equals(OracleNoSQLInvertedIndexer.class.getName()))
        {
            ((OracleNoSQLInvertedIndexer) indexManager.getIndexer()).setKvStore(kvStore);
            ((OracleNoSQLInvertedIndexer) indexManager.getIndexer()).setHandler(((OracleNoSQLClient) client)
                    .getHandler());
        }
    }
326720
def populate(content, **options)
      generator.create_file(RubyEdit::SOURCE_FILE_LOCATION,
                            content,
                            force: true,
                            verbose: false,
                            **options)
    end
44760
private void populateCurrentKeyValue() throws IOException, InterruptedException {
    currentKey = delegateReader.getCurrentKey();
    currentValue = delegateReader.getCurrentValue();
    ++recordsRead;
  }
1170048
def load(self, name, code):
        """"""

        source = "\n".join(code)
        self._objects[name] = source
307583
def populate(amount, options = {}, &block)
      self.class.remember_depth do
        build_records(Populator.interpret_value(amount), options[:per_query] || DEFAULT_RECORDS_PER_QUERY, &block)
      end
    end
1329210
def _get_populate_from_value(self, instance):
        """"""
        if hasattr(self.populate_from, '__call__'):
            # ResolweSlugField(populate_from=lambda instance: ...)
            return self.populate_from(instance)
        else:
            # ResolweSlugField(populate_from='foo')
            attr = getattr(instance, self.populate_from)
            return attr() if callable(attr) else attr