I have already written a blog on how to create a custom claim in Java based web application using ADF claim cartridge. Also you can refer the bolg from Jan Horsman [ weather-cartridge] for same type of implementation.
Similarly you can create the Jav... Read the full text.