Get a OmekaCollection class representation of an Omeka collection
 @param  id  [Integer] The ID of the collection to return. No value gets
 an array of all the items.
 @return  [OmekaCollection] An OmekaCollection object
 @since 1.0.0
171938
def get_collection(id)
      response = self.get('collections', id).body
      return OmekaClient::OmekaCollection.new(self, JSON.parse(response))
    end
1113749
def get(self, id):
        
        collection_name = self.request.headers.get("collection")

        if not collection_name:
            self.raise_error(400, "Missing a collection name for stack")

        self.stack = AsyncSchedulableDocumentRevisionStack(collection_name, self.settings)

        revision = yield self.stack.preview(id)
        self.write(revision)
564260
public Cat get(Integer id) {
        if (DB.isEmpty()) {
            addExampleCats();
        }

        return DB.get(id);
    }
250025
def get(self, key):
        """"""
        doc = self._collection.find_one({'_id': key})
        if doc:
            doc.pop('_id')
            return doc
1169671
public Object getObjectWithId( IdKey id ) {
        if ( null != idToObject ) {
            return idToObject.get( id );
        }
        return null;
    }
406245
def getCollectionClass(cls, name) :
        """'"""
        try :
            return cls.collectionClasses[name]
        except KeyError :
            raise KeyError( "There is no Collection Class of type: '%s'; currently supported values: [%s]" % (name, ', '.join(getCollectionClasses().keys())) )
1083342
def get_object(id)
      return nil unless (blob = find_blob(id)) && (obj = blob.read_object(id))
      deserialize(obj)
    end
728702
def find_one_by_id(self, _id):
        
        document = (yield self.collection.find_one({"_id": ObjectId(_id)}))
        raise Return(self._obj_cursor_to_dictionary(document))
860703
def get_object(self, ObjectClass, id):
        
        print('dynamo.get(%s, %s)' % (ObjectClass, str(id)))
        resp = self.db.engine.get(ObjectClass, [id])
        if resp:
            return resp[0]
        else:
            return None
926613
public static Object getElementFromCollection(Collection<Object> collection, int index) {
    if (collection.size() < index + 1)
      return null;

    if (collection instanceof List)
      return ((List<Object>) collection).get(index);

    Iterator<Object> iterator = collection.iterator();
    for (int i = 0; i < index; i++) {
      iterator.next();
    }
    return iterator.next();
  }
320177
def get_collection(self, collection_id=None, nav="children", page=None):
        
        return self.call(
            "collections",
            {
                "id": collection_id,
                "nav": nav,
                "page": page
            },
            defaults={
                "id": None,
                "nav": "children",
                "page": 1
            }
        )
1171504
def get_class_by_id(self, ac_id: int) -> AssetClass:
        
        assert isinstance(ac_id, int)

        # iterate recursively
        for ac in self.asset_classes:
            if ac.id == ac_id:
                return ac
        # if nothing returned so far.
        return None
1205518
def retrieve(self, request, _id):
        
        _id = deserialize(_id)

        retrieved = self.collection.find_one({'_id': _id})
        if retrieved:
            return Response(serialize(retrieved))
        else:
            return Response(
                response=serialize(
                    DocumentNotFoundError(self.collection.__name__, _id)
                ),
                status=400
            )
661897
def get(uid, ref = nil)
      # First check if it's a modified object.
      if (object = @modified_entries[uid])
        return object
      end

      # Then check the unmodified object list.
      if (object = @unmodified_entries[uid % @size]) && object.uid == uid
        return object
      end

      # If we don't have it in memory we need to load it.
      @klass::load(@collection, uid, ref)
    end
1293469
def find(id)
      result = self.class.get(worksheet_url + "/" + id).parsed_response
      check_and_raise_error(result)
      Record.new(result_attributes(result)) if result.present? && result["id"]
    end
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)
294341
private <T> T read_(Class<T> clazz, Object id) {
		Map<String, Object> objects = objects(clazz);
		return (T) objects.get(id.toString());
	}