7.3. Ontology Options

The general options for the ontology are available from the code generation panel (see Figure 7.2, “Jadex Beanynizer tab”). The ontology name is the name, that will appear in the ontology slot of an ACL messages. From Java this is available with the ontologyclass.ONTOLOGY_NAME constant. A package can be specified, where the ontology class file should be generated. This package is also the default for other generated classes. The class name is the Javaclass name to be used for the ontology (without package). The output directory is the root directory for the package hierarchy to be generated. You can use relative paths here, which will be expanded relative to the saving-location of the Protégé™ project. When subdirectories for some packages do not exist, they will be created on-the-fly.

Jadex Beanynizer tab

Figure 7.2. Jadex Beanynizer tab

The Files to Generate option specifies which kind of Java files should be generated for your ontology classes. Note that this option only represents a default, that can be overridden individually for each ontology class as described in the next section.

External

means that the ontology uses Java classes that already exist and do not have to be generated. In this case, only the single ontology class file will be generated.

Editable

(which is the default) creates two files for any ontologyclass: A classnameData.java file, which contains the required fields and getter/setter methods, and a classname.java file, which extends the data file, but is more or less empty. While the data file is overwritten each time you newly generate code from the ontology, the other file can be edited (e.g., to add custom methods), because changes will be preserved.

Fixed

option only creates one file for each ontology class. This file should not be edited, because changes are lost, when regenerating code.