Search Mailing List Archives
[protege-discussion] DataMaster - mapping columns to class members
dwande at gmail.com
Wed Mar 26 18:30:04 PDT 2008
I am trying to query my ontology using the protege 3.3.1 java API in
Netbeans 5.5.1. The imported libraries list below are being reported
as not found even though I have included all the jar files in the
Protege folder in my classpath, including the Plugins folder.
The one being recognized by my netbeans is:
*import edu.stanford.smi.protege.model.*; *which is* * the frame-based one.
What more do I need to do, this is the only error in my code for now.
thanks for quick response.
On 3/21/08, Csongor Nyulas <csongor.nyulas at stanford.edu> wrote:
> Dear Paul,
> There is no direct way to create instances of your arbitrary classes in
> the ontology from your DB tables,
> because there is no way to specify the mappings between the data source
> elements and ontology elements. Although
> we may build something that facilitate the ontology database mapping,
> this will eventually happen in the
> distant future when we will need this functionality in our project.
> Until then, there are a few tricky ways to achieve what you need.
> Depending on at which end of the import
> (DB or ontology) you have liberty of making (temporary) changes, you can
> a) the solution proposed by Jonathan
> b) in case you can't change your DB but can make changes in your ontology:
> - import the structure of the database in a temporary ontology, in
> order to check the names of the classes
> and properties. Pay attention also to the generated namespaces
> - rename the classes and properties in your ontology to exactly
> match (including the namespaces) the structure
> in the temporary ontology
> - import the instances in your ontology using DataMaster
> - rename the classes/properties in your ontology to their original
> This solution is good if you do not have too many tables, and you do not
> have to repeatedly import from the database
> c) in case neither a) or b) is convenient import the instances in your
> ontology with DataMaster and use the
> ProtegeScriptTab, or SQWRL rules to create corresponding instances in
> your original ontology structure.
> I hope this was helpful,
> Paul Smith wrote:
> > Thanks,
> > perhaps I am not yet fully acquainted with DataMaster Plugin. The
> problem is
> > that when I import instances from a MySQL table into a Protégé class X ,
> > creates a new subclass Y, named after the table, and fill it with the
> > instances. How to import instances directly in class X then?? but what
> > worse, class Y has an entire new set of attributes, named after the
> > columns, whereas I wanted the attributes of X be filled. In other words
> I need
> > to map the table columns to the attributes of class X. How to do this??
> > relief my struggle…
> > ..Paul
> > _______________________________________________
> > protege-discussion mailing list
> > protege-discussion at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> > Instructions for unsubscribing:
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> Instructions for unsubscribing:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the protege-discussion