JeeWiz Home  
The Model-Driven System Builder
JeeWiz Architect's Guide
 

Chapters

1 Introduction 
2 Overview 
3 JeeWiz Input 
4 Meta-Models And Template Directories 
5 Meta-Model Inheritance 
6 Running And Configuring JeeWiz 
7 Finding Values and Files 
8 Templates and Velocity Features 
9 Patterns 
10 JeeWiz Controls 
11 How To 
12 'Base Meta-model for Languages' Reference 
13 'Java' Reference 
14 'Business Object' Reference 
15 'Screen' Reference 
16 'JeeWiz' Reference 
17 'Documentation' Reference 


Table Of Contents

1 Introduction
1.1 Preface
1.2 Prerequisites
1.2.1 Installation Prerequisites
1.2.2 Knowledge Prerequisites
1.3 Map Of The Manual
1.4 Goals and Features
1.4.1 Goals
1.4.2 JeeWiz Engine Features
1.4.2.1 XML Models and Meta-Models
1.4.2.2 Meta-model Inheritance
1.4.2.3 Rendering
1.4.2.4 Velocity
1.4.2.5 Ant
1.4.2.6 Rendering Inheritance
1.4.2.7 Name Management
1.4.2.8 Patterns
1.4.2.9 JeeWiz 'Controls'
1.4.2.10 Velocity Methods
1.4.3 Comparison to Other Generation Systems
1.4.3.1 Simple Generation Systems
1.4.3.2 'Pure' Model-Driven Architecture (MDA)
1.4.3.3 Domain-Specific Languages (DSLs)
1.5 The Jeewiz Directory Structure
1.6 Installing the RSA/RSM Plugins for The First Time



2 Overview
2.1 The Architect Role
2.1.1 Definition
2.1.2 Related Roles and Products - Business
2.1.3 Related Roles and Products - Technical
2.2 JeeWiz Input - Simple XML
2.2.1 Input Model Transformations
2.2.2 Simple XML - The Bare Essentials
2.2.3 JeeWiz Format For Design Transforms
2.2.4 Aggregating Multiple XML Files
2.2.5 XML Pre-processing
2.3 Meta-Classes and Meta-models
2.3.1 Meta-Classes
2.3.2 Standard Features of Meta-Classes
2.3.2.1 Standard Properties
2.3.2.2 Standard Methods
2.3.2.3 Extra Properties
2.3.3 Meta-models
2.3.4 Meta-models are Models
2.3.5 Lists of Strings
2.3.6 Other Features
2.3.7 The M words
2.4 Meta-Model 'Inheritance'
2.4.1 Meta-Class Inheritance
2.4.2 Meta-Model Inheritance
2.4.3 Pluggable Meta-Models
2.4.4 Which Meta-Model
2.4.5 How To Model
2.5 Transforming Models To Systems
2.5.1 Assembly By Ant
2.5.2 The Context for Ant Substitutions
2.5.3 Pipelining
2.6 Velocity
2.6.1 The jwVelocity Task
2.6.2 Setting Values Into Model Objects
2.6.3 Not Updating Files
2.6.4 Methods
2.6.5 Recursive Macros
2.6.6 Tracing source files
2.7 Rendering Inheritance
2.7.1 The Backbone
2.7.2 Part 1: Overall Features
2.7.2.1 Referencing Meta-Models
2.7.2.2 Other Attachments
2.7.2.3 Aggregation
2.7.3 Part 2: Per-Model-Object Features
2.7.4 Searching For Files
2.7.4.1 Directory Structure
2.7.4.2 Adding Model Object Inheritance
2.7.4.2.1 The Mechanism
2.8 Name Management
2.8.1 Logical Names Attach To Model Objects
2.8.2 References in Names and Values
2.8.3 Declaration Order
2.8.4 Aggregation
2.8.5 Inheritance And Delegation
2.9 Patterns
2.9.1 Overview
2.9.2 More Mechanics
2.9.2.1 Invoking Patterns
2.9.2.2 XML Format
2.9.2.3 Multi-stage Patterns
2.9.3 Examples Of Using Patterns
2.9.3.1 Implementing Design Patterns
2.9.3.2 Fix-ups
2.9.3.3 Cross-Tier Patterns
2.9.4 Taking Advantage of Patterns
2.10 JeeWiz Controls
2.10.1 Motivation
2.10.2 Application Areas
2.10.3 Using Controls
2.10.4 Variations



