Source Code Cross Referenced for Descriptor.java in  » Library » Apache-commons-betwixt-0.8-src » org » apache » commons » betwixt » 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 » Library » Apache commons betwixt 0.8 src » org.apache.commons.betwixt 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.commons.betwixt;
018:
019:        import org.apache.commons.betwixt.expression.Expression;
020:        import org.apache.commons.betwixt.expression.Updater;
021:
022:        /** <p>Describes a content node mapping.</p>
023:         * Common superclass for types of <code>Descriptor</code></p>
024:         *
025:         * @author Robert Burrell Donkin
026:         * @since 0.5
027:         */
028:        public abstract class Descriptor {
029:
030:            /** the expression used to evaluate the text value of this node */
031:            private Expression textExpression;
032:            /** the updater used to update the current bean from the text value of this node */
033:            private Updater updater;
034:            /** The property expression to which this node refers to, or null if it is just a constant */
035:            private String propertyName;
036:            /** the property type associated with this node, if any */
037:            private Class propertyType;
038:            /** the singular property type (i.e. the type ignoring the Collection or Array */
039:            private Class singularPropertyType;
040:            /** Options set for this Descriptor */
041:            private Options options = new Options();
042:
043:            /** Base constructor */
044:            public Descriptor() {
045:            }
046:
047:            /** 
048:             * Gets the expression used to evaluate the text value of this node 
049:             * for a particular <code>Context</code>.
050:             * @return the expression used to evaluate the text value of this node 
051:             */
052:            public Expression getTextExpression() {
053:                return textExpression;
054:            }
055:
056:            /** 
057:             * Sets the expression used to evaluate the text value of this node
058:             * for a particular <code>Context</code>
059:             * @param textExpression the Expression to be used to evaluate the value of this node
060:             */
061:            public void setTextExpression(Expression textExpression) {
062:                this .textExpression = textExpression;
063:            }
064:
065:            /** 
066:             * Gets the <code>Updater</code> used to update a <code>Context</code> from the text value
067:             * corresponding to this node in an xml document
068:             * @return the Update that should be used to update the value of this node
069:             */
070:            public Updater getUpdater() {
071:                return updater;
072:            }
073:
074:            /**
075:             * Sets the <code>Updater</code> used to update a <code>Context</code> from the text value
076:             * corresponding to this node in an xml document
077:             * @param updater the Updater to be used to update the values of this node
078:             */
079:            public void setUpdater(Updater updater) {
080:                this .updater = updater;
081:            }
082:
083:            /** 
084:             * Gets the type of the bean property associated with this node, if any
085:             * @return the property type associated with this node, if any 
086:             */
087:            public Class getPropertyType() {
088:                return propertyType;
089:            }
090:
091:            /** 
092:             * Sets the type of the bean property associated with this node, if any 
093:             * @param propertyType the Class of the bean property
094:             */
095:            public void setPropertyType(Class propertyType) {
096:                this .propertyType = propertyType;
097:            }
098:
099:            /** 
100:             * Gets the name of the bean property to which this node refers
101:             * @return the name of the bean property to which this node refers to, 
102:             * or null if it is just a constant 
103:             */
104:            public String getPropertyName() {
105:                return propertyName;
106:            }
107:
108:            /** 
109:             * Sets the name of the bean property to which this node refers
110:             * @param propertyName the name of the bean property. 
111:             * Or null, if this node is not mapped to to a bean property
112:             */
113:            public void setPropertyName(String propertyName) {
114:                this .propertyName = propertyName;
115:            }
116:
117:            /** 
118:             * Gets the underlying type ignoring any wrapping a Collection or Array.
119:             *
120:             * @return if this property is a 1-N relationship then this returns the type
121:             * of a single property value.
122:             */
123:            public Class getSingularPropertyType() {
124:                if (singularPropertyType == null) {
125:                    return getPropertyType();
126:                }
127:                return singularPropertyType;
128:            }
129:
130:            /** 
131:             * Sets the underlying type ignoring any wrapping Collection or Array.
132:             *
133:             * @param singularPropertyType the Class of the items in the Collection or Array. 
134:             * If node is associated with a collective bean property, then this should not be null.
135:             */
136:            public void setSingularPropertyType(Class singularPropertyType) {
137:                this .singularPropertyType = singularPropertyType;
138:            }
139:
140:            /**
141:             * Gets the options for this descriptor.
142:             * Options are used to communicate non-declarative
143:             * (optinal) behaviour hints.
144:             * @return <code>Options</code>, not null
145:             */
146:            public Options getOptions() {
147:                return options;
148:            }
149:
150:            /**
151:             * Sets the options for this descriptor.
152:             * Options are used to communicate non-declarative
153:             * (optinal) behaviour hints.
154:             * @param options
155:             */
156:            public void setOptions(Options options) {
157:                this.options = options;
158:            }
159:
160:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.