This section only discusses details of the usage of the Beanynizer plugin. For general information about creating ontologies in Protégé please consult the Protégé documentation. To create an ontology for use with Jadex, follow these four steps:
Create a new ontology e.g. with the OWL, so you have to choose a standard or RDF ontology format. Save the new ontology to a directory of your choice.
→ menu item. Note that Beanynizer currently does not supportInclude one of the Beanynizer default ontologies.
The beanynizer supports the creation of ontologies for use with the JADE platform (beanynizer_default.pprj
),
or pure Java ontologies for use with the Jadex Java-XML encoding (beanynizer_beans_default.pprj
or beanynizer_beans_fipa_default.pprj
if you want to refer to FIPA related concepts).
E.g., Use the → menu and select the
beanynizer_beans_fipa_default.pprj
file in the appearing file
chooser. Protégé will store the location of the
default ontology using an absolute path. As this is undesirable most of the
time, you should copy the Beanynizer default files
(.pprj
, .pins
,
.pont
) to the directory of your ontology, and include
the ontology from there. In this case Protégé
will use a relative path name.
Add classes and slots to your ontology. The JADE default ontology provides four
base classes (Concept
,
AgentAction
, agent-identifier
,
Predicate
) that you should use as superclasses
for your own concepts. If you don't know the meaning of thesebase classes
consult the JADE ontology guide. For a pure Java
ontology, classes can be directly created as subclasses of Protégé's :THING class.
In any case, you may also find it helpful to take a look at the ontologies used in the
Jadex examples.
Generate Java sources from the ontology using the Beanynizer tab. If you created your ontology from scratch, you will have to activate the tab first. Select the Figure 10.1, “Protégé plugin configuration”). Activate the Beanynizer tab and close the dialog by hitting . In the "Beanynizer Tab" you can now edit the code generation options such as packagename and output directory (see Figure 10.2, “Jadex Beanynizer tab”). Depending on the base ontology you used, you also have to select the correct "Generation Mode" ("Java" for a pure beans ontology, "Jade" for a JADE ontology). Pressing the button will create the desired source files. See the Jadex user guide, for an introduction how to use the generated ontology in your Jadex agents. The next sections discuss how you can influence the code generation process.
→ menu and open the "Tab Widgets" tab (see