3 JeeWiz Input
3.1 Basics
3.1.1 Terminology - Assembly
3.1.2 Locating the Input File
3.1.3 XML Structure
3.1.4 Validation
3.2 Aggregating XML Files Into A Model
3.2.1 The Assembly Directory
3.2.2 Non-Assembly XML Files in an Assembly Directory
3.2.3 Subdirectories
3.3 The Copy Feature
3.3.1 Basic Functions of The 'Copy' Feature
3.3.2 Details
3.4 Customizing Modelling Profiles
3.4.1 Building Profiles
3.4.2 Filter Includes
3.4.3 Filter Additions



4 Meta-Models And Template Directories
4.1 Basics
4.1.1 Naming Conventions
4.1.2 Names
4.1.3 Directory Structure
4.2 Creating And Building A New Meta-Model



5 Meta-Model Inheritance



6 Running And Configuring JeeWiz
6.1 Running JeeWiz
6.1.1 Setting up Ant
6.1.2 Starting JeeWiz
6.1.2.1 jwrun.xml
6.1.2.2 jwcall.xml
6.1.3 Shared Properties
6.1.4 jwrun JVM properties
6.2 'Start-of-day' Configuration
6.2.1 Configuration Structure
6.2.2 Substitution Values in Configuration Files
6.2.3 Using Configuration Files
6.3 JeeWiz Property Files
6.4 Engine Configuration Values
6.5 The Template Directory
6.6 Model Properties
6.7 The system.properties File
6.7.1 The 'convert()' Feature
6.7.2 Removing Nodes with 'convert'
6.7.3 Removing Unwanted 'convert' overrides
6.8 Character Encoding
6.8.1 Encoding Of Specifications
6.8.2 Encoding Of Meta-programs - inputEncoding
6.8.3 Encoding Of Pattern Output
6.8.4 Encoding Of Output



7 Finding Values and Files
7.1 The Build Process
7.2 Finding And Using Properties
7.2.1 Property Read From Ant
7.2.2 Property Read From Velocity Script
7.2.3 Property Write From Ant
7.2.4 Property Write From Velocity
7.3 Finding A Value
7.3.1 Delegating Values
7.3.2 Beware 'if( $name )'
7.4 Finding Files in Template Directories
7.4.1 The Template Property
7.4.2 The template.properties File
7.4.3 Using Rendering Files From Other Objects
7.4.4 #parse and the 'super' feature
7.4.5 Using 'super' in build.xml
7.4.6 Using Overriding Files
7.5 component.properties
7.5.1 Rules for component.properties
7.6 The Ant Build files
7.6.1 build.xml
7.6.2 uptodate.xml
7.6.3 Ant Tasks



