Java Doc for XGenericBuilder.java in  » XML-UI » xui32 » com » xoetrope » builder » generic » 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 » XML UI » xui32 » com.xoetrope.builder.generic 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.xoetrope.builder.generic.XGenericBuilder

All known Subclasses:   com.xoetrope.builder.pojo.XPojoFormBuilder,
XGenericBuilder
public class XGenericBuilder extends XuiBuilder (Code)
A generic builder for forms/pages based on generation markup. The builder can create XUI pages on-the-fly or it can be used to convert and save a page to a xui format.

Copyright (c) Xoetrope Ltd., 2001-2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Xoetrope.



Field Summary
protected  ArrayListcommonAttributeMapping
    
protected  StringcomponentsNodeName
    
protected  XPaneldecorationPanelformPanel
    
protected static  URLdocumentUrl
    
protected  ArrayListescapes
    
protected  XGenericBuilderAttributeEvaluatorevaluator
    
protected  StringfileExtension
    
protected  LayoutManagerlayoutManager
    
protected  StringpackageName
    
protected  Hashtableprocessors
    
protected  HashtabletypeMap
    

Constructor Summary
public  XGenericBuilder(XProject project)
     Create a new builder.

Method Summary
public  voidaddBinding(Component targetComp, String srcStr)
    
protected  ObjectaddComponent(XmlElement childNode)
     Adds an individual component element to the page (this method may be called recursively for nested elements).
protected  voidaddVocabulary(PageSupport page, XmlElement model)
     Adds data vocaulary associated with the page.
protected  Stringescape(String srcValue)
    
public  StringgetMappedValue(String srcValue, String mapping)
     Get the argument value in the specified format, substituting the value into the mapping string as appropriate.
public  StringgetMappedValue(Component comp, String srcValue)
     Get the argument value in the specified format, substituting the value into the mapping string as appropriate.
public  StringgetType()
    
protected  InputStreamgetUrlInputStream(String urlStr)
    
protected  voidinit(String packageName)
    
public  PageSupportloadPage(String defPackageName, String pageName, boolean include)
     Loads an XPage via a reader obtained from the XProject (searches the classpath).
public  PageSupportreadPage(Reader reader, String pageName, String ext, boolean include)
     Read an XML description of the page and construct a new XPage.
protected  voidsetComponentAttributes(Component comp, String attribName, String attribValue, XmlElement childNode)
    
public  voidsetStyle(Component comp, String value)
    
public  voidsetupCommonAttributeMapping(XmlElement mappingNode)
    
protected  voidsetupComponentMapping(XmlElement mappingNode)
    
public  voidsetupFileTypeHandler(String urlStr)
     Setup the file type handling, mapping a file extension to a set of configuration files for a particular file format.
protected  voidsetupInstructionMapping(XmlElement mappingNode)
    
protected  voidsetupPage(XmlElement model, String pageName, String ext, boolean include)
     Loads the page based on the contents of the page tag or by using default values.
public  voidsetupPageLayout(XmlElement componentsNode)
    
protected  Stringunescape(String srcValue)
    

Field Detail
commonAttributeMapping
protected ArrayList commonAttributeMapping(Code)



componentsNodeName
protected String componentsNodeName(Code)



decorationPanelformPanel
protected XPanel decorationPanelformPanel(Code)



documentUrl
protected static URL documentUrl(Code)



escapes
protected ArrayList escapes(Code)



evaluator
protected XGenericBuilderAttributeEvaluator evaluator(Code)



fileExtension
protected String fileExtension(Code)



layoutManager
protected LayoutManager layoutManager(Code)



packageName
protected String packageName(Code)



processors
protected Hashtable processors(Code)



typeMap
protected Hashtable typeMap(Code)




Constructor Detail
XGenericBuilder
public XGenericBuilder(XProject project)(Code)
Create a new builder. An attempt is made to configure the builder with a configuration file when the builder is constructed if the configuration file is specified as part of the startup properties via the XGenericBuilderConfig setting.
Parameters:
  project - the current xui project
Parameters:
  factory - the component factory




Method Detail
addBinding
public void addBinding(Component targetComp, String srcStr)(Code)
Add a data binding for the component
Parameters:
  targetComp - the affected component
Parameters:
  srcStr - the data source path



addComponent
protected Object addComponent(XmlElement childNode)(Code)
Adds an individual component element to the page (this method may be called recursively for nested elements). Several methods will be attempted until a component is successfully created. Firstly the built-in component types are checked, then any additional registered component constructors. The types can be specified by type ID, type name or class name.
Parameters:
  childNode - the XML element containing the component specification. the new component



addVocabulary
protected void addVocabulary(PageSupport page, XmlElement model)(Code)
Adds data vocaulary associated with the page.
Parameters:
  page - the page to which the component/data bindings are added
