Returns a list of information about ID's for a single document. This array is populated
by createIDList()
@type {?Array.<FileLocation>}
177925
function createIDList() {
        var doc = DocumentManager.getCurrentDocument();
        if (!doc) {
            return;
        }

        var idList = [];
        var docText = doc.getText();
        var lines = docText.split("\n");

        var regex = new RegExp(/\s+id\s*?=\s*?["'](.*?)["']/gi);
        var id, chFrom, chTo, i, line;
        for (i = 0; i < lines.length; i++) {
            line = lines[i];
            var info;
            while ((info = regex.exec(line)) !== null) {
                id = info[1];
                // TODO: this doesn't handle id's that share the
                // same portion of a name on the same line or when
                // the id and value are on different lines
                chFrom = line.indexOf(id);
                chTo = chFrom + id.length;
                idList.push(new FileLocation(null, i, chFrom, chTo, id));
            }
        }
        return idList;
    }
1012053
private static String getFormattedList(long[] idList) {
    if (idList == null) {
      idList = new long[]{};
    }
    return new StringBuilder().append("{")
        .append(StringUtils.join(ArrayUtils.toObject(idList), ','))
        .append("}").toString();
  }
671533
def get_ids(a):
    
    a_id = '%s.id.fa' % (a.rsplit('.', 1)[0])
    a_id_lookup = '%s.id.lookup' % (a.rsplit('.', 1)[0])
    if check(a_id) is True:
        return a_id, a_id_lookup
    a_id_f = open(a_id, 'w')
    a_id_lookup_f = open(a_id_lookup, 'w')
    ids = []
    for seq in parse_fasta(open(a)):
        id = id_generator() 
        while id in ids:
            id = id_generator() 
        ids.append(id)
        header = seq[0].split('>')[1]
        name = remove_bad(header)
        seq[0] = '>%s %s' % (id, header)
        print('\n'.join(seq), file=a_id_f)
        print('%s\t%s\t%s' % (id, name, header), file=a_id_lookup_f)
    return a_id, a_id_lookup
664612
@Requires("location != null")
  public List<? extends File> getLocation(Location location) {
    Iterable<? extends File> path = fileManager.getLocation(location);
    if (path == null) {
      return null;
    }

    ArrayList<File> locations = new ArrayList<File>();
    for (File entry : path) {
      locations.add(entry);
    }
    return locations;
  }
661720
public function getDocById($str_id)
    {
        $obj_request = new ListDocumentsRequest();
        $obj_params = $this->prepareRequestParams($obj_request);
        $obj_params->setStartDocId($str_id)->setLimit(1);
        $this->execute('ListDocuments', $obj_request, new ListDocumentsResponse());
        $obj_response = $this->processListResponse();

        // Verify that the document is the one we want and if not, empty the response
        // This works around the lack of a "get-by-id" method on the Google Protocol Buffer
        if($obj_response->count > 0) {
            if($str_id !== $obj_response->docs[0]->getId()) {
                $obj_response->count = 0;
                $obj_response->docs = [];
            }
        }
        return $obj_response;
    }
178196
public String getDocumentId(Object instance) {
        if (instance == null) {
            return null;
        }
        DocumentInfo value = documentsByEntity.get(instance);
        return value != null ? value.getId() : null;
    }
1352159
public Document<K> addDocument(K id, String document)
    {
        return addDocument(id, preprocess(document));
    }
1275795
function(doc) {
        var node_list = doc.getElementsByTagName("node");
        var nodes = {};
        for (var i = 0; i < node_list.length; i++) {
            var node = node_list[i];
            var id = node.getAttribute("id");
            nodes[id] = {
                'lat': node.getAttribute("lat"),
                'lon': node.getAttribute("lon"),
                'node': node
            };
        }
        return nodes;
    }
646607
def get(self, id):
        
        data = self.fetch('documents/%s.json' % id).get("document")
        data['_connection'] = self._connection
        return Document(data)
304980
@Override
	public List<T> getForIdentifiers(Collection<X> ids) {
		if(AssertUtils.isEmpty(ids)) {
			return null;
		}
		
		if(this.idKey == null) {
			fetchMappingContextAndConversionService();
		}
		
		Query query = new Query(Criteria.where(this.idKey).in(ids));
		return this.mongoTemplate.find(query, this.entityClass);
	}
590230
protected Object[] idsOf(final List<?> idsOrValues) {
        // convert list to array that we can mutate
        final Object[] ids = idsOrValues.toArray();

        // mutate array to contain only non-empty ids
        int length = 0;
        for (int i = 0; i < ids.length;) {
            final Object p = ids[i++];
            if (p instanceof HasId) {
                // only use values with ids that are non-empty
                final String id = ((HasId) p).getId();
                if (!StringUtils.isEmpty(id)) {
                    ids[length++] = id;
                }
            } else if (p instanceof String) {
                // only use ids that are non-empty
                final String id = p.toString();
                if (!StringUtils.isEmpty(id)) {
                    ids[length++] = id;
                }
            } else if (p != null) {
                throw new StoreException("Invalid id or value of type " + p);
            }
        }

        // no ids in array
        if (length == 0) {
            return null;
        }

        // some ids in array
        if (length != ids.length) {
            final Object[] tmp = new Object[length];
            System.arraycopy(ids, 0, tmp, 0, length);
            return tmp;
        }

        // array was full
        return ids;
    }
1349301
def get_document_list(self):
        
        try:
            return self.__dict__['document_list']
        except KeyError:
            obj_list = DocumentSet([
                self._connection.documents.get(i) for i in self.document_ids
            ])
            self.__dict__['document_list'] = obj_list
            return obj_list
539139
private static List<String> getElementsId(Document document) {
        List<String> result = new ArrayList<String>();

        List<Element> elementList = getElements(document);

        result = getElementsId(elementList);

        return result;
    }
102538
def get_empty_ids(self):
        
        cursor = self.get_collection().find(
            {
                '_id': {'$in': self._document_ids},
                self._field: {'$exists': True}
            },
            {'_id': True}
        )

        return set(self._document_ids) - {doc['_id'] for doc in cursor}
1252057
private static Element lookupId(List<Element> fields) {
		Element objectIdField = null;
		Element uuidField = null;
		Element _idField = null;
		Element idField = null;
		for (Element field : fields) {
			if (field.getAnnotation(Id.class) != null) {
				return field;
			}
			if (isObjectId(field)) {
				objectIdField = field;
			}
			else if (isUUID(field)) {
				uuidField = field;
			}
			else if (field.getSimpleName().contentEquals(ID_FIELD_NAME)) {
				_idField = field;
			}
			else if (field.getSimpleName().contentEquals("id")) {
				idField = field;
			}
		}

		if (objectIdField != null) {
			return objectIdField;
		}
		if (uuidField != null) {
			return uuidField;
		}
		if (_idField != null) {
			return _idField;
		}
		if (idField != null) {
			return idField;
		}

		return null;
	}
86156
public Set<String> leafRevisionIds() {
        Set<String> res = new HashSet<String>();
        for(DocumentRevisionNode obj : leafs()) {
            res.add(obj.getData().getRevision());
        }
        return res;
    }
824579
public static function getIdList(): array
    {
        $list = [];
        foreach (self::getAll() as $tree) {
            $list[$tree->id] = $tree->title;
        }

        return $list;
    }