8 Templates and Velocity Features
8.1 Template-only Features
8.1.1 Introduction
8.1.2 The Velocity Task
8.1.3 Handling Of The Same Result From A Script
8.1.4 Null Scripts
8.2 Miscellaneous Velocity Extensions
8.2.1 Additional Values
8.2.2 Indentation In Scripts
8.2.3 Indentation In Generated Text
8.2.4 Global Macros
8.2.5 this, self and parent Cannot Be Set
8.2.6 Setting Values In The Object Model
8.2.7 Macro Variable Scope
8.2.8 Velocity Gotchas
8.2.9 Additional Methods
8.3 JeeWiz Methods
8.3.1 Overview
8.3.2 Constructing Objects To Use Methods On
8.3.3 Syntax
8.3.4 Invoking Methods - Explicit
8.3.5 Invoking Methods - Implicit
8.3.6 Evaluation Context
8.3.7 $super
8.3.8 dump
8.3.9 Local Methods Compared to Local Macros
8.3.10 Details of Operation
8.4 #return
8.4.1 Syntax
8.4.2 Operation
8.4.3 Returning A Value
8.5 #divert/#revert
8.5.1 Syntax
8.5.2 Operation
8.5.3 'divert'ed References
8.6 #trace
8.6.1 The #trace directive
8.6.2 The 'traceExecution' flag
8.7 #while and #break/#continue
8.7.1 The #while directive
8.7.2 Loop Control Directives: #break and #continue
8.8 #try
8.9 Trouble-shooting Velocity Scripts
8.9.1 Syntax Problems
8.9.2 Big Trouble
8.9.3 Drilling Down
8.10 Using Velocity For Scripting
8.10.1 Local Methods Compared to Local Macros
8.10.2 jwscript batch job
8.10.3 Syntax and Operation
8.10.4 Piping input
8.11 Helper Methods
8.11.1 addErrorMessage
8.11.2 addPatternErrorMessage
8.11.3 addPatternRootElement
8.11.4 addSourcePattern
8.11.5 addTemplateErrorMessage
8.11.6 addText
8.11.7 addURIByPrefix
8.11.8 addUniqueCSStrings
8.11.9 appendToUniqueCSString
8.11.10 arrayListToCsv
8.11.11 buildCSString
8.11.12 callPattern( String patternFileName )
8.11.13 callPattern( String patternFileName, Object patternRootObject )
8.11.14 capitalise
8.11.15 capitalize
8.11.16 checkXsdDate
8.11.17 checkXsdDateTime
8.11.18 checkXsdTime
8.11.19 compareStringNumbers
8.11.20 containsKey
8.11.21 createChild
8.11.22 createModelObject
8.11.23 createRootModelObject
8.11.24 csvToArrayList( String csv )
8.11.25 csvToArrayList( String csv, String separator, String delimiter )
8.11.26 decapitalize
8.11.27 doingLogsForLevel
8.11.28 dumpObject( Object objectToDump )
8.11.29 dumpObject( Object objectToDump, String initialIndent, String indentIncrement )
8.11.30 dumpStringWithControlChars
8.11.31 exciseString
8.11.32 exit( String errorMessage )
8.11.33 exit( int exitStatus )
8.11.34 exit( long exitStatus )
8.11.35 exit()
8.11.36 extraInitialiseComponent
8.11.37 fatal
8.11.38 fatalErrorMessage
8.11.39 fatalPatternErrorMessage
8.11.40 fatalTemplateErrorMessage
8.11.41 fileIsAbsolute
8.11.42 firstIndexOf
8.11.43 firstLetterCaps
8.11.44 firstValue( String s1, String s2 )
8.11.45 firstValue( String s1, String s2, String s3 )
8.11.46 formatNumericString( String str )
8.11.47 formatNumericString( String str, Locale locale )
8.11.48 formatXML( String inputString )
8.11.49 formatXML( String inputString, int initialIndent , int attributeTabPosition)
8.11.50 get
8.11.51 getAbsolutePath( File f )
8.11.52 getAbsolutePath( String s )
8.11.53 getAllAntProperties
8.11.54 getAllPrefixToURIMappings
8.11.55 getAllProperties
8.11.56 getAttributeOrProperty
8.11.57 getAvailableMethods()
8.11.58 getAvailableMethods( Object o )
8.11.59 getBasename
8.11.60 getBooleanFalse
8.11.61 getBooleanTrue
8.11.62 getCanonicalPath( File f )
8.11.63 getCanonicalPath( String fileName )
8.11.64 getCapsAndSeparatorName
8.11.65 getCapsAndSpacesName
8.11.66 getCapsAndUnderscoreName
8.11.67 getCharacterCount
8.11.68 getChildren
8.11.69 getClassInstance(ArrayList typeNames, String fullyQualifiedClassName, Object p1 )
8.11.70 getClassInstance(String fullyQualifiedClassName)
8.11.71 getClassInstance(String fullyQualifiedClassName, Object p1 )
8.11.72 getClassInstance(String fullyQualifiedClassName, Object p1, Object p2 )
8.11.73 getClassInstance(String fullyQualifiedClassName, Object p1, Object p2, Object p3 )
8.11.74 getClassObject
8.11.75 getContainingBCByType
8.11.76 getCurrentAntProject
8.11.77 getCurrentAntProperties
8.11.78 getCurrentScript
8.11.79 getCurrentTimeMillis
8.11.80 getDelegatedProperty
8.11.81 getDelegatedPropertyFromAbove
8.11.82 getDirname
8.11.83 getEOLString
8.11.84 getFile( File dir, String fileName )
8.11.85 getFile( String path )
8.11.86 getFileSeparator
8.11.87 getFinalElementTag
8.11.88 getFirstPieceOf
8.11.89 getIdentifyingString
8.11.90 getIsDOS
8.11.91 getIsUNIX
8.11.92 getIsWindows
8.11.93 getJWControlManager
8.11.94 getJavaClassComponentType
8.11.95 getJavaClassName()
8.11.96 getJavaClassName( String inputName )
8.11.97 getJavaName
8.11.98 getJavaVarComponentType
8.11.99 getJavaVarName()
8.11.100 getJavaVarName( String inputName )
8.11.101 getJaxbAttributeName
8.11.102 getLastPieceOf
8.11.103 getLineSeparator
8.11.104 getLocalName
8.11.105 getLocalPrefixToURIMappings
8.11.106 getMyXmlURI
8.11.107 getName
8.11.108 getNameCapitalised
8.11.109 getNameCapitalized
8.11.110 getNewArrayList( Collection c )
8.11.111 getNewArrayList( int n )
8.11.112 getNewArrayList()
8.11.113 getNewControl( String templateName )
8.11.114 getNewControl( String xmlTemplateName, Map map )
8.11.115 getNewControl( String xmlTemplateName, String propertiesString )
8.11.116 getNewControl()
8.11.117 getNewHashMap( Map m )
8.11.118 getNewHashMap()
8.11.119 getNewListMap
8.11.120 getNewTreeMap( Map m )
8.11.121 getNewTreeMap()
8.11.122 getNull
8.11.123 getOriginalElementTag
8.11.124 getParentBC
8.11.125 getPathSeparator
8.11.126 getPatternXmlDeclaration
8.11.127 getPieceOf( String inputString, String leftSeparator, String rightSeparator )
8.11.128 getPieceOf( String inputString, String separator, int pieceNumber )
8.11.129 getPieces( String inputString, String separator )
8.11.130 getPieces( String inputString, String separator, boolean removeEmptyPieces )
8.11.131 getPlatformPath( File f )
8.11.132 getPlatformPath( String fileName )
8.11.133 getPreLastPieceOf
8.11.134 getPrefix
8.11.135 getProperties
8.11.136 getRelativePath( String path, String baseDirectory )
8.11.137 getRelativePath( String path, String baseDirectory, int nLevels )
8.11.138 getRelativePathBS( String path, String baseDirectory )
8.11.139 getRelativePathBS( String path, String baseDirectory, int nLevels )
8.11.140 getRenderedText
8.11.141 getResolvedPathFrom
8.11.142 getSetAttributes
8.11.143 getShortID
8.11.144 getSingleLineDescription
8.11.145 getSingleLineText
8.11.146 getSuperclasses
8.11.147 getSystemProperties
8.11.148 getTemplate
8.11.149 getTemplateStack
8.11.150 getText
8.11.151 getTopComponent
8.11.152 getURIByPrefix
8.11.153 getURIByQName
8.11.154 getUUID( String hostName )
8.11.155 getUUID()
8.11.156 getUniqueKey( String baseKey, Map map )
8.11.157 getUniqueKey( String baseKey, Map map, Object entryValue )
8.11.158 getUnixPath( File f )
8.11.159 getUnixPath( String fileName )
8.11.160 getVersionNumber
8.11.161 getWindowsPath( File f )
8.11.162 getWindowsPath( String fileName )
8.11.163 getXMLComponentType
8.11.164 getXMLName
8.11.165 getXmlDump( String indent )
8.11.166 getXmlDump()
8.11.167 getXmlLocalPart
8.11.168 getXmlName()
8.11.169 getXmlName( String inputName )
8.11.170 getXmlPrefix( String s )
8.11.171 getXmlPrefix()
8.11.172 getXmlns
8.11.173 getXsdDateAsCalendar
8.11.174 getXsdDateTimeAsCalendar
8.11.175 getXsdTimeAsCalendar
8.11.176 initialiseComponent
8.11.177 isDirectory
8.11.178 isFile
8.11.179 isInstanceOf
8.11.180 leftJustify
8.11.181 list
8.11.182 log( String indentation, String stringToLog )
8.11.183 log( String indentation, String stringToLog, int logLevel )
8.11.184 log( String s )
8.11.185 log( String s, boolean messageOnlyFlag )
8.11.186 log( String s, int logLevel )
8.11.187 logError( String indentation, String s )
8.11.188 logError( String s )
8.11.189 logObject( Object objectToDump )
8.11.190 logObject( String label, Object objectToDump )
8.11.191 logObject( Object objectToDump, String initialIndent, String indentIncrement )
8.11.192 lowerCaseOnSecond
8.11.193 multiplyString
8.11.194 onInstantiation
8.11.195 parseFormat
8.11.196 preInitialiseComponent
8.11.197 processSpecialCharacters
8.11.198 put
8.11.199 readFileAsLines( File file )
8.11.200 readFileAsLines( String fileName )
8.11.201 readFileAsString( File file )
8.11.202 readFileAsString( String fileName )
8.11.203 readFileAsXml( File file, String propertyName )
8.11.204 readFileAsXml( String fileName, String propertyName )
8.11.205 readPropertiesFile( File file )
8.11.206 readPropertiesFile( String fileName )
8.11.207 removeCSListDuplicates
8.11.208 removeChars
8.11.209 removePunctuationAndCapitalise
8.11.210 removeSpaces
8.11.211 removeSpacesCapitalise
8.11.212 removeSpacesProperCase
8.11.213 removeString
8.11.214 removeStringNoCapital
8.11.215 renderString
8.11.216 reportAllPrefixToURIMappings
8.11.217 resetPatternErrorMessages
8.11.218 rightJustify
8.11.219 separateByCapitals
8.11.220 setCurrentScript
8.11.221 setNextPattern
8.11.222 setPatternRootObject
8.11.223 setPatternXmlDeclaration
8.11.224 setSourcePattern
8.11.225 setText
8.11.226 setX( String key, String value )
8.11.227 setX( String key, boolean value )
8.11.228 sleep
8.11.229 spaces( String s )
8.11.230 spaces( int n )
8.11.231 spaces1
8.11.232 splitCSString
8.11.233 splitCSStringWithoutDuplicates
8.11.234 splitSeparatorString( String stringToSplit, String delimiters )
8.11.235 splitSeparatorString( String stringToSplit, String delimiters, boolean returnDelims )
8.11.236 splitStringIntoTwo
8.11.237 stopBuild
8.11.238 stringNumberEqual
8.11.239 stringNumberGreater
8.11.240 stringNumberGreaterOrEqual
8.11.241 stringNumberLess
8.11.242 stringNumberLessOrEqual
8.11.243 stringToCDATAsection
8.11.244 stringToXMLAttr
8.11.245 stringToXMLAttrWithoutQuotes
8.11.246 stringToXMLCharacterData
8.11.247 stringWithinCData
8.11.248 toHTML
8.11.249 uncapitalise
8.11.250 uncapitaliseInitialGroup
8.11.251 uncapitaliseSecond
8.11.252 uncapitalize
8.11.253 writeStringToFile( File file, String stringToWrite )
8.11.254 writeStringToFile( File file, String stringToWrite, String encoding )
8.11.255 writeStringToFile( String fileName, String stringToWrite )
8.11.256 writeStringToFile( String fileName, String stringToWrite, String encoding )



