For the line voltage, you have a couple of options. You could utilize a full-bridge rectifier (or half-bridge with some additional circuitry) with an AC transformer to get a lower AC voltage prior to rectification, then buck the rectified voltage down to whatever your desired DC voltage with a stand-alone regulator or buck converter, etc.
You could also rectify the input AC directly and use a PWM controller to buck the resulting rectified DC down to the desired voltage. This requires some more complex V and I monitoring and there may be some devices that do this already.
Or you could just buy an off-the-shelf AC/DC power supply with the required output voltage you need. You can find supplies pretty cheap these days.
The battery will require a buck or boost converter depending on your battery input voltage and desired output. If you are going from a 9V battery to 5V DC, you can use a linear regulator. If you are going from a Lithium primary battery (3.7V) to 5V DC, then you will need a boost circuit and probably some recharging capability. I suggest looking at TI or Linear Tech. for Power Management ICs.
The solar is a little bit trickier, because to use a PV input efficiently, you need to track the maximum power point of the PV array, using an MPPT device. If you don't care about efficiency, you can probably just use a regulator with an under-voltage shutoff (UVLO) adjustable input. It really depends on your load current requirement on the 5V DC side.
If you plan to be able to accommodate all three inputs -> 5V DC at once, then you will need to diode or FET-OR (with an ideal-diode controller) them together, and make sure the reverse voltage on the OR-ing devices will allow this. Otherwise, you can only use one at a time with a switch, for instance.