Xindice Browser
1. About Xindice (dbXml)
Xindice, the former dbXML is a native XML database System. It is part of the xml.apache.org projects. This tool does not contain the Xindice server, only the necessary libraries to connect to a running server instance and browse the content. So to get Xindice, please visit the xml.apache.org project pages.
Version 0.75 is a complete redesign of Version 0.65 and 0.70. So please check it out!
2. About Xindice Browser (dbXml Browser)
- This is a tool to browse a local Xindice (former dbXml) databases. It shows
- Collections
- Documents in Collections
- Documents in Source, Tree View and html view
- The views are completly "pluggable": you can easily add new views without needing to recompile Xindice Browser
- Moreover you can query the database using XPath
- Support for the commandline applications "xindice" and "xindiceadmin" is available
- In the latest release also saving of single and multiple documents is possible ...
- ... as well as Collection Management
- ... and Document Management
- All the advanced features are configurable in many ways. So it is e.g. possible to start Xindice browser without any "write or administration" functionality.
- XindiceBrowser is "open-source", so you can modify the sources to adapt it for your needs. In case of significant changes, please notify me.
- Currently Xindice Browser was tested on Linux, Windows and Mac. It should run on any Java 2 virtual machine.
This is the first version of Xindice Browser. I think, I will add additional funtionality soon, so stay tuned...
|
Use Xindice Browser as is. I can give no guarantee that fwd will work properly or do what you expect. Use it at your own risk. Take a look into the sources if you are unsure about the functionality in detail.
|
3. Screenshot
Document Selection
 |
| Select Collection from Treeview and Select one or multiple documents |
Views
 |
 |
Show Documents in different Views; Moreover it is very easy to write and add new views |
XPath Support
 |
| XPath Queries are supported. Viewing the results as well as saving them to file. |
Collection and Document Management
Commandline Support
 |
| For the real programmers ;-) also a support for the commandline functions (xindice and xindicaadmin is available) |
Complete Screen
Click to see full resolution.
4. Install Xindice Browser
Requirements
Binary Distribution
A Java Development Kit or Java Runtime Environement Version 1.2 or newer is required.
Remark: This version works with the recent Apache Xindice distribution. It should work also with the older dbXml distribution, but in that case you will have to add the dbxml.jar into the classpath and modify the class and the url in the config.xml.
Source Code Distribution
To compile Xindice Browser also the following libraries are necessary:
Xindice is developed with Borland JBuilder, so you can find the jbx file in the root directory, if you want to use JBuilder for development. Any other tool is possible too.
Install
(1) Download either the "binaries-only" release, or the complete release containing binaries, documentation (javadoc) and sources:
(2) Unpack the zip file into an arbitrary directory.
If you downloaded the sources, you need to install the libraries mentioned in the Requirements too (and put them into the classpath, or modify the ant build-file).
(3) Eventually open the config.xml document with a text editor and adapt configuration for you: especially the filenames for "xindice.bat" and "xindiceadmin.bat"!
(4) Start the Application
5. Configuration
In the main directory you find a config.xml file. The meaning of the parameters is:
| Parameter | Meaning |
| logger | Contains configuration for log4j logging information. |
| | priority | Logging priority. By default it is set to error, this means, that only errors are logged and displayed in the console. For development purpose you can set it to any other log4j priority. Please consult the log4j documentation for details. |
| layout | This is the setting for the log4j output layout. Please consult the log4j documentation for details. |
| application | Application related parameters |
| | look-and-feel | Enter the desired Swing look-and-feel class. By default this is: javax.swing.plaf.metal.MetalLookAndFeel which is the "Metal" look-and-feel. |
| | views | Define the Views in this section |
| | | view | Define one view Section for each view. You need to set the following attributes: "name" for the Name of the view, "title" for the display title of the view and "class" the java classname of the view. |
| | | | param | Optionally parameters can be defined for each view (if the view supports parameters!): Set the attributes "name" for the name of the parameter and "value" for the value of the parameter. For an example see the config.xml in the treeview view. |
| | admintools | Similar to the commandlinetools option, it is also possible to activate or deactivate all administration function. (active="true|false") |
| | commandlinetools | Parameters for the commandlinetool support. Set active to false, if you do not want to use the commandline tools in the browser. |
| | | xindice | Parameters for xindice.bat |
| | | | batchfile | Set path and filename of xindice.bat batchfile. |
| | | | actions | Set actions you want to use with xindice as action element in this element. |
| | | xindiceadmin | Set the active attribute to false, if you want to disable the administration function. |
| | | | batchfile | Set path and filename of xindiceadmin.bat batchfile. |
| | | | actions | Set actions you want to use with xindiceadmin as action element in this element. |
| xsetup | |
| | driver | Driver class to connect to Xindice database. |
| | connectionstring | URI / connectionstring of Xindice. Usually: xmldb:xindice:// |
| | rootcollection | Name of the Xindice Root collection. Usually /db |
Take a look into the config.xml file for the standard settings. The meaning should be pretty clear then.
6. Start XindiceBrowser
Requirements
Before starting Xindice Browser, make sure, that the Xindice (dbXml) database server is running. Otherwise Xindice will start, but with exceptions that it cannot connect to the server.
Windows
Start the xindicebrowser.bat file.
Linux
Start the xindicebrowser.sh file.
7. Add new Views
Write a new View
- Write a new java class for the view. This class must extend JScrollPane or some other Pane (this might then contain some text area or some other Swing component) and must implement the info.schatten.xindicebrowser.interfaces.IXiView interface.
- This interface defines 2 methods
-
setXDocument (IXDocument): this method is called by the application when a new document is selected, and the view should be updated
-
clear(): this method is called when the view should be cleared.
-
Compile this class and add it to the Xindice classpath
- Add a new entry to the config.xml file to declare this view. This is easy. Look at the description above and into the config.xml.
Optional: Parameters: The view can be configured using parameters. Use the parameter tag in the view declaration in the config.xml file. If a parameter is declared, a JavaBeans conform set method must exist in the view class, otherwise, you will receive an exception.
Example: If you declare the parameter: <param name="color" value="red" /> then the method setColor (String s) must be available in the view class. For an example see the tree view in the Xindice distribution.
Add a new View
- Add the class that implements the view to the Xindice classpath
- Add a new entry to the config.xml file to declare this view. This is easy. Look at the description above and into the config.xml.
Test Views
In the config.xml file there are 5 views declared, but the number in the views element is set to 3 so the last two are not loaded. If you set the number to 4 or 5, also the last 2 views are loaded: These two are only test-views illustrating how to use parameters and how to use events like button actions inside a view.
8. Contact
If you should have requests or comments considering Xindice Browser, please send me an Email. If you should add some significant functionality into the tool, please let me know, so that I can add these functions.
If you should detect bugs, contact me too!
|