The Protégé™ classes panel is extended with extra options concerning the code generation. These extra options are shown below the template slots list (see Figure 7.3, “Protégé™ classes panel”, bottom right). As default, the Protégé™ name of the class is used for the .java file. This can be overridden by specifying an additional Java class name. The interface flag can be set, when not a class but an interface should be generated. In general, this only makes sense for abstract ontology classes.
The package field allows to specify the package of the Java class, overriding the
default package specified in the code generation tab. The Generation
Options offer the same options as the Files to Genrate,
and influence how many files are generated for each ontology class. E.g., setting the
option to Fixed allows to include an already existing class in the
ontology. In addition, the field can be left blank to indicate that the ontology default
should be used. The superclass field and the additional interfaces list, allow to
specify fully qualified class or interface names to use as superclass or additionally
implemented interfaces. If no superclass is given, the code generator creates a class
hierarchy corresponding to the hierarchy in the ontology. For interfaces, only
implements
is added to the
class, the generator does not (yet) magically fill in any missing method
implementations.interface
, . . .