Energy harvesting (EH) provisioned wireless sensor nodes are key enablers to increase network life time in modern wireless sensor networks (WSNs). However, the intermittent nature of the EH process necessitates management of nodes' limited data and energy buffer capacity. In this paper, a unified mathematical model for a cooperative EHWSN with an opportunistic relay is presented. The energy and data causality constraints are expressed in terms of throughput, available energy, delay and transmission time. Considering finite energy buffers, data buffers and discrete transmission rates (as defined in the standard IEEE 802.15.4) at the nodes, different intuitive online power allocation policies at the relay are studied. The results show that a policy achieving high throughput is less fair and vice versa. Therefore, a joint rate and power allocation policy (JRPAP) is proposed in this study which provides a better trade off between fairness, throughput and energy over intuitive policies. Based on the JRPAP results, we propose to use data aggregation (DA) to achieve throughput gain at lower buffer sizes. In addition, the notion of energy aggregation (EA) is introduced to achieve throughput gain at higher buffer sizes. Combining both EA and DA further improves the overall throughput at all buffer sizes.