[daisy] Querying variant
Bruno Dumon
bruno at outerthought.org
Fri Aug 11 07:39:34 CDT 2006
On Fri, 2006-08-11 at 10:48 +0200, Aaron.Digulla at Globus.ch wrote:
>
> Hello,
>
> How do I get a list of branches and languages from the repository
> using the Java API in Daisy 1.5?
>
> Specifically: How do I find out the "main" branch and the ID for the
> language "de"?
If you need the ID of the main branch, simply use the constant
Branch.MAIN_BRANCH_ID (the ID of the main branch is always 1).
To get lists of available branches and languages, or the ID of a
specific branch or language, use the methods on the VariantManager,
obtained via repository.getVariantManager()
e.g.
long deBranchId = repository.getVariantManager().getLanguage("de", false).getId();
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
More information about the daisy
mailing list