Information Management IBM InfoSphere Master Data Management, Version 11.3

Creating catalogs

You can create the catalog for storing information about items. For example, you can create a catalog of books for storing information about the books.

Before you begin

Ensure that you get the information about the type of catalog that you can create from the solution architect.

Procedure

Create a catalog by using any of the following methods: user interface, Java™ API, or script API. You need to specify the catalog name and the spec name when you create the catalog.
Option Description
User interface
  1. Click Product Manager > Catalogs > New Catalog.
  2. Click the new catalog icon.
  3. Provide the required details for creating the catalog.
  4. Click Save.
Java API The following sample Java API code creates a catalog.
Context ctx = PIMContextFactory.getContext(USERNAME, PASSWORD, COMPANY_NAME);

HierarchyManager hierarchyManager = ctx.getHierarchyManager();

Hierarchy hierarchy = hierarchyManager.getHierarchy("BasicAPICategoryTree");
        
SpecManager specManager = ctx.getSpecManager();

PrimarySpec spec = (PrimarySpec)specManager.getSpec("BasicAPISpec");
        
Catalog catalog = m_catalogMgr.createCatalog(spec, "TestCatalog", hierarchy);

catalog.save();
Script API The following sample script API creates a catalog.
var CTG_NAME = "My Catalog";
var CTG_SPEC_NAME = "My Primary Spec";
var HIER_NAME = "My Hier";
var DISPLAY_NODE_NAME = "str2";

var ctgSpec = getSpecByName(CTG_SPEC_NAME);
var hier = getCategoryTreeByName(HIER_NAME);
var dispAttrNode = ctgSpec.getNodeByPath(CTG_SPEC_NAME + "/" + DISPLAY_NODE_NAME);
var hmOptArgs=[];
hmOptArgs["displayAttribute"] = dispAttrNode;

var ctg = new Catalog(ctgSpec,CTG_NAME,hier,hmOptArgs);
ctg.saveCatalog();
out.println("Created the ctg: " + ctg.getCtgName());
The catalog is created. Users can view it in the Catalog Console.


Last updated: 8 Mar 2016