Controlling LED connected to gpio pin 4 on raspberry pi using Openhab 2

Hi! I am new to openhab2 and am still struggling with the abc of this tutorial i.e switching on a LED with openhab2.
I was successfully able to do it via openhab 1.0 version, but i am unable to understand how do i create a thing (LED) in openhab2 which is connected to my gpio pin 4.
Do not reply with the syntax for creating a thing, but post the actual code to create a thing, and the necessary change that i have to make in sitemap and items file.