home | products | community | about aQtive | download | help
community > developers > developers pack > Java Qbits

Java Qbits

This is an interim document, please check the developers pages for updates and register as a developer to get regular aQtive developer news.

Some of the services you see in onCue are produced using XML Qbits. However, others rely on quite complex pattern matching, for example the table recogniser that works with dancing histograms and Microsoft Excel. These need to be written in Java. Also with Java Qbits you can add complex services such as screen-scraping to get information from web pages, database connectivity using JDBC or mini-applications (like SumIt! and Dancing Histograms).

We will be bringing out a full Java Qbit API soon, but, if you are pretty proficient in Java (including understanding classpaths and jar files), here are some pointers to get you started.

The documents onCue "how it works" and aQtiveSpace "how it works" will give you an overview of the model behind onCue and Qbits.

Look then at the following source code for a simplified version of SumIt!

the actual Qbit 'service' that sits behind the icon
the type of data it accepts, a list of numbers
the Qbit recogniser that looks at the user's copied text, checks whether it is a list of numbers and if so converts them into a MiniNumberList object.

The real SumIt! is not significantly more complex, it just has some special cases to get decimal precision of answers right (e.g. making sure 2+3 doesn't end up as 5.00000001).

Look at this code and also the file qbits.xml in the aQtive\space\lib folder to see how aQtive's own Java recognisers and services are included. To compile Java Qbits, you will need to include the aQtive classes.jar file in your classpath.

To insert your own java Qbits into onCue, you can modify the userqbits.xml to include references to your own Java Qbits and insert your own java classes into the myclasses.jar file (use WinZip).

We will be producing more extensive information on producing and including third-party Java Qbits, and the information supplied here is so you can begin to explore the possibilities of onCue.

Because of the interim nature of this document, please note:

  DO NOT distribute versions of onCue with customised Java Qbits and classes.
  You will need to re-install your Java Qbits after any update to onCue.
  Keep a backup copy of any onCue files you modify!

Happy programming .... let us know how you get on!





home | products | community | about aQtive | download | help