Parameters:
  model - the vocabulary model



escape
protected String escape(String srcValue)(Code)
Replace the [...] escaped blocks with [idx] where idx is the index of the store for the escaped value
Parameters:
  srcValue - the source/unescaped value the escaped value



getMappedValue
public String getMappedValue(String srcValue, String mapping)(Code)
Get the argument value in the specified format, substituting the value into the mapping string as appropriate. The mapping allows a value to be included from a model or a path within the model
Parameters:
  mapping - e.g. /vocab/lists/${value}
Parameters:
  srcValue - the value that is used to replace $value, or the returnvalue if no substitution is specified in the mapping



getMappedValue
public String getMappedValue(Component comp, String srcValue)(Code)
Get the argument value in the specified format, substituting the value into the mapping string as appropriate. The mapping allows a value to be included from a model or a path within the model
Parameters:
  comp - the affected component
Parameters:
  mapping - e.g. /vocab/lists/${value}
Parameters:
  srcValue - the value that is ${compName}value if no substitution is specified in the mapping



getType
public String getType()(Code)
Get the page loader type - a unique name identifying the loader "generic"



getUrlInputStream
protected InputStream getUrlInputStream(String urlStr)(Code)
Attempt to get an input stream from the specified path
Parameters:
  urlStr - the url string the inputstream or null if the strean cannot be opened.



init
protected void init(String packageName)(Code)
Initialize the builder



loadPage
public PageSupport loadPage(String defPackageName, String pageName, boolean include)(Code)
Loads an XPage via a reader obtained from the XProject (searches the classpath). The pageName is assumed to be the name of an XML file. For example if the pageName is 'welcome' then the 'welcome.xml' file is read as a UTF8 encoded XML file (by default).
Parameters:
  defPackageName - the package or path to the page
Parameters:
  pageName - the page name or the name of the class implementing the page
Parameters:
  include - true if the page to be loaded is being included in anotherpage in which case any class attribute of the included page is ignored the page



readPage
public PageSupport readPage(Reader reader, String pageName, String ext, boolean include)(Code)
Read an XML description of the page and construct a new XPage. An instance of the class specified by the class attribute is constructed or else an instance of XPage if no class attribute is specified. The new page is populated but is not yet added to its parent.
The startup file parameter 'DefaultClass' is used to obtain a default for each page's class if a class parameter is not specified in the page's XML
The startup file parameter 'Validations' is used to obtain a default for each page's set of validation rules
Parameters:
  reader - a input stream from which to read the page
Parameters:
  pageName - the name of the page
Parameters:
  ext - the file extension
Parameters:
  include - the page to be loaded is being included in another page the page



setComponentAttributes
protected void setComponentAttributes(Component comp, String attribName, String attribValue, XmlElement childNode)(Code)
Iterate through the attributes and set the attributes for a component
Parameters:
  comp - the component
Parameters:
  attribName - the name of the attribute.
Parameters:
  attribValue - the value of the attribute.
Parameters:
  childNode - the source xml node



setStyle
public void setStyle(Component comp, String value)(Code)
Apply a style to a component
Parameters:
  comp - the affected component
Parameters:
  value - the style name/value



setupCommonAttributeMapping
public void setupCommonAttributeMapping(XmlElement mappingNode)(Code)
Load the definition of the common attribute mapping



setupComponentMapping
protected void setupComponentMapping(XmlElement mappingNode)(Code)
Setup the mapping for component elements
Parameters:
  mappingNode - the node whose children describe the mapping of the fileelements to components



setupFileTypeHandler
public void setupFileTypeHandler(String urlStr)(Code)
Setup the file type handling, mapping a file extension to a set of configuration files for a particular file format. An attempt is made to load this file when the builder is constructed if the configuration file is specified as part of the startup properties via the XGenericBuilderConfig setting.
Parameters:
  urlStr - a filename/url for the main configuration file



setupInstructionMapping
protected void setupInstructionMapping(XmlElement mappingNode)(Code)
Setup the mapping for process/instruction elements
Parameters:
  mappingNode - the node whose children describe the mapping of the fileelements to components



setupPage
protected void setupPage(XmlElement model, String pageName, String ext, boolean include)(Code)
Loads the page based on the contents of the page tag or by using default values.
Parameters:
  pageName - the name of the page
Parameters:
  ext - the file extension
Parameters:
  include - the page to be loaded is being included in another page



setupPageLayout
public void setupPageLayout(XmlElement componentsNode)(Code)
Setup the layout for this page



unescape
protected String unescape(String srcValue)(Code)
Replace the [...] escaped blocks with [idx] where idx is the index of the store for the escaped value
Parameters:
  srcValue - the source/unescaped value the escaped value



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