|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NavigationManager
Method Summary | |
---|---|
void |
generateNavigationTree(org.xml.sax.ContentHandler contentHandler,
NavigationParams navigationParams,
org.outerj.daisy.repository.VariantKey activeDocument,
boolean handleErrors)
Generates a navigation tree as XML. |
void |
generatePreviewNavigationTree(org.xml.sax.ContentHandler contentHandler,
java.lang.String navigationTreeXml,
long branchId,
long languageId)
Generates a navigation tree based on the XML given in the navigationTreeXml parameter. |
NavigationLookupResult |
lookup(java.lang.String navigationPath,
long requestedBranchId,
long requestedLanguageId,
LookupAlternative[] lookupAlternatives)
Resolves a path (of the form id/id/...) against a (series of) navigation tree(s), giving a certain result. |
java.lang.String |
reverseLookup(org.outerj.daisy.repository.VariantKey document,
org.outerj.daisy.repository.VariantKey navigationDoc)
Same as the other reverseLookup method, but defaults to the live version mode. |
java.lang.String |
reverseLookup(org.outerj.daisy.repository.VariantKey document,
org.outerj.daisy.repository.VariantKey navigationDoc,
NavigationVersionMode versionMode)
Searches a possible path in the navigation tree for the given document, or null if none exists. |
Method Detail |
---|
void generateNavigationTree(org.xml.sax.ContentHandler contentHandler, NavigationParams navigationParams, org.outerj.daisy.repository.VariantKey activeDocument, boolean handleErrors) throws org.outerj.daisy.repository.RepositoryException, org.xml.sax.SAXException
If the document specified in the NavigationParams as 'activeDocument' cannot be found, a 'closed' tree will be produced (i.e. a tree generated to node depth level 1) if contextualized is true. If contextualized is false, a full tree will be genereated.
The same holds if the the 'activeDocument', or one of the nodes on the path leading to that document, is not readable by the current user and role.
contentHandler
- resulting XML will be pushed on this ContentHandleractiveDocument
- the document that should be marked as 'selected' (null for none)handleErrors
- if true, the navigation tree generation output will first be buffered so that
in case an error occurs, some information about this error can be streamed
instead of the normal navigation tree outpus
NavigationException
- in case some error occurs
org.xml.sax.SAXException
- never thrown by us, but unavoidable when pushing things to a ContentHandler.
org.outerj.daisy.repository.RepositoryException
void generatePreviewNavigationTree(org.xml.sax.ContentHandler contentHandler, java.lang.String navigationTreeXml, long branchId, long languageId) throws org.outerj.daisy.repository.RepositoryException, org.xml.sax.SAXException
The branch and language parameters should be the branch and language that are or will be used on the site where this navigation tree is published (and thus the branch and language under which the navigation tree would normally be stored in the repository). They are used as default branch and language there where one is needed (eg. document and import nodes).
org.outerj.daisy.repository.RepositoryException
org.xml.sax.SAXException
NavigationLookupResult lookup(java.lang.String navigationPath, long requestedBranchId, long requestedLanguageId, LookupAlternative[] lookupAlternatives) throws org.outerj.daisy.repository.RepositoryException
NavigationLookupResult
.
This method is best understood with the structure of the Daisy Wiki, where each 'site' is associated with a collection and a navigation tree, and the branch and language of the navigation tree document correspond to the 'default' branch and language for that site.
The algortihm followed is described below.
Is the navigationPath found in the navigation tree of the first lookup alternative?
requestedBranchId
- if the branch of the document differs the one in the navtree node, this argument
specifies the branch ID, otherwise supply -1.requestedLanguageId
- dito as for requestedBranchIdlookupAlternatives
- should at least contain one entry
org.outerj.daisy.repository.RepositoryException
java.lang.String reverseLookup(org.outerj.daisy.repository.VariantKey document, org.outerj.daisy.repository.VariantKey navigationDoc, NavigationVersionMode versionMode) throws org.outerj.daisy.repository.RepositoryException
org.outerj.daisy.repository.RepositoryException
java.lang.String reverseLookup(org.outerj.daisy.repository.VariantKey document, org.outerj.daisy.repository.VariantKey navigationDoc) throws org.outerj.daisy.repository.RepositoryException
org.outerj.daisy.repository.RepositoryException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |