Re: [Fwd: Couple questions about possibilities of MDR JDBC persistance]

Martin Matula <[email protected]> Wed, 24 Sep 2003 08:35:48 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi Dragan,
please see my comments below:

Dragan Djuric wrote:
>   I am a post-graduate student(working towards Masters degree in 
> Information Systems). A part of my thesis includes
> creation of MOF-based Ontology Language metamodel and using MDR for its 
> manipulation, storage, etc. I already created
> a simple framework that enables easy usage of MDR repository for any 
> metamodel (as a set of abstract classes that only need
> a simple metamodel-specific class that implements a few trivial methods, 
> such as getMetamodelName() etc.). When i finish
> the documentation for it (some guide, JUnit tests etc.) and test it, I 
> can publish it over netbeans mdr site
> (if you are interested), since I find that it can be useful at least as 
> a sample.

Sure, that would be great!

>   Beside that, I should investigate the possibilities for database 
> storage for MDR (via JDBC) for one of examinations.
> It includes some "project" and some degree of implementation, depending 
> on available time (I doubt that I can do it alone
> in the time that I have, but I don't need to do "full" JDBC persistance, 
> just to specify it and implement some parts).
> Since the JDBC persistance implementation is only mentioned at this site 
> I don't have much to start with. I know how to
> USE MDR (MDR API) but I don't have any dovumentation other than source 
> code. I understand that I must go through the source
> to understand how MDR persistance works, but I would be grateful if you 
> can provide me some "explanatory" documentation, ie.
> description of the most important classes, some guide, something that I 
> can start with. I believe that such things exist,
> it is impossible that people at Sun holds the projects only in their 
> heads :). If such documentation is not allowed to be published, I will 
> understand that, I would only ask you to provide me some info to start 
> with this(source is like a forest and i must find a tree to start with).

To implement your own storage, you need to implement the persistence SPI 
that you can find org.netbeans.mdr.persistence package. For inspiration, 
you can look at the existing implementation of that SPI (in memoryimpl 
and btreeimpl subpackages) - I guess that the more readable one will be 
the memory impl. I also think that the javadocs to this SPI are quite 
descriptive.
Regards,
Martin