cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract the meta data inforamtion from universe from BO 4.1v using BO Java sdk

kamalessh
Explorer
0 Kudos


Hi all,

     We are trying to extract the meta data information of a universe using bo java sdk. First we tried with Restful webservice and later we came to know that we could not extract meta data information from uinverse using Restful webservices. Kindly suggest a way to achieve this using Java.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Is the universe .unx or .unv. What metadata information you are looking for?

Thanks,

Prithvi

kamalessh
Explorer
0 Kudos

Hi Prithvi,

          We are developing a tool for both unx and unv format.

Regards,

Kamalessh.

Former Member
0 Kudos

Hello Kamalessh,

What kind of metadata are you looking in the Universe?

There is still legacy COM SDKs available for the UNV universe.

There is a new Semantic Layer Java SDKs which is introduced from BI 4.0 FP3 onwards & is only capable of handling UNX universes.

I would recommend you to use the Semantic Layer Java SDKs, as you can also automate the process of UNV to UNX conversion & can design the tool in a single language platform.

I would suggest you to take a look at the Developer Guide, API Reference & Object Model Diagram of Semantic Layer SDKs.

This will give you an idea, that how SL SDKs works & what kind of information you can fetch from the Universe.

Hope this will give you a head start.

Thanks,

Shailendra

kamalessh
Explorer
0 Kudos

Hi  Shailendra,

                I have to list all the classes and objects of a universe.I have succeeded in listing the universe and its corresponding reports now. I have already gone through the developer guide before starting this. But I am not sure about the feasibility of achieving this task.

Thanks,

Kamalessh

Former Member
0 Kudos

Hi Kamalesh,

As Shailendra said you will have to use COM SDK's for .unv universes  and Semantic Layer SDK's for .unx universes,however it would be better to use Semantic Layer SDK's as you can convert .unv to .unx and develop your tool using Semantic Layer SDK's.

To get classes and objects of a .unx universe,you will have to create a recursive function to retrieve all sub folders. Once you get all folders in a list you can loop it to get children and then do an instance check and retrieve Dimension, Measures etc. accordingly. This is one of the way to do it

public  class FolderService {

List folderList = new ArrayList<Folder>();

public List<Folder> getChildren(List<BlItem> blItems) {

if(blItems!= null) {

     for (BlItem blItem : blItems) {

          if(blItem instanceof Folder){

               classList.add(f);

          List<BlItem> kids = f.getChildren();

          if(kids != null) getChildren(kids);

} else return null;

return folderList;

}

public class DemoTest {

public static void main(String args[]){

...

...

RootFolder rootFolder = businessLayer.getRootFolder();

FolderService folderService = new FolderService();

// The below list has all subfolders .

List<Folder> allFolders = folderService.getChildren(rootFolder.getChildren());

for(Folder f: allFolders){

List<BlItem> objectsList = f.getChildren();

for(BlItem item : objectsList) {

//Do instance check for all (Dimension, Folder , Measures etc.)

if(blItem instanceof Dimension){

Dimension d = (Dimension)item;

}

....

....

....

....

}}}}

Hope this helps.

Regards,

Rajarsh

kamalessh
Explorer
0 Kudos

Thank you

Answers (0)