Hi Ram,
The requirement which you have cannot be currently addressed using the java sdks.
For .unx universes, there is Semantic Layer Java SDKs, however for BI 4.0 version it is with limited functionality.
Please refer to the developer guide and api referrence avialble at below link to understand the functionalities it provide for the version.
http://help.sap.com/businessobject/product_guides/boexir4/en/slsdk_java_dg_40sp5_en.zip
http://help.sap.com/businessobject/product_guides/boexir4/en/slsdk_java_apiRef_40sp5_en.zip
New features were added in the release BI 4.1. In BI 4.1 you would have the possibility to achieve your needs using the semantic layer sdks.
Please refer to the developers guide for BI 4.1 available at below link to understand what all features it supports.
http://help.sap.com/saphelpiis_sbo41sl-sdk/frameset.htm
Thanks,
Prithvi