Java Doc for AbstractMarkupLanguage.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » language » markup » 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.cocoon.components.language.markup 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.components.language.markup.AbstractMarkupLanguage

All known Subclasses:   org.apache.cocoon.components.language.markup.CocoonMarkupLanguage,
AbstractMarkupLanguage
abstract public class AbstractMarkupLanguage extends AbstractLogEnabled implements MarkupLanguage,Serviceable,Configurable,Recyclable,Disposable(Code)
Base implementation of MarkupLanguage. This class uses logicsheets as the only means of code generation. Code generation should be decoupled from this context!!!
author:
   Ricardo Rocha
author:
   Davanum Srinivas
author:
   Ovidiu Predescu
version:
   CVS $Id: AbstractMarkupLanguage.java 433543 2006-08-22 06:22:54Z crossley $

Inner Class :protected static class LanguageDescriptor
Inner Class :public class TransformerChainBuilderFilter extends AbstractXMLPipe

Field Summary
final public static  StringATTR_INTERPOLATION
     Name "attr-interpolation" of boolean attribute to enable expression interpolation in attribute values.
final public static  StringTEXT_INTERPOLATION
     Name "text-interpolation" of boolean attribute to enable expression interpolation inside text nodes.
protected  Maplanguages
    
protected  StorelogicsheetCache
    
protected  ServiceManagermanager
    
protected  Stringname
    

Constructor Summary
public  AbstractMarkupLanguage()
     The default constructor.

Method Summary
abstract protected  voidaddDependency(String location)
     Add a dependency on an external file to the document for inclusion in generated code.
protected  voidaddLogicsheetToList(LanguageDescriptor language, String logicsheetLocation)
     Add a logicsheet to the code generator.
protected  voidaddLogicsheetsToGenerator(LogicsheetCodeGenerator codeGenerator)
     Add logicsheet list to the code generator.
public  voidconfigure(Configuration conf)
     Process additional configuration.
public  voiddispose()
     Release all resources.
public  StringgenerateCode(Source source, String filename, ProgrammingLanguage programmingLanguage)
     Generate source code from the input document for the target ProgrammingLanguage.
public  StringgetEncoding()
     Return the source document's encoding.
protected  LogicsheetFiltergetLogicsheetFilter()
     Return the optional filter to prepocess logicsheets.
public  StringgetName()
     Return the markup language name.
public  StringgetPrefix()
     Returns the namespace prefix for this language.
protected  AbstractXMLPipegetPreprocessFilter(String filename, AbstractXMLPipe filter, ProgrammingLanguage language)
     Prepare the input source for logicsheet processing and code generation with a preprocess filter.
protected  TransformerChainBuilderFiltergetTransformerChainBuilder(LogicsheetCodeGenerator logicsheetMarkupGenerator)
     Returns a filter that chains on the fly the requested transformers for source code generation.
public  StringgetURI()
     Returns the namespace URI for this language.
public  booleanhasAttrInterpolation()
     Returns true if expansion of attribute expressions is enabled for this language.
public  booleanhasTextInterpolation()
     Returns true if expansion of expressions inside text nodes is enabled for this language.
public  voidrecycle()
     Recycle this component: clear logic sheet list and dependencies.
public  voidservice(ServiceManager manager)
     Set the global service manager.

Field Detail
ATTR_INTERPOLATION
final public static String ATTR_INTERPOLATION(Code)
Name "attr-interpolation" of boolean attribute to enable expression interpolation in attribute values.



TEXT_INTERPOLATION
final public static String TEXT_INTERPOLATION(Code)
Name "text-interpolation" of boolean attribute to enable expression interpolation inside text nodes.



languages
protected Map languages(Code)
The supported language table



logicsheetCache
protected Store logicsheetCache(Code)
The code-generation logicsheet cache



manager
protected ServiceManager manager(Code)
The service manager



name
protected String name(Code)
This language name




Constructor Detail
AbstractMarkupLanguage
public AbstractMarkupLanguage()(Code)
The default constructor.




Method Detail
addDependency
abstract protected void addDependency(String location)(Code)
Add a dependency on an external file to the document for inclusion in generated code. This is used to populate a list of File's tested for change on each invocation; this information is used to assert whether regeneration is necessary.
Parameters:
  location - The file path of the dependent file
