Xindice Integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Xindice Integration

cjhowe
With Jonathon's help on dealing with conflicting versions of xml-rpc, I
have now completed an OFBiz component based on the non XPath/XUpdate
examples from the Xindice Developer Documentation page
http://xml.apache.org/xindice/guide-developer.html#Adding+an+XML+File+to+the+Database

It's available as a component that can be dropped directly into the
hot-deploy directory.  Itis available here:

[view]
http://ofbiz-sandbox.svn.sourceforge.net/viewvc/ofbiz-sandbox/ofbiz-sandbox/trunk/hot-deploy/xindice/
[svn]
https://ofbiz-sandbox.svn.sourceforge.net/svnroot/ofbiz-sandbox/ofbiz-sandbox/trunk/hot-deploy/xindice/

There are a number of possible places where a native XML database can
be beneficial in OFBiz.
1. Data Import/Export
2. Creating a UI for configuration files
3. log4j appender
4. Persist service/search results
5. Document Repository/ content management (Invoices, Agreements, other
Documents that shouldn't change once sent/signed)

I'd like to hear of other places that may benefit.  The services can be
executed through the webtools service scheduler the field names are
below. Xindice comes with an "ugly browser" interface to see and
navigate the xml database.  It can be found at
<a href="http://localhost:port/xindice/?/db">http://localhost:port/xindice/?/db

Various Field Names
[most services]
databaseName - the name of the database, if you haven't changed the
system settings this should be "db" which is taken as the default and
can be ignored
uri - a full uri ie
xmldb:xindice://server:port/rootCollection/collection  - can be ignored
as a default is prepared from the other field names
xmlDatabaseName - ignore, defaults to "xindice"
xmlServer - ignore, defaults to "localhost"
xmlPort - ignore, defaults to http port from url.properties
xmlRootCollection - ignore, defaults to "db"
xmlCollection - provide unless you want the root collection to be used

[createCollection]
collectionConfig - ignore, default config provided
collectionName  - provide, the name of the collection you want to
create

[addXmlFileToCollection]
location - provide, will accept anything that the FlexibleLocation
class can resolve (ftp, file, http, component, etc)
documentId - optional, sets the id of the document, defaults to some
long number seemingly based on timestamp, but not the timestamp

[getXmlDocFromCollectionById]
documentId - required, the Id from above (service is incomplete as it
needs to return the document)
[deleteXmlDocFromCollectionById]
documentId - required, the Id from above that you want to delete

Over the next few days I'll likely add a bit of commentary to docs.ofbiz.org.