9 Patterns
9.1 Motivation
9.1.1 Simple XML
9.2 Ways to specify patterns
9.3 The Mechanics of Patterns
9.3.1 Setting the Root Model Object - setPatternRootObject()
9.3.2 Defining a Root Element - addPatternRootElement()
9.3.3 Adding Code and Other Text In Patterns
9.4 Simple Patterns
9.4.1 Singleton
9.5 Patterns In Practice
9.5.1 Generation Automation
9.5.2 Pattern Addition and Modularity
9.5.3 JeeWiz Patterns Require Templates
9.5.4 Modelers Use Styles
9.5.5 MegaPatterns
9.6 Ordering Of Events
9.6.1 Creation
9.6.2 Preparation Phase
9.6.2.1 Downward Sweep
9.6.2.2 Upward Sweep
9.6.3 The Main Pattern Phase
9.6.4 Recursion - Creating Objects with Patterns
9.6.5 Generating Dependent Objects
9.6.6 A worked example
9.7 Classes Generated For Each Entity by the J2EE Maintenance Patterns
9.7.1 The Persistence Tier Classes
9.7.2 The Service Tier Classes
9.7.3 The Presentation Tier Classes
9.7.4 Diagram of the Generated Classes



10 JeeWiz Controls
10.1 Overview
10.1.1 The Devil Is In The Details
10.1.2 Design Alternatives To Controls
10.1.3 Previous Version Controls
10.2 Structure of JeeWiz Controls
10.2.1 Control Files
10.2.2 Parsing and Comments
10.2.3 Extends
10.2.4 Properties
10.2.5 Methods
10.2.6 Aggregating Properties And Methods
10.3 Using Controls
10.3.1 Creating Controls
10.3.2 Creating Control Families in start.vm
10.3.3 Using Properties
10.3.4 Using Properties - Order Of Evaluation
10.3.5 Gotchas



