Source Code Cross Referenced for Type.java in  » UML » AndroMDA-3.2 » org » andromda » core » cartridge » template » 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 » UML » AndroMDA 3.2 » org.andromda.core.cartridge.template 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.andromda.core.cartridge.template;
002:
003:        import java.util.Collection;
004:        import java.util.LinkedHashMap;
005:        import java.util.Map;
006:
007:        import org.apache.commons.lang.StringUtils;
008:
009:        /**
010:         * Represents the <type/> element nested within the <modelElement/> element.
011:         *
012:         * @author Chad Brandon
013:         * @see ModelElement
014:         */
015:        public class Type {
016:            /**
017:             * The name of this type.
018:             */
019:            private String name;
020:
021:            /**
022:             * Gets the name of this type (typically the fully qualified class name
023:             * of the type).
024:             * 
025:             * @return Returns the name.
026:             */
027:            public String getName() {
028:                return StringUtils.trimToEmpty(name);
029:            }
030:
031:            /**
032:             * Sets the name of this type (this is the fully qualified class name
033:             * of the type).
034:             * 
035:             * @param name The name to set.
036:             */
037:            public void setName(final String name) {
038:                this .name = name;
039:            }
040:
041:            /**
042:             * The properties that must be valid for this type.
043:             */
044:            private final Map properties = new LinkedHashMap();
045:
046:            /**
047:             * Gets the properties defined for this type.
048:             * 
049:             * @return Returns the properties.
050:             */
051:            public Collection getProperties() {
052:                return properties.values();
053:            }
054:
055:            /**
056:             * Adds a property having the given <code>name</code> and <code>value</code>. The <code>value</code> is what the
057:             * property must be in order to be collected.
058:             *
059:             * @param name  the name of the property.
060:             * @param variable the optional variable name in which the contents of this
061:             *        property's value should be stored within a template.
062:             * @param value the option value the property must be in order to be considered <code>valid</code>.
063:             */
064:            public void addProperty(final String name, final String variable,
065:                    final String value) {
066:                if (value != null && !this .properties.containsKey(name)) {
067:                    this .properties.put(name, new Property(name, variable,
068:                            value));
069:                }
070:            }
071:
072:            /**
073:             * Stores and provides access to the type's &lt;property/&gt; elements.
074:             */
075:            public static final class Property {
076:                private String name;
077:                private String variable;
078:                private String value;
079:
080:                Property(final String name, final String variable,
081:                        final String value) {
082:                    this .name = StringUtils.trimToEmpty(name);
083:                    this .variable = StringUtils.trimToEmpty(variable);
084:                    this .value = StringUtils.trimToEmpty(value);
085:                }
086:
087:                /**
088:                 * Gets the value of the <code>name</code> attribute on the <code>property</code> element.
089:                 *
090:                 * @return the name
091:                 */
092:                public String getName() {
093:                    return this .name;
094:                }
095:
096:                /**
097:                 * Gets the variable name under which this property's value (or element if the property 
098:                 * is a collection) should be stored within the template.
099:                 *
100:                 * @return the variable name.
101:                 */
102:                public String getVariable() {
103:                    return this .variable;
104:                }
105:
106:                /**
107:                 * Gets the value of the <code>value</code> attribute defined on the <code>property</code> element.
108:                 *
109:                 * @return the value
110:                 */
111:                public String getValue() {
112:                    return this.value;
113:                }
114:            }
115:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.