See Also:   AbstractMarkupLanguage
See Also:   org.apache.cocoon.generation.ServerPagesGenerator
See Also:   org.apache.cocoon.generation.AbstractServerPage



addLogicsheetToList
protected void addLogicsheetToList(LanguageDescriptor language, String logicsheetLocation) throws IOException, SAXException, ProcessingException(Code)
Add a logicsheet to the code generator.
Parameters:
  language - Target programming language of the logicsheet
Parameters:
  logicsheetLocation - Location of the logicsheet to be added
exception:
  MalformedURLException - If location is invalid
exception:
  IOException - IO Error
exception:
  SAXException - Logicsheet parse error



addLogicsheetsToGenerator
protected void addLogicsheetsToGenerator(LogicsheetCodeGenerator codeGenerator) throws MalformedURLException, IOException, SAXException, ProcessingException(Code)
Add logicsheet list to the code generator.
Parameters:
  codeGenerator - The code generator



configure
public void configure(Configuration conf) throws ConfigurationException(Code)
Process additional configuration. Load supported programming language definitions
Parameters:
  conf - The language configuration
exception:
  ConfigurationException - If an error occurs loading logichseets



dispose
public void dispose()(Code)
Release all resources.



generateCode
public String generateCode(Source source, String filename, ProgrammingLanguage programmingLanguage) throws Exception(Code)
Generate source code from the input document for the target ProgrammingLanguage. After preprocessing the input document, this method applies logicsheets in the following order:
  • User-defined logicsheets
  • Namespace-mapped logicsheets
  • Language-specific logicsheet

Parameters:
  source - The input source
Parameters:
  filename - The input document's original filename
Parameters:
  programmingLanguage - The target programming language The generated source code
exception:
  Exception - If an error occurs during code generation



getEncoding
public String getEncoding()(Code)
Return the source document's encoding. This can be null for the platform's default encoding. The default implementation returns null, but derived classes may override it if encoding applies to their concrete languages. FIXME: There should be a way to get the XML document's encoding as seen by the parser; unfortunately, this information is not returned by current DOM or SAX parsers... The document-specified encoding



getLogicsheetFilter
protected LogicsheetFilter getLogicsheetFilter()(Code)
Return the optional filter to prepocess logicsheets.



getName
public String getName()(Code)
Return the markup language name. Two markup languages are well-know at the moment: sitemap and xsp. The language name.



getPrefix
public String getPrefix()(Code)
Returns the namespace prefix for this language.



getPreprocessFilter
protected AbstractXMLPipe getPreprocessFilter(String filename, AbstractXMLPipe filter, ProgrammingLanguage language)(Code)
Prepare the input source for logicsheet processing and code generation with a preprocess filter. The return XMLFilter object is the first filter on the transformer chain. The default implementation does nothing by returning a identity filter, but derived classes should (at least) use the passed programming language to quote Strings
Parameters:
  filename - The source filename
Parameters:
  language - The target programming language The preprocess filter



getTransformerChainBuilder
protected TransformerChainBuilderFilter getTransformerChainBuilder(LogicsheetCodeGenerator logicsheetMarkupGenerator)(Code)
Returns a filter that chains on the fly the requested transformers for source code generation. This method scans the input SAX events for built-in logicsheet declared as namespace attribute on the root element. Derived class should overide this method and the public inner class in order to add more specif action and to build a more specific transformer chain.
Parameters:
  logicsheetMarkupGenerator - the logicsheet markup generator XMLFilter the filter that build on the fly the transformer chain



getURI
public String getURI()(Code)
Returns the namespace URI for this language.



hasAttrInterpolation
public boolean hasAttrInterpolation()(Code)
Returns true if expansion of attribute expressions is enabled for this language.



hasTextInterpolation
public boolean hasTextInterpolation()(Code)
Returns true if expansion of expressions inside text nodes is enabled for this language.



recycle
public void recycle()(Code)
Recycle this component: clear logic sheet list and dependencies.



service
public void service(ServiceManager manager) throws ServiceException(Code)
Set the global service manager.
Parameters:
  manager - The sitemap-specified service manager



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