Get a dataset collection by ID
        :param collection ID
326044
def _get_collection(collection_id):
    
    try:
        collection = db.DBSession.query(DatasetCollection).filter(DatasetCollection.id==collection_id).one()
        return collection
    except NoResultFound:
        raise ResourceNotFoundError("No dataset collection found with id %s"%collection_id)
1165348
public static function find($collection, $id)
    {
        $id = intval($id);
        foreach ($collection as $entity) {
            if ($id === $entity->getId()) {
                return $entity;
            }
        }

        return null;
    }
171938
def get_collection(id)
      response = self.get('collections', id).body
      return OmekaClient::OmekaCollection.new(self, JSON.parse(response))
    end
296567
function findById(id) {
  return db
    .collection(config.get('arangodb:collections:users:name'))
    .document(id)
    .then((user) => {
      user._id = user._key;

      return user;
    })
    .catch({code: 404}, () => null);
}
1122120
def get(self, collection, doc_id, **kwargs):
        

        resp, con_inf = self.transport.send_request(method='GET',
                                                    endpoint='get',
                                                    collection=collection,
                                                    params={'id': doc_id},
                                                    **kwargs)
        if 'doc' in resp and resp['doc']:
            return resp['doc']
        raise NotFoundError
1359023
def check_dataset_in_collection(dataset_id, collection_id, **kwargs):
    

    _get_collection(collection_id)
    collection_item = _get_collection_item(collection_id, dataset_id)
    if collection_item is None:
        return 'N'
    else:
        return 'Y'
830973
def get_by_index(self, index):
        
        if index >= len(self._datasets):
            raise DataInvalidIndex('A dataset with index {} does not exist'.format(index))

        return self._datasets[index]
1157175
def get_documents_in_collection(self, collection_name, with_id=True):
        
        documents_iterator = self.database[collection_name].find()  # anything
        documents = [
            d for d in documents_iterator
        ]  # list of all documents in collection in database

        if not with_id:
            for doc in documents:
                doc.pop("_id")  # remove id key

        return documents
250668
public static BaasResult<BaasDocument> fetchSync(String collection,String id){
        return fetchSync(collection,id,false);
    }
68234
public function get($id)
    {
        if (!isset($this->items[$id])) {
            throw new DataSetColumnNotFoundException($id);
        }

        return $this->items[$id];
    }
1171778
private HashSet<String> get(String id) throws IOException {
    if (collectionCachePath != null) {
      Date date = clear();
      if (idToVersion.containsKey(id)) {
        String version = idToVersion.get(id);
        expirationVersion.put(version, date.getTime() + (1000 * lifeTime));
        MtasSolrCollectionCacheItem newItem = read(version, date.getTime());
        if (newItem != null && newItem.id.equals(id)) {
          return newItem.data;
        } else {
          log.error("couldn't get " + version);
          // delete file and remove from index
          if (!collectionCachePath.resolve(version).toFile().delete()) {
            log.debug("couldn't delete " + version);
          }
          idToVersion.remove(id);
          expirationVersion.remove(version);
          versionToItem.remove(version);
        }
      } else {
        log.error("doesn't exist anymore");
      }
      return null;
    } else

    {
      throw new IOException("no cachePath available, can't get data");
    }
  }
1325859
@Override
    public DataSet get(int[] i) {
        List<DataSet> list = new ArrayList<>();
        for(int ex : i){
            list.add(get(ex));
        }
        return DataSet.merge(list);
    }
263126
public Stream<DTO> streamByIds(Set<String> idSet) {
        final List<ObjectId> objectIds = idSet.stream()
                .map(ObjectId::new)
                .collect(Collectors.toList());

        return streamQuery(DBQuery.in("_id", objectIds));
    }
762552
def datasets_get(self, dataset_name):
    
    url = Api._ENDPOINT + (Api._DATASETS_PATH % dataset_name)
    return datalab.utils.Http.request(url, credentials=self._credentials)
107923
def get_collections(self, data):
        """"""
        collections = self._filter_queryset('view_collection', data.collection_set.all())

        from .collection import CollectionSerializer

        class CollectionWithoutDataSerializer(WithoutDataSerializerMixin, CollectionSerializer):
            """Collection without data field serializer."""

        return self._serialize_items(CollectionWithoutDataSerializer, 'collections', collections)
1030967
def get_curated(self, collection_id):
        
        url = "/collections/curated/%s" % collection_id
        result = self._get(url)
        return CollectionModel.parse(result)
1346982
def getReadGroupSet(self, id_):
        
        compoundId = datamodel.ReadGroupSetCompoundId.parse(id_)
        dataset = self.getDataset(compoundId.dataset_id)
        return dataset.getReadGroupSet(id_)