next up previous contents
Next: Displaying Objects Up: An Example Session with Previous: Connecting the Usage Environment

Loading Objects from external Files

The objects manipulated by ConceptBase are persistently stored in a collection of external files, which reside in a directory called application or database. The actual directory name of the application is supplied as the -d parameter of the command CBserver.

The -u parameter of the CBserver specifies wether updates are made persistent or are just kept in system memory temporarily. Use -u persistent for a update persistence or -u nonpersistent for a non persistent update mode.

The application can be modified interactively using the editor commands TELL/UNTELL. If -u persistent is set, all activities like creating new objects or modifying existing objects are stored simultanously to the memory-resident KB and to the specified application files so that persistence of interactive updates is guaranteed. This is the usual way of extending an application. If the UpdateMode is set to nonpersistent all interactive updates are not stored in the file system, but kept in system memory until the server run is stopped.

Another way of extending applications is to load Telos objects (expressed in frame syntax) stored in Unix files with the extension *.sml. Call the menu item Load Model from the Model sub-menu of the Server-Menu to include these objects into the ConceptBase Knowledge base. In our example the application (directory) Employee was built interactively and can be found together with files containing the frames constituting the example in the directory

CB_HOME/examples/QUERIES

where you have to replace CB_HOME with the ConceptBase installation directory. The following files contain the objects of the Employee example expressed in frame syntax: Employee_Classes.sml, Employee_Instances.sml, Employee_Queries.sml. An alternative to interactively building an application is to start the server with an empty application (-d tex2html_wrap_inline2699 newfile tex2html_wrap_inline2701 ) and then add the objects in these files by using Load Model. Note, that the *.sml extension may be omitted. During the load operation of external models, ConceptBase checks for syntactical and semantical correctness and reports all errors to the Protocol field as is done when updating the KB interactively using the editor. This protocol field collects errors reported since the beginning of the session. \


next up previous contents
Next: Displaying Objects Up: An Example Session with Previous: Connecting the Usage Environment

ConceptBase Team