You are not logged in Log in Join
You are here: Home » Members » ontoprise » Ontobroker Query Client - NEW » Installation Instructions

Log in
Name

Password

 
 

Installation Instructions

Use within Zope

  1. Install the Ontobroker Sytsem:
    • You can obtain the Ontobroker System from www.ontoprise.de by purchasing it or
    • you can download the FREE SiLRI System (of which a more developed version is part of the Ontobroker System)
      more about SiLRI ... 
  2. Save the "ontobroker_client.py" file to your External Methods folder of your Zope installation.
  3. Add an "External Method" to in your desired Zope folder with e.g. these parameters:
    Id: queryResultsAsList
    Title: [your choice]
    Module Name: ontobroker_client
    Function Name: makeList

The queryResultsAsList-Method takes three Arguments:

  1. the F-Logic statement (more information on F-Logic can be found here),
  2. the host on which the Ontobroker System serves, and
  3. the port on which the Ontobroker System serves (1234 by default).

Example use in dtml:

<dtml-in "queryResultsAsList('FORALL X,Y <- X::Y.','localhost',1234)">
  <dtml-var sequence-item>
</dtml-in>


Use within Python

A simple way of testing the "ontobroker_client.py" script is putting these three lines in a seperate script:

   import ontobroker_client 
   list = ontobroker_client.query('FORALL X,Y <-X::Y.', 'localhost', 1234)
   for item in list: print item

You may have to correct the host and/or the port. You can add further functions, specialised for your purpose of use. You can download the test script here: Test.py

 

back