Returns a pair: (doc_id, absolute filepath of document file)
        for each document in this repository.
        Order is arbitrary.
553092
def iter_doc_filepaths(self, **kwargs):  # pylint: disable=W0613
        
        with self._index_lock:
            for doc_id, info in self._doc_index.items():
                if not self._is_alias(doc_id):
                    yield doc_id, info[-1]
833245
function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {
    var metaDocId = '_local/doc_' + docId;
    var defaultMetaDoc = {_id: metaDocId, keys: []};
    var docData = docIdsToChangesAndEmits.get(docId);
    var indexableKeysToKeyValues = docData[0];
    var changes = docData[1];

    function getMetaDoc() {
      if (isGenOne(changes)) {
        // generation 1, so we can safely assume initial state
        // for performance reasons (avoids unnecessary GETs)
        return Promise.resolve(defaultMetaDoc);
      }
      return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));
    }

    function getKeyValueDocs(metaDoc) {
      if (!metaDoc.keys.length) {
        // no keys, no need for a lookup
        return Promise.resolve({rows: []});
      }
      return view.db.allDocs({
        keys: metaDoc.keys,
        include_docs: true
      });
    }

    function processKeyValueDocs(metaDoc, kvDocsRes) {
      var kvDocs = [];
      var oldKeys = new pouchdbCollections.Set();

      for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {
        var row = kvDocsRes.rows[i];
        var doc = row.doc;
        if (!doc) { // deleted
          continue;
        }
        kvDocs.push(doc);
        oldKeys.add(doc._id);
        doc._deleted = !indexableKeysToKeyValues.has(doc._id);
        if (!doc._deleted) {
          var keyValue = indexableKeysToKeyValues.get(doc._id);
          if ('value' in keyValue) {
            doc.value = keyValue.value;
          }
        }
      }
      var newKeys = pouchdbMapreduceUtils.mapToKeysArray(indexableKeysToKeyValues);
      newKeys.forEach(function (key) {
        if (!oldKeys.has(key)) {
          // new doc
          var kvDoc = {
            _id: key
          };
          var keyValue = indexableKeysToKeyValues.get(key);
          if ('value' in keyValue) {
            kvDoc.value = keyValue.value;
          }
          kvDocs.push(kvDoc);
        }
      });
      metaDoc.keys = pouchdbMapreduceUtils.uniq(newKeys.concat(metaDoc.keys));
      kvDocs.push(metaDoc);

      return kvDocs;
    }

    return getMetaDoc().then(function (metaDoc) {
      return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {
        return processKeyValueDocs(metaDoc, kvDocsRes);
      });
    });
  }
576643
def texts(self: object, fileids: str, plaintext: bool = True):
        

        for doc in self.docs(fileids):
            if plaintext==True:
                doc = re.sub(r'<.+?>\s', '', doc) # Remove citation info
            doc = doc.rstrip() # Clean up final line breaks
            yield doc
475068
def _get_doc_by_line_offset(self, doc_id):
        
        bounds = self._get_meta()[str(doc_id)].bounds
        return xml_utils.load_chunk(self.filename, bounds, slow=True)
254252
def get_documents(self):
        
        return self.session.query(Document).order_by(Document.name).all()
1151242
def __get_name(self):
        
        if self.is_new:
            return _("New document")
        try:
            split = self.__docid.split("_")
            short_docid = "_".join(split[:3])
            datetime_obj = datetime.datetime.strptime(
                short_docid, self.DOCNAME_FORMAT)
            final = datetime_obj.strftime("%x")
            return final
        except Exception as exc:
            logger.error("Unable to parse document id [%s]: %s"
                         % (self.docid, exc))
            return self.docid
714534
public static String getFilePath(int docId, String extention) {
        int[] split = getSplit(docId);
        return split[0] + "/" + split[1] + "/" + split[2] + "." + extention;
    }
1109325
def _find(self, id_):
        
        cur = self._connection.cursor()
        cur.execute(
            'SELECT fileNumber, offset FROM sequences WHERE id = ?', (id_,))
        row = cur.fetchone()
        if row is None:
            return None
        else:
            return self._getFilename(row[0]), row[1]
65197
def file_id(self):
        
        if self.type.lower() == "directory":
            return None
        if self.file_uuid is None:
            raise exceptions.MetsError(
                "No FILEID: File %s does not have file_uuid set" % self.path
            )
        if self.is_aip:
            return os.path.splitext(os.path.basename(self.path))[0]
        return utils.FILE_ID_PREFIX + self.file_uuid
787019
@InterfaceAudience.Public
    public String getDocumentId() {
        // Get the doc id from either the embedded document contents, or the '_id' value key.
        // Failing that, there's no document linking, so use the regular old _sourceDocID
        String docID = null;
        if (documentRevision != null)
            docID = documentRevision.getDocID();
        if (docID == null) {
            if (value != null) {
                if (value instanceof Map) {
                    Map<String, Object> props = (Map<String, Object>) value;
                    docID = (String) props.get("_id");
                }
            }
        }
        if (docID == null)
            docID = sourceDocID;
        return docID;
    }
1313035
public Map<String, Object> getDocument(String collectionName, String docId) {
        Map<String, Map<String,Object>> docs = DDPStateSingleton.getInstance()
                .getCollection(collectionName);
        if (docs != null) {
            return docs.get(docId);
        }
        return null;
    }
915219
def get_doc(self, doc_id):
        
        resp = self._r_session.get('/'.join([self._scheduler, 'docs', '_replicator', doc_id]))
        resp.raise_for_status()
        return response_to_json_dict(resp)
1057068
private Element getTopicDoc(final URI absolutePathToFile) {
        final DocumentBuilder builder = getDocumentBuilder();
        try {
            final Document doc = builder.parse(absolutePathToFile.toString());
            return doc.getDocumentElement();
        } catch (final SAXException | IOException e) {
            logger.error("Failed to parse " + absolutePathToFile + ": " + e.getMessage(), e);
        }
        return null;
    }
139939
def get(self, doc_id):
        """"""
        resp_dict = self._get_query(q='id:{}'.format(doc_id))
        if resp_dict['response']['numFound'] > 0:
            return resp_dict['response']['docs'][0]
1055465
def get_cached_document_ids(ids, doc_type):
    """"""
    for batch in _split_list(ids):
        for id in _get_cached_document_ids(batch, doc_type):
            yield id
767709
def get_docstring(filename, verbose=False):
    

    doc = None

    try:
        # Thank you, Habbie, for this bit of code :-)
        M = ast.parse(''.join(open(filename)))
        for child in M.body:
            if isinstance(child, ast.Assign):
                if 'DOCUMENTATION' in (t.id for t in child.targets):
                    doc = yaml.load(child.value.s)
    except:
        if verbose == True:
            traceback.print_exc()
            print "unable to parse %s" % filename
    return doc
463429
def document_ids(self):
        """"""
        matches = [PCC_DOCID_RE.match(os.path.basename(fname))
                   for fname in pcc.tokenization]
        return sorted(match.groups()[0] for match in matches)