11 How To
11.1 Move Your Working Directory
11.2 Change Naming Standards
11.3 Create A New Project
11.4 Change Templates
11.5 Create Multiple Configurations
11.6 Support A New Application Server
11.7 Debug Templates
11.8 Debug Patterns
11.8.1 The 'dump' Property
11.8.2 The 'tracePatterns' Build Property
11.8.3 Adding to Patterns
11.8.4 If All Else Fails...
11.9 Work With Namespaces In XML Specifications



12 'Base Meta-model for Languages' Reference



13 'Java' Reference
13.1 Constructor Object
13.2 Field Object
13.3 Interface Object
13.4 InterfaceField Object
13.5 InterfaceMethod Object
13.6 Jar Object
13.7 Jwclass Object
13.8 Method Object
13.9 NamedValue Object
13.10 Parameter Object
13.11 ReferenceType Object
13.12 TypeParameter Object



14 'Business Object' Reference
14.1 Application Object
14.2 Assembly Object
14.3 AssociationEnd Object
14.4 AtomicType Object
14.5 Attribute Object
14.6 AttributeCollection Object
14.7 BaseView Object
14.8 BaseViewEnd Object
14.9 BaseViewField Object
14.10 BaseViewRelation Object
14.11 Bean Object
14.12 BomCreator Object
14.13 BusinessMethod Object
14.14 BusinessObject Object
14.15 Constraint Object
14.16 DataView Object
14.17 DataViewEnd Object
14.18 DataViewField Object
14.19 DataViewRelation Object
14.20 DataViewToAttributeMapper Object
14.21 End Object
14.22 Entity Object
14.23 Field Object
14.24 Interface Object
14.25 InternalClass Object
14.26 JarBase Object
14.27 JavaBean Object
14.28 KeyMap Object
14.29 Method Object
14.30 Parameter Object
14.31 Property Object
14.32 Query Object
14.33 Relation Object
14.34 RoleGroup Object
14.35 ServerJar Object
14.36 ServiceTransferObject Object
14.37 Session Object
14.38 StoEnd Object
14.39 StoField Object
14.40 StoRelation Object



