Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Storing ontologies.

Marisa Santos Amaro marisa.osantos at gmail.com
Wed Sep 13 13:08:48 PDT 2006


Jeffrey and Wiley:
After checking the jar files you recommended me, I removed them and
added again.
I haven´t any Jena folders, because I don´t install Jena yet.
Now,  I´m  getting the following error messages:

On running:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
OWLNamedClass cannot be resolved to a type at OWLDemo.main(OWLDemo.java:14)

Eclipse Console:
*OWLNamedClass cannot be resolved to a type.*
*The declared package "com.demo.application" does not match the expected
package.*


How could I set the compiler output path in order to put my classes in
 Proteg "plugin/classes" folder,
as says the Protege OWL-API Programmer´s Guide ?

On 9/12/06, James Wiley <james.wiley at adelphia.net> wrote:
>
> You should make sure to also add protege.jar, looks.jar,
> unicode_panel.jar and lax.jar which is in the Protege_3.2_beta
> directory. Setting it as your home directory won't automatically put
> them in your build path.
>
> Marisa Santos Amaro wrote:
> > Ok, Jeffrey.
> > Before using MySQL and Jena, I´m trying to run some basic examples in
> > the Protege-OWL API programmer´s guide, but I don´t know how to
> > configure the Eclipse classpath (I´ve installed Protege 3.2, Eclipse
> > 3.2 and Java2SDK 1.5.08).
> > At the "installation & getting started" section, the guide says "add
> > all jars files from the installation to your project classpath".
> > As my project home, I selected the "Protege_3.2_beta" directory and I
> > created a "Demo" folder where I put the Java class from the
> > "HelloWorld" example code. For "add jars", I selected
> > *project>> properties>>Java buid path>>Libraries>>add external JARs*
> > and
> > selected the jar files from "edu.stanford.smi.protegex.owl" and
> > "edu.stanford.smi.protegex.standard_extensions" folders to add.
> > It didn´t work; I got 2 running error messages
> > >> "the project was not buit since its buid path is incomplete..."and
> > >> "the type edu.stanford.smi.protege.model.DefaultKnowledgeBase
> > cannot be resolved. It´s indirectly referenced ...."
> > What is wrong with this setup ?
> > Thank you.
> > On 9/8/06, *Schmitz, Jeffrey A* <Jeffrey.A.Schmitz at boeing.com
> > <mailto:Jeffrey.A.Schmitz at boeing.com>> wrote:
> >
> >     First you will need to get everything installed on your machine.
> >     For that, here are some notes I took down from my experience. Once
> >     things are setup as below, you'll need to start coding using the
> >     JENA api. I can send you some samples of that if you want, but
> >     first things first. Note that I'm using the JENA JDBC Database
> >     option, not the Protege Database option. To get the Protege model
> >     into the JENA Database you will read in the Protege OWL file and
> >     then add that to the JENA Database Model.
> >
> >     Also, in this case it is not one table=one class but one
> >     ontology=one class. All the classes in an Ontology will be loaded
> >     into a single table (see below). If you have two Ontologies, each
> >     will get it's own table. A frequent usage is to put your Ontology
> >     class defintion in one Ontology/table, and your Instance Ontology
> >     in another.
> >
> >     Jeff
> >
> >     Get and install Mysql from:
> >
> >     http://www.mysql.com
> >
> >     You will then need to create a database and a MySQL user account
> >     in MySQL.
> >
> >     For example, start the MySQL Command Line Client application (or
> >     log into MySQL as the root user from the terminal).
> >     Enter the following commands to create the Pizza database and
> >     Pizza user:
> >
> >     mysql> CREATE DATABASE Pizzas;
> >     mysql> CREATE USER PizzaMan at localhost;
> >     mysql> SET PASSWORD FOR PizzaMan at localhost = password('pizzaPW');
> >     mysql> GRANT ALL PRIVILEGES ON *.* TO PizzaMan at localhost WITH
> >     GRANT OPTION;
> >
> >     Get and install the MySQL JDBC driver from:
> >
> >     http://dev.mysql.com/downloads/connector/j/5.0.html
> >     <http://dev.mysql.com/downloads/connector/j/5.0.html>
> >
> >     For Eclipse installation:
> >
> >     1. Add the JDBC Driver's jar into the build's build path, perhaps
> >     as an external jar from the Tomcat directory above, or copy it to
> >     your workspace project in Eclips and add it:
> >
> >
> >     For Protégé installation:
> >
> >     1. Rename the drive jar file to driver.jar and copy to the protégé
> >     installation folder.
> >
> >     Get and install JENA from:
> >
> >     http://jena.sourceforge.net <http://jena.sourceforge.net>
> >
> >     Other good sources of JENA/SPARQL Docs include:
> >     http://jena.sourceforge.net/ARQ/documentation.html
> >     http://www-128.ibm.com/developerworks/xml/library/j-jena/
> >     http://www-128.ibm.com/developerworks/library/j-sparql/
> >
> >     For Eclipse Installation:
> >
> >     If you're going to develop in eclipse, make sure and add the jars
> >     to your eclipse build path.
> >
> >     Run from Eclipse:
> >
> >     Now you can develop and run your Eclipse/Jena/MySQL application
> >     from Eclipse. To check database tables manually, log on to the
> >     mysql server. For example, to login as PizzaMan:
> >
> >     Shell> mysql –u PizzaMan at localhost –ppizzaPW
> >
> >     Then select the database being used in your application. For
> >     example to use the Pizzas database:
> >
> >     Mysql> use Pizzas;
> >
> >     Then query the database tables for the information. For example:
> >
> >     Mysql> show tables;
> >
> >     You should see (for example) the Jena tables created in your
> database:
> >
> >     jena_g1t0_reif
> >     jena_g1t1_stmt
> >     jena_g2t0_reif
> >     jena_g2t1_stmt
> >     jena_graph
> >     jena_long_lit
> >     jena_long_uri
> >     jena_prefix
> >     jena_sys_stmt
> >
> >     To look at specific OWL statements, query one of the …stmt tables;
> >
> >     Mysql> select * from jena_g1t1_stmt;
> >
> >
> >     -----Original Message-----
> >     From: Marisa Santos Amaro [mailto: marisa.osantos at gmail.com
> >     <mailto:marisa.osantos at gmail.com>]
> >     Sent: Sun 9/3/2006 9:07 AM
> >     To: protege-owl at lists.Stanford.EDU
> >     <mailto:protege-owl at lists.Stanford.EDU>
> >     Subject: [protege-owl] Storing ontologies.
> >
> >     Hi people.
> >     Does anyone know a "step-by-step" guide that I could use to learn
> >     how to
> >     store an OWL ontology in a MySQL database ?
> >     As a beginner, I have some basic doubts :
> >     a) After building the ontology, I would like to query it using an
> >     application to read the classes definitions, properties and
> instances,
> >     because using the Protege resources I coudn´t get all mixed searches
> I
> >     need. What kind of environment is more suitable for this goal : does
> >     people usually access the ontology as a owl file (with yours
> instances
> >     saved embedded in the code) or does it work with a backend
> >     database? The
> >     instances usually
> >     b) By reading the Protege2000 "saving a database project" section I
> >     understood that an OWL ontology can be stored as a single table.
> >     One table
> >     represents only one class, right ? So, how to save all the
> >     ontology classes
> >     ? Do I need to repeat a save-project operation for each class of
> >     my model
> >     ? And how about the instances, where/how are they saved ?
> >
> >     Where could I get good examples about these topics ?
> >
> >     Thanks a lot for any help.
> >     Marisa.
> >
> >
> >     _______________________________________________
> >     protege-owl mailing list
> >     protege-owl at lists.stanford.edu <mailto:
> protege-owl at lists.stanford.edu>
> >     https://mailman.stanford.edu/mailman/listinfo/protege-owl
> >     <https://mailman.stanford.edu/mailman/listinfo/protege-owl>
> >
> >
> >
> >
> >
> > --
> > Marisa de Oliveira Santos Amaro
> > Capitão-de-Fragata ( T )
> > Superintendente de Infra-estrutura e
> > Serviços de Tecnologia da Informação
> > Diretoria de Finanças da Marinha - DFM
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > protege-owl mailing list
> > protege-owl at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/protege-owl
> >
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>



-- 
      Marisa de Oliveira Santos Amaro
             Capitão-de-Fragata ( T )
     Superintendente de Infra-estrutura e
   Serviços de Tecnologia da Informação
Diretoria de Finanças da Marinha - DFM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20060913/354cbbba/attachment.html>


More information about the protege-owl mailing list