CauchBase Query

Hi
I am designing a java GUI application that user can type a simple query that can add a key-value pair into an existing document, create a document, Execute views in a textarea and display the view result on a panel or textarea. is it best to use Rest API command or is there simple Cauchbase command that can be used to achieve that objective? Is there a link to a simple java code that can be of help to me?

Regards

add a key-value pair into an existing document, create a document
New object Set? Do you mean adding json objects into a vBucket via through REST? or Json objects inside of json objects?
Execute views in a textarea and display the view result on a panel or textarea
http://www.couchbase.com/docs/couchbase-manual-2.1.0/couchbase-admin-restapi-views.html