15 'Screen' Reference
15.1 Action Object
15.2 Application Object
15.3 Constraint Object
15.4 EventHandler Object
15.5 Field Object
15.6 Forward Object
15.7 Group Object
15.8 Layout Object
15.9 LayoutSection Object
15.10 Menu Object
15.11 MenuItem Object
15.12 Page Object
15.13 Panel Object
15.14 Section Object
15.15 StateObject Object
15.16 TabMenu Object
15.17 UiJar Object
15.18 UiView Object
15.19 UiViewEnd Object
15.20 UiViewField Object
15.21 UiViewRelation Object
15.22 Widget Object
15.23 WizardEvent Object
15.24 WizardPage Object



16 'JeeWiz' Reference
16.1 MetaChoice Object
16.2 MetaClass Object
16.3 MetaContainedElement Object
16.4 MetaContainedElementBase Object
16.5 MetaDescription Object
16.6 MetaElementBase Object
16.7 MetaFactor Object
16.8 MetaList Object
16.9 MetaModel Object
16.10 MetaProperty Object
16.11 MetaPropertyBase Object
16.12 MetaValidator Object



17 'Documentation' Reference
17.1 Description Object
17.2 Index Object
17.3 Link Object
17.4 Page Object
17.5 SectionNumberHolder Object
17.6 Subtitle Object
17.7 SubtitleHolder Object
17.8 Toc Object
17.9 TopTip Object



Copyright (c) 2001-2008 New Technology/enterprise Ltd.