org.apache.cocoon.components.treeprocessor.sitemap
Class SitemapLanguage
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder
|
+--org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.logger.LogKitManageable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.framework.component.Recomposable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.excalibur.component.RoleManageable, TreeBuilder
- public class SitemapLanguage
- extends DefaultTreeBuilder
The tree builder for the sitemap language.
- Version:
- CVS $Id: SitemapLanguage.java,v 1.3 2002/03/22 22:26:13 sylvain Exp $
- Author:
- Sylvain Wallez
Field Summary |
static java.lang.String |
FIRST_POS_LABEL
Pseudo-label for views from-position="first" (i.e. generator). |
static java.lang.String |
LAST_POS_LABEL
Pseudo-label for views from-position="last" (i.e. serializer). |
Fields inherited from class org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder |
builderSelector, configuration, context, fileName, languageName, lifecycle, logKit, manager, namespace, parameterElement, parentManager, parentRoleManager, processor, roleManager |
Method Summary |
void |
addViewForLabel(java.lang.String label,
java.lang.String view)
Add a view for a label. |
protected org.apache.avalon.framework.component.ComponentManager |
createComponentManager(org.apache.avalon.framework.configuration.Configuration tree)
Build a component manager with the contents of the <map:components> element of
the tree. |
java.util.Map |
getViewNodes(java.util.Collection viewNames)
Get the {view name, view node} map for a collection of view names.
|
java.util.Collection |
getViewsForStatement(java.lang.String role,
java.lang.String hint,
org.apache.avalon.framework.configuration.Configuration statement)
Get the names of views for a given statement. |
boolean |
isBuildingView()
Are we currently building a view ? |
protected void |
linkNodes()
Before linking nodes, lookup the view category node used in getViewNodes(Collection) . |
void |
setBuildingView(boolean building)
Set to true while building the internals of a <map:view> |
Methods inherited from class org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder |
build, build, compose, configure, contextualize, createBuilderSelector, createNodeBuilder, createRoleManager, createTree, dispose, getDisposableNodes, getFileName, getLanguage, getNamespace, getParameterName, getParameters, getProcessor, getRegisteredNode, getTypeForStatement, recompose, recycle, registerNode, setLogKitManager, setProcessor, setRoleManager, setupNode |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIRST_POS_LABEL
public static final java.lang.String FIRST_POS_LABEL
- Pseudo-label for views
from-position="first"
(i.e. generator).
LAST_POS_LABEL
public static final java.lang.String LAST_POS_LABEL
- Pseudo-label for views
from-position="last"
(i.e. serializer).
SitemapLanguage
public SitemapLanguage()
createComponentManager
protected org.apache.avalon.framework.component.ComponentManager createComponentManager(org.apache.avalon.framework.configuration.Configuration tree)
throws java.lang.Exception
- Build a component manager with the contents of the <map:components> element of
the tree.
- Overrides:
createComponentManager
in class DefaultTreeBuilder
- Following copied from class:
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder
- Returns:
- a component manager
setBuildingView
public void setBuildingView(boolean building)
- Set to
true
while building the internals of a <map:view>
isBuildingView
public boolean isBuildingView()
- Are we currently building a view ?
addViewForLabel
public void addViewForLabel(java.lang.String label,
java.lang.String view)
- Add a view for a label. This is used to register all views that start from
a given label.
getViewsForStatement
public java.util.Collection getViewsForStatement(java.lang.String role,
java.lang.String hint,
org.apache.avalon.framework.configuration.Configuration statement)
throws java.lang.Exception
- Get the names of views for a given statement. If the cocoon view exists in the returned
collection, the statement can directly branch to the view-handling node.
- Parameters:
role
- the component role (e.g. Generator.ROLE
)hint
- the component hint, i.e. the 'type' attributestatement
- the sitemap statement- Returns:
- the view names for this statement
linkNodes
protected void linkNodes()
throws java.lang.Exception
- Before linking nodes, lookup the view category node used in
getViewNodes(Collection)
.
- Overrides:
linkNodes
in class DefaultTreeBuilder
getViewNodes
public java.util.Map getViewNodes(java.util.Collection viewNames)
throws java.lang.Exception
- Get the {view name, view node} map for a collection of view names.
This allows to resolve view nodes at build time, thus avoiding runtime lookup.
- Parameters:
viewNames
- the view names- Returns:
- association of names to views
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.