org.outerj.daisy.navigation.impl
Class AbstractParentNode
java.lang.Object
org.outerj.daisy.navigation.impl.AbstractParentNode
- All Implemented Interfaces:
- Node
- Direct Known Subclasses:
- AggregateNode, DocumentNode, GroupNode, LinkNode, QueryNode
- public abstract class AbstractParentNode
- extends java.lang.Object
- implements Node
Field Summary |
protected java.util.List |
children
|
Method Summary |
void |
add(Node node)
|
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 includeOnlyActivePath,
java.lang.String path,
long userId,
long[] roleIds)
|
void |
generateXml(java.util.List children,
org.xml.sax.ContentHandler contentHandler,
int depth,
java.lang.String path,
long userId,
long[] roleIds)
|
void |
generateXml(java.util.List children,
org.xml.sax.ContentHandler contentHandler,
Node[] activeNodePath,
int pos,
boolean includeOnlyActivePath,
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
Node.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 Node.isIdentifiable() returns true,
otherwise throws an UnsupportedOperationException. |
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 key)
|
void |
searchPath(java.lang.String[] path,
int pos,
Node[] foundPath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
children
protected final java.util.List children
AbstractParentNode
public AbstractParentNode()
add
public void add(Node node)
searchPath
public void searchPath(java.lang.String[] path,
int pos,
Node[] foundPath)
throws org.outerj.daisy.repository.RepositoryException
- Specified by:
searchPath
in interface Node
- Parameters:
path
- the path we're looking for, each array element contains an idpos
- the current position in the arrayfoundPath
- as the corresponding path nodes are found, they should be assigned
in this array. This array has (of course) the same length as the 'path' array.
- Throws:
org.outerj.daisy.repository.RepositoryException
searchDocument
public java.util.List searchDocument(org.outerj.daisy.repository.VariantKey key)
throws org.outerj.daisy.repository.RepositoryException
- Specified by:
searchDocument
in interface Node
- Throws:
org.outerj.daisy.repository.RepositoryException
populateNodeLookupMap
public void populateNodeLookupMap(java.util.Map map,
java.lang.String path)
throws org.outerj.daisy.repository.RepositoryException
- Description copied from interface:
Node
- 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.
- Specified by:
populateNodeLookupMap
in interface Node
- Throws:
org.outerj.daisy.repository.RepositoryException
generateXml
public 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
- Description copied from interface:
Node
- Generates a full, non-contextualized navigation tree up to the specified depth.
Specify a depth of -1 to get the full tree.
- Specified by:
generateXml
in interface Node
- Throws:
org.outerj.daisy.repository.RepositoryException
org.xml.sax.SAXException
generateXml
public void generateXml(java.util.List children,
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
- Throws:
org.outerj.daisy.repository.RepositoryException
org.xml.sax.SAXException
generateXml
public void generateXml(org.xml.sax.ContentHandler contentHandler,
Node[] activeNodePath,
int pos,
boolean includeOnlyActivePath,
java.lang.String path,
long userId,
long[] roleIds)
throws org.outerj.daisy.repository.RepositoryException,
org.xml.sax.SAXException
- Specified by:
generateXml
in interface Node
- Throws:
org.outerj.daisy.repository.RepositoryException
org.xml.sax.SAXException
generateXml
public void generateXml(java.util.List children,
org.xml.sax.ContentHandler contentHandler,
Node[] activeNodePath,
int pos,
boolean includeOnlyActivePath,
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
getExpandedChildList
public java.util.List getExpandedChildList()
throws org.outerj.daisy.repository.RepositoryException
- Description copied from interface:
Node
- Returns a list of the child nodes for which the nodes for which
Node.isExpandable()
returns true are not included, but instead
replaced by their children (recursively).
- Specified by:
getExpandedChildList
in interface Node
- Throws:
org.outerj.daisy.repository.RepositoryException
getId
public java.lang.String getId()
- Description copied from interface:
Node
- Returns the id of this node, only works when
Node.isIdentifiable()
returns true,
otherwise throws an UnsupportedOperationException.
- Specified by:
getId
in interface Node
Copyright © -2005 . All Rights Reserved.