abstractpublic class GenericDriver implements XKBDriver(Code)
A generic driver that uses XMLAdapter to map objects to XML.
The driver can be more or less fault tolerant. The level of fault tolerance
can be set using the respective constants. Furthermore, we can set
a print writer that the adapter can use to report events or problems that do not lead
to exceptions. The fault tolerance concepts applies in particular on the level of
knowledge bases. Here the following guidelines should be used:
If the fault tolerance level is medium, each problem should interrupt the export
or import and the error should be "bubbled up"
If the level is medium, the export or import can continue even id it fails for some clauses.
But the log writer should be used to post a descriptive message, and (for export) a comment
should be inserted into the document where the clause set is supposed to be.
If the level is high, problems with export or import of single clauses are just ignored.
The default fault tolerance level is medium.
author: Jens Dietrich version: 3.4 <7 March 05> since: 1.6
Export a knowledge base, i.e., convert it into an xml document.
an xml document Parameters: kb - a knowledge base exception: an - XKBException is thrown if export fails
Get an adapter by type, the type is a name as defined in static variables here.
Parameters: typeName - a text indicating the kind of object the adapter can export/import
Import a knowledge base, i.e., build it from an xml document.
a knowledge base Parameters: doc - an xml document exception: an - XKBException is thrown if import fails