org.outerj.daisy.navigation.impl
Interface Node

All Known Implementing Classes:
AbstractParentNode, AggregateNode, BuildingNode, DocumentFromQueryNode, DocumentNode, ErrorNode, GroupNode, LinkNode, QueryNode, RootNode

public interface Node


Field Summary
static java.lang.String NAVIGATION_NS
           
 
Method Summary
 boolean checkId(java.lang.String id, long branchId, long languageId)
          Returns true if the id of this node equals the specified id.
 void generateXml(org.xml.sax.ContentHandler contentHandler, int depth, java.lang.String path, long userId, long[] roleIds)
          Generates a full, non-contextualized navigation tree up to the specified depth.
 void generateXml(org.xml.sax.ContentHandler contentHandler, Node[] activeNodePath, int pos, boolean contextualized, java.lang.String path, long userId, long[] roleIds)
           
 java.util.List getExpandedChildList()
          Returns a list of the child nodes for which the nodes for which isExpandable() returns true are not included, but instead replaced by their children (recursively).
 java.lang.String getId()
          Returns the id of this node, only works when isIdentifiable() returns true, otherwise throws an UnsupportedOperationException.
 boolean isExpandable()
          Returns true for expandable nodes, these are nodes which themselves are not a part of the generated navigation tree, but are replaced by one or more other nodes.
 boolean isIdentifiable()
          Returns true if this node has an ID and will generate a corresponding node in the output tree.
 boolean isVisible(long userId, long[] roleIds, Node[] activeNodePath, int activeNodePathPos)
          Returns true if this node or any of its chilren would produce a visible node in the generated navigation tree.
 void populateNodeLookupMap(java.util.Map map, java.lang.String path)
          Nodes representing documents should add themselves to the map, using as key a VariantKey object and as value a String object representing the navigation tree path.
 java.util.List searchDocument(org.outerj.daisy.repository.VariantKey document)
           
 void searchPath(java.lang.String[] path, int pos, long branchId, long languageId, Node[] foundPath)
           
 

Field Detail

NAVIGATION_NS

static final java.lang.String NAVIGATION_NS
See Also:
Constant Field Values
Method Detail

searchPath

void searchPath(java.lang.String[] path,
                int pos,
                long branchId,
                long languageId,
                Node[] foundPath)
                throws org.outerj.daisy.repository.RepositoryException
Parameters:
path - the path we're looking for, each array element contains an id
pos - the current position in the array
branchId -
languageId -
foundPath - as the corresponding path nodes are found, they should be assigned
Throws:
org.outerj.daisy.repository.RepositoryException

searchDocument

java.util.List searchDocument(org.outerj.daisy.repository.VariantKey document)
                              throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

populateNodeLookupMap

void populateNodeLookupMap(java.util.Map map,
                           java.lang.String path)
                           throws org.outerj.daisy.repository.RepositoryException
Nodes representing documents should add themselves to the map, using as key a VariantKey object and as value a String object representing the navigation tree path. A node should not add itself to the map if there is already another mapping for its document ID in the map.

Throws:
org.outerj.daisy.repository.RepositoryException

checkId

boolean checkId(java.lang.String id,
                long branchId,
                long languageId)
                throws org.outerj.daisy.repository.RepositoryException
Returns true if the id of this node equals the specified id.

Throws:
org.outerj.daisy.repository.RepositoryException

isExpandable

boolean isExpandable()
                     throws org.outerj.daisy.repository.RepositoryException
Returns true for expandable nodes, these are nodes which themselves are not a part of the generated navigation tree, but are replaced by one or more other nodes.

Throws:
org.outerj.daisy.repository.RepositoryException

getExpandedChildList

java.util.List getExpandedChildList()
                                    throws org.outerj.daisy.repository.RepositoryException
Returns a list of the child nodes for which the nodes for which isExpandable() returns true are not included, but instead replaced by their children (recursively). This includes both visible and non-visible nodes.

Throws:
org.outerj.daisy.repository.RepositoryException

generateXml

void generateXml(org.xml.sax.ContentHandler contentHandler,
                 Node[] activeNodePath,
                 int pos,
                 boolean contextualized,
                 java.lang.String path,
                 long userId,
                 long[] roleIds)
                 throws org.outerj.daisy.repository.RepositoryException,
                        org.xml.sax.SAXException
Throws:
org.outerj.daisy.repository.RepositoryException
org.xml.sax.SAXException

generateXml

void generateXml(org.xml.sax.ContentHandler contentHandler,
                 int depth,
                 java.lang.String path,
                 long userId,
                 long[] roleIds)
                 throws org.outerj.daisy.repository.RepositoryException,
                        org.xml.sax.SAXException
Generates a full, non-contextualized navigation tree up to the specified depth. Specify a depth of -1 to get the full tree.

Throws:
org.outerj.daisy.repository.RepositoryException
org.xml.sax.SAXException

isIdentifiable

boolean isIdentifiable()
                       throws org.outerj.daisy.repository.RepositoryException
Returns true if this node has an ID and will generate a corresponding node in the output tree.

Throws:
org.outerj.daisy.repository.RepositoryException

getId

java.lang.String getId()
                       throws org.outerj.daisy.repository.RepositoryException
Returns the id of this node, only works when isIdentifiable() returns true, otherwise throws an UnsupportedOperationException.

Throws:
org.outerj.daisy.repository.RepositoryException

isVisible

boolean isVisible(long userId,
                  long[] roleIds,
                  Node[] activeNodePath,
                  int activeNodePathPos)
                  throws org.outerj.daisy.repository.RepositoryException
Returns true if this node or any of its chilren would produce a visible node in the generated navigation tree.

Parameters:
activeNodePath - this parameter can be null (if there is not active node path)
Throws:
org.outerj.daisy.repository.RepositoryException


Copyright © -2012 . All Rights Reserved.