| org.apache.cocoon.generation.ServiceableGenerator org.apache.lenya.cms.cocoon.generation.SitetreeFragmentGenerator
SitetreeFragmentGenerator | public class SitetreeFragmentGenerator extends ServiceableGenerator (Code) | | Generates a fragment of the navigation XML from the sitetree, corresponding to a given node. The
node is specified by the sitemap parameters area/path. If the sitemap parameter initialTree
is true, the top nodes of the tree will be generated and the node given by the sitemap parameters
area/path will be unfolded. If initialTree is false, only the children of the selected node
will be generated.
|
Method Summary | |
protected void | addLabel(String label, String language) Adds a label element of a given language. | protected void | addLabels(SiteNode node) Finds all the label children of a node and adds them to the nav xml. | protected void | addNodeRecursive(SiteNode node, String nodeid, String childid) Adds the given node, and if the node's id matched the given nodeid, it continues recursively. | protected void | addNodes(SiteNode[] children) Adds the given nodes (not recursive). | protected void | endNode(String nodeName) Ends the named node. | public void | generate() | protected void | generateFragment() Generates a fragment of the tree which contains the children of a given node. | protected void | generateFragmentInitial(String siteArea) Generates the top node of the given area and then calls a recursive method to traverse the
tree, if the node given by area/path is in this area. | protected void | generateFragmentRecursive(SiteNode[] nodes, String path) Follows the path to find the way in the sitetree to the specified node and opens all
folders on its way. | protected boolean | isFolder(SiteNode node) Returns a value to indicate whether a node is a folder (contains subnodes). | protected void | setNodeAttributes(SiteNode node) Sets the attributes for a given node. | public void | setup(SourceResolver _resolver, Map _objectModel, String src, Parameters par) | protected void | startNode(String nodeName) Begins a named node and calls setNodeAttributes to set its attributes. | protected void | startNode(String nodeName, SiteNode node) Begins a named node and calls setNodeAttributes to set its attributes. |
ATTR_PUBLICATION | final protected static String ATTR_PUBLICATION(Code) | | |
ATTR_VISIBLEINNAV | final protected static String ATTR_VISIBLEINNAV(Code) | | |
NODE_FRAGMENT | final protected static String NODE_FRAGMENT(Code) | | |
PARAM_INITIAL | final protected static String PARAM_INITIAL(Code) | | |
PREFIX | final protected static String PREFIX(Code) | | The namespace prefix for this namespace.
|
URI | final protected static String URI(Code) | | The URI of the namespace of this generator.
|
area | protected String area(Code) | | Parameter which denotes the area of the clicked node
|
areas | protected String[] areas(Code) | | FIXME: should pass this as a parameter
|
attributes | protected AttributesImpl attributes(Code) | | Convenience object, so we don't need to create an AttributesImpl for every element.
|
initialTree | protected boolean initialTree(Code) | | Parameter which decides if the initial tree with the root nodes is generated
|
path | protected String path(Code) | | Parameter which denotes the path of the clicked node
|
showType | protected boolean showType(Code) | | Parameter which decides if the node mime types should be reported
|
addLabel | protected void addLabel(String label, String language) throws SAXException(Code) | | Adds a label element of a given language.
Parameters: label - the value of the label Parameters: language - the language of the label throws: SAXException - |
endNode | protected void endNode(String nodeName) throws SAXException(Code) | | Ends the named node.
Parameters: nodeName - the name of the new node throws: SAXException - if an error occurs while closing the node |
isFolder | protected boolean isFolder(SiteNode node)(Code) | | Returns a value to indicate whether a node is a folder (contains subnodes). With the
incremental sitetree loading, we sometimes load nodes which are folders, but we don't load
their children. But we still have to know if it's a folder or not, i.e. if it can be opened.
Parameters: node - A boolean value. |
setNodeAttributes | protected void setNodeAttributes(SiteNode node) throws SAXException, SiteException(Code) | | Sets the attributes for a given node. Sets attributes id, href, folder, suffix, basic-url,
language-suffix.
Parameters: node - throws: SAXException - if an error occurs while setting the attributes throws: SiteException - |
startNode | protected void startNode(String nodeName) throws SAXException(Code) | | Begins a named node and calls setNodeAttributes to set its attributes.
Parameters: nodeName - the name of the new node throws: SAXException - if an error occurs while creating the node |
startNode | protected void startNode(String nodeName, SiteNode node) throws SAXException, SiteException(Code) | | Begins a named node and calls setNodeAttributes to set its attributes.
Parameters: nodeName - the name of the new node Parameters: node - The attributes are taken from this node throws: SAXException - if an error occurs while creating the node throws: SiteException - |
Fields inherited from org.apache.cocoon.generation.ServiceableGenerator | protected ServiceManager manager(Code)(Java Doc)
|
Methods inherited from org.apache.cocoon.generation.ServiceableGenerator | public void dispose()(Code)(Java Doc) public void service(ServiceManager manager) throws ServiceException(Code)(Java Doc)
|
|
|