baseX-core vs baseX-api

Monday, 10 June 2013 · 2 messages
DD
David Dobbs10 Jun 2013 00:26 #
So, I have a couple of (hopefully simple) questions about the Java APIs provided by BaseX. Based on the comments in the examples, it looks like the function calls in the RunQueries.java example (https://github.com/BaseXdb/basex-examples/blob/master/src/main/java/org/basex/examples/local/RunQueries.java) are strictly local calls that operate directly on local XML documents - there's no BaseX server involved, no client communication, no files created in org.basex.path, etc. Is that correct? What's the difference between the queries in RunQueries.java and QueryCollection.java? My guess from skimming the documentation is that, per above, RunQueries just uses BaseX's XQuery API, without taking advantage of BaseX's indexing, etc capabilities, whereas QueryCollection creates a (local) BaseX server, indexes the document, and then its queries would be accelerated using those indexes. Is this also correct? Thanks, -David
CG
Christian Grün10 Jun 2013 10:00 #
Hi David,
Quoted text · David Dobbs · 6 lines
> Based on the comments in the examples, it looks like the function calls in > the RunQueries.java example > (https://github.com/BaseXdb/basex-examples/blob/master/src/main/java/org/basex/examples/local/RunQueries.java) > are strictly local calls that operate directly on local XML documents - > there's no BaseX server involved, no client communication, no files created > in org.basex.path, etc. Is that correct?
that’s completely correct. I have added some explanatory lines in our Wiki [1] to make this more clear.
Quoted text · David Dobbs · 7 lines
> What's the difference between the queries in RunQueries.java and > QueryCollection.java? > My guess from skimming the documentation is that, per > above, RunQueries just uses BaseX's XQuery API, without taking advantage of > BaseX's indexing, etc capabilities, whereas QueryCollection creates a > (local) BaseX server, indexes the document, and then its queries would be > accelerated using those indexes. Is this also correct?
This is also correct. The examples are basically meant to show that there are lots of different ways to work with BaseX. You can use it as command-line tool, as embedded XQuer processor, as database server, for web applications, etc. Hope this helps, Christian [1] http://docs.basex.org/wiki/Java_Examples
Quoted text · David Dobbs · 10 lines
> > Thanks, > > -David > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery