Dear Christian,
Hi Greg,
thanks for your mail. You might want to have a look at the following
page in our Wiki, where some basic examples are listed how our API can
be accessed (..we invite everyone to actively extend our Wiki pages):
http://docs.basex.org/wiki/Code_Examples
Here is one more example how you can directly request the number of
documents in the currently opened database:
public final class Test {
public static void main(final String[] args) throws Exception {
// single, global database context,
// which should be used for all database operations
Context ctx = new Context();
// open new database
new Open("database").execute(ctx);
// request and count document nodes
System.out.println(ctx.doc().length);
// finally close context
ctx.close();
}
}
We don't have resources to develop a more thorough documentation of
our API for free. Instead, a comprehensive documentation will be a
future feature of our commercial portfolio. You also might want to
have a closer look into the project's JavaDoc.
Hope this helps,
Christian
___________________________
On Fri, Apr 15, 2011 at 10:10 PM, Meredith Gregory
<lgreg.meredith@gmail.com> wrote:
> Dear Christian,
> Thanks! i was coming to that conclusion from reading through the examples on
> github, but it is a bit of detective work. It has been hard for me from the
> posted code samples and wiki to find a clear indication of which APIs are
> supported and the use of which is encouraged and which APIs are not so much
> in this category. Admittedly, i've been focused on reading through the
> material that looks like it might be applicable to my problem and not on
> thoroughly reading your documentation. Is there a page in the wiki or a
> readme in the examples codebase that describes the status of the various
> APIs?
> In this particular case, is there a code sample you can point me to that
> would flesh out your proposal a bit more. In particular, though i'm issuing
> the count calculation at the XQuery level i need to take action on the basis
> of the result at the Java/Scala level.
> Best wishes,
> --greg