Java Doc for SitetreeFragmentGenerator.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » lenya » cms » cocoon » generation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.lenya.cms.cocoon.generation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.


Field Summary
final protected static  StringATTR_AREA
    
final protected static  StringATTR_BASE
    
final protected static  StringATTR_FOLDER
    
final protected static  StringATTR_HREF
    
final protected static  StringATTR_ID
    
final protected static  StringATTR_LABEL
    
final protected static  StringATTR_LANG
    
final protected static  StringATTR_LINK
    
final protected static  StringATTR_PUBLICATION
    
final protected static  StringATTR_SUFFIX
    
final protected static  StringATTR_TYPE
    
final protected static  StringATTR_UUID
    
final protected static  StringATTR_VISIBLEINNAV
    
final protected static  StringNODE_FRAGMENT
    
final protected static  StringNODE_LABEL
    
final protected static  StringNODE_NODE
    
final protected static  StringNODE_SITE
    
final protected static  StringPARAM_AREA
    
final protected static  StringPARAM_AREAS
    
final protected static  StringPARAM_INITIAL
    
final protected static  StringPARAM_PATH
    
final protected static  StringPARAM_TYPE
    
final protected static  StringPREFIX
     The namespace prefix for this namespace.
final protected static  StringURI
     The URI of the namespace of this generator.
final protected static  StringXML_PREFIX
    
final protected static  StringXML_URI
    
protected  Stringarea
    
protected  String[]areas
    
protected  AttributesImplattributes
     Convenience object, so we don't need to create an AttributesImpl for every element.
protected  booleaninitialTree
    
protected  Stringpath
    
protected  Publicationpublication
    
protected  booleanshowType
    


Method Summary
protected  voidaddLabel(String label, String language)
     Adds a label element of a given language.
protected  voidaddLabels(SiteNode node)
     Finds all the label children of a node and adds them to the nav xml.
protected  voidaddNodeRecursive(SiteNode node, String nodeid, String childid)
     Adds the given node, and if the node's id matched the given nodeid, it continues recursively.
protected  voidaddNodes(SiteNode[] children)
     Adds the given nodes (not recursive).
protected  voidendNode(String nodeName)
     Ends the named node.
public  voidgenerate()
    
protected  voidgenerateFragment()
     Generates a fragment of the tree which contains the children of a given node.
protected  voidgenerateFragmentInitial(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  voidgenerateFragmentRecursive(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  booleanisFolder(SiteNode node)
     Returns a value to indicate whether a node is a folder (contains subnodes).
protected  voidsetNodeAttributes(SiteNode node)
     Sets the attributes for a given node.
public  voidsetup(SourceResolver _resolver, Map _objectModel, String src, Parameters par)
    
protected  voidstartNode(String nodeName)
     Begins a named node and calls setNodeAttributes to set its attributes.
protected  voidstartNode(String nodeName, SiteNode node)
     Begins a named node and calls setNodeAttributes to set its attributes.

Field Detail
ATTR_AREA
final protected static String ATTR_AREA(Code)



ATTR_BASE
final protected static String ATTR_BASE(Code)



ATTR_FOLDER
final protected static String ATTR_FOLDER(Code)



ATTR_HREF
final protected static String ATTR_HREF(Code)



ATTR_ID
final protected static String ATTR_ID(Code)



ATTR_LABEL
final protected static String ATTR_LABEL(Code)



ATTR_LANG
final protected static String ATTR_LANG(Code)



ATTR_LINK
final protected static String ATTR_LINK(Code)



ATTR_PUBLICATION
final protected static String ATTR_PUBLICATION(Code)



ATTR_SUFFIX
final protected static String ATTR_SUFFIX(Code)



ATTR_TYPE
final protected static String ATTR_TYPE(Code)



ATTR_UUID
final protected static String ATTR_UUID(Code)



ATTR_VISIBLEINNAV
final protected static String ATTR_VISIBLEINNAV(Code)



NODE_FRAGMENT
final protected static String NODE_FRAGMENT(Code)



NODE_LABEL
final protected static String NODE_LABEL(Code)



NODE_NODE
final protected static String NODE_NODE(Code)



NODE_SITE
final protected static String NODE_SITE(Code)



PARAM_AREA
final protected static String PARAM_AREA(Code)



PARAM_AREAS
final protected static String PARAM_AREAS(Code)



PARAM_INITIAL
final protected static String PARAM_INITIAL(Code)



PARAM_PATH
final protected static String PARAM_PATH(Code)



PARAM_TYPE
final protected static String PARAM_TYPE(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.



XML_PREFIX
final protected static String XML_PREFIX(Code)



XML_URI
final protected static String XML_URI(Code)



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



publication
protected Publication publication(Code)



showType
protected boolean showType(Code)
Parameter which decides if the node mime types should be reported





Method Detail
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 -



addLabels
protected void addLabels(SiteNode node) throws SAXException(Code)
Finds all the label children of a node and adds them to the nav xml.
Parameters:
  node -
throws:
  SAXException -



addNodeRecursive
protected void addNodeRecursive(SiteNode node, String nodeid, String childid) throws SAXException, SiteException(Code)
Adds the given node, and if the node's id matched the given nodeid, it continues recursively.
Parameters:
  node -
Parameters:
  nodeid -
Parameters:
  childid -
throws:
  SAXException -
throws:
  SiteException -



addNodes
protected void addNodes(SiteNode[] children) throws SAXException, SiteException(Code)
Adds the given nodes (not recursive).
Parameters:
  children -
throws:
  SAXException -
throws:
  SiteException -



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



generate
public void generate() throws IOException, SAXException, ProcessingException(Code)

See Also:   org.apache.cocoon.generation.Generator.generate



generateFragment
protected void generateFragment() throws SiteException, SAXException, ProcessingException(Code)
Generates a fragment of the tree which contains the children of a given node.
throws:
  SiteException -
throws:
  SAXException -
throws:
  ProcessingException -



generateFragmentInitial
protected void generateFragmentInitial(String siteArea) throws SiteException, SAXException, ProcessingException(Code)
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.
Parameters:
  siteArea -
throws:
  SiteException -
throws:
  SAXException -
throws:
  ProcessingException -



generateFragmentRecursive
protected void generateFragmentRecursive(SiteNode[] nodes, String path) throws SiteException, SAXException(Code)
Follows the path to find the way in the sitetree to the specified node and opens all folders on its way.
Parameters:
  nodes -
Parameters:
  path -
throws:
  SiteException -
throws:
  SAXException -



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 -



setup
public void setup(SourceResolver _resolver, Map _objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException(Code)

See Also:   org.apache.cocoon.sitemap.SitemapModelComponent.setup(org.apache.cocoon.environment.SourceResolverjava.util.Mapjava.lang.Stringorg.apache.avalon.framework.parameters.Parameters)



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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.