NS MDF                    
Novosoft MetaData Framework developer's guide

NSMDF contents

NSMDF consists from following components:


This jar contans base classes for repository. To build it run ant with nsmdf_jar goal. Sources are in the nsmdf/src directory. This jar also contains an implementation of mof 1.4 metamodel using nsmdf classes. This library is mostly generated. Sources are in the nsmdf/mof directory and consits form MOF 1.3 model in XML form property file for generator and utility class.


This jar contains generator for nsmdf. It used nsmdf.jar and nsmof.jar that are in nsmdf/lib/mof. NSMDF uses latest relatively stable release nsmdf.jar and nsmof.jar. Before release this libraries are relpaced to latest ones. To build it run ant with nsmdf_gen_jar goal.

How to use nsmdf for custom metamodels in your projects.

An example project could be nsuml1_4. Its sources consist from metamodel and utility class. To build nsuml1_4.jar you will need to generate source code, compile it and utility class, then to build jar. Running build in nsuml1_4 project will do just these operations. You could use that project as template for your metadata projects.

How to create MOF model

There are several options for producing MOF models for you metadata. One of them to wirte mof models manually. XML is pretty high level, so while it is a bit tedious, it is still possible.

Other variant is to use Unisys XMI Bridge for Rational Rose 2000e, which is available as free download from (you will need rational rose installed). Please note that Unisys bridge uses other namspace for MOF, so you will need to fix namespace in saved MOF for XMI 1.1 and change it to xmlns:Model="".

Property file for generator

Before generation you will need to create property file that govern generation. Below is annotated property file for MOF.

#this option specfiy if interfaces need to be generated

#this options specify tagId used to get prefix for package

# this option should be repeated for each package and
# specify mapping from IDL name of package to java
# name in the generated code

# this option specify prefix for generated interface names
# this option sepcify suffix for generated interface names

#this option specfiy if implementation need to be generated

#this options specify tagId used to get prefix for package

# this option should be repeated for each package and
# specify mapping from IDL name of package to java
# name in the generated code
# it is recomended to specify package different form
# interface packages

# this option specify prefix for generated impl names

# this option sepcify suffix for generated impl names

# package where repository will be generated
# name of repository implmentation class
# mapping of prefix to real namespace URI that will be used
# in XMI 1.1 Readers/Writers

Currently prefixes and suffixes are specified for for all generated classes. Later we plan more tuning options like prefix of suffixeds pecific to packages.

Working with XMI in NSMDF

Currently NSMDF support only XMI 1.1 in some limited form. Unit of saving to XMI and loading from XMI is the repository. Saving method correspond to saving by package extent. Simple program that load repository from xmi from stdin and saves it on stdout could be written as following:

  public static void main( String args[] )
      Class c = Class.forName( args[0] );
      MDFOutermostPackage r = ( MDFOutermostPackage ) c.newInstance();
      r.getXMIReader("1.1").read( r, );
      r.getXMIWriter("1.1").write( r, System.out );
    catch ( Exception ex )
Loading xmi to repository do not clean the repository before loading, all object that existed in the repository will continue to exists in it.

This document describe basics of working with repositories:

  Repository basics (4 K)


Business utilities Backup to CD Handy Password manager Backup Office Documents RTF TO HTML, PDF, XML Web Site load, stress and perfomance testing