Source Code Cross Referenced for FlatfileTableBeanInfo.java in  » IDE-Netbeans » etl.project » org » netbeans » modules » mashup » db » ui » model » 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 » IDE Netbeans » etl.project » org.netbeans.modules.mashup.db.ui.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *
003:         *          Copyright (c) 2005, SeeBeyond Technology Corporation,
004:         *          All Rights Reserved
005:         *
006:         *          This program, and all the routines referenced herein,
007:         *          are the proprietary properties and trade secrets of
008:         *          SEEBEYOND TECHNOLOGY CORPORATION.
009:         *
010:         *          Except as provided for by license agreement, this
011:         *          program shall not be duplicated, used, or disclosed
012:         *          without  written consent signed by an officer of
013:         *          SEEBEYOND TECHNOLOGY CORPORATION.
014:         *
015:         */
016:        package org.netbeans.modules.mashup.db.ui.model;
017:
018:        import java.beans.BeanDescriptor;
019:        import java.beans.EventSetDescriptor;
020:        import java.beans.IntrospectionException;
021:        import java.beans.MethodDescriptor;
022:        import java.beans.PropertyDescriptor;
023:        import java.beans.SimpleBeanInfo;
024:        import java.util.ArrayList;
025:        import java.util.List;
026:
027:        import net.java.hulp.i18n.Logger;
028:        import org.netbeans.modules.etl.logger.Localizer;
029:        import org.netbeans.modules.etl.logger.LogUtil;
030:
031:        /**
032:         * Abstract BeanInfo implementation to expose read-only access to selected table
033:         * properties.
034:         * 
035:         * @author Jonathan Giron
036:         * @author Ahimanikya Satapathy
037:         * @version $Revision$
038:         */
039:        public abstract class FlatfileTableBeanInfo extends SimpleBeanInfo {
040:
041:            private static PropertyDescriptor[] properties = null;
042:            private static EventSetDescriptor[] eventSets = null;
043:            private static MethodDescriptor[] methods = null;
044:            private static transient final Logger mLogger = LogUtil
045:                    .getLogger(FlatfileTableBeanInfo.class.getName());
046:            private static transient final Localizer mLoc = Localizer.get();
047:
048:            /**
049:             * Gets the bean's <code>BeanDescriptor</code>s.
050:             * 
051:             * @return BeanDescriptor describing the editable properties of this bean. May return
052:             *         null if the information should be obtained by automatic analysis.
053:             */
054:            public abstract BeanDescriptor getBeanDescriptor();
055:
056:            /**
057:             * Gets the bean's <code>PropertyDescriptor</code>s.
058:             * 
059:             * @return An array of PropertyDescriptors describing the editable properties
060:             *         supported by this bean. May return null if the information should be
061:             *         obtained by automatic analysis.
062:             *         <p>
063:             *         If a property is indexed, then its entry in the result array will belong to
064:             *         the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of
065:             *         getPropertyDescriptors can use "instanceof" to check if a given
066:             *         PropertyDescriptor is an IndexedPropertyDescriptor.
067:             */
068:            public PropertyDescriptor[] getPropertyDescriptors() {
069:                if (properties == null) {
070:                    List myProps = new ArrayList();
071:
072:                    try {
073:                        PropertyDescriptor pd = new PropertyDescriptor(
074:                                "tableName", FlatfileTable.class,
075:                                "getTableName", null); // NOI18N
076:                        String nbBundle1 = mLoc.t("PRSR001: Table name");
077:                        String label = Localizer.parse(nbBundle1); // NOI18N
078:                        pd.setDisplayName(label);
079:                        myProps.add(pd);
080:                    } catch (IntrospectionException e) {
081:                    }
082:
083:                    try {
084:                        PropertyDescriptor pd = new PropertyDescriptor(
085:                                "fileType", FlatfileTable.class, "getFileType",
086:                                null); // NOI18N
087:                        String nbBundle2 = mLoc.t("PRSR001: File type");
088:                        String label = Localizer.parse(nbBundle2); // NOI18N
089:                        pd.setDisplayName(label);
090:                        myProps.add(pd);
091:                    } catch (IntrospectionException e) {
092:                    }
093:
094:                    try {
095:                        PropertyDescriptor pd = new PropertyDescriptor(
096:                                "description", FlatfileTable.class,
097:                                "getDescription", null); // NOI18N
098:                        String nbBundle3 = mLoc.t("PRSR001: Description");
099:                        String label = Localizer.parse(nbBundle3); // NOI18N
100:                        pd.setDisplayName(label);
101:                        myProps.add(pd);
102:                    } catch (IntrospectionException ignore) {
103:                    }
104:
105:                    try {
106:                        PropertyDescriptor pd = new PropertyDescriptor(
107:                                "fileName", FlatfileTable.class, "getFileName",
108:                                null); // NOI18N
109:                        String nbBundle4 = mLoc.t("PRSR001: File name");
110:                        String label = Localizer.parse(nbBundle4);// NOI18N
111:                        pd.setDisplayName(label);
112:                        myProps.add(pd);
113:                    } catch (IntrospectionException e) {
114:                    }
115:
116:                    try {
117:                        PropertyDescriptor pd = new PropertyDescriptor(
118:                                "encodingScheme", FlatfileTable.class,
119:                                "getEncodingScheme", null); // NOI18N
120:                        String nbBundle5 = mLoc.t("PRSR001: Encoding scheme");
121:                        String label = Localizer.parse(nbBundle5); // NOI18N
122:                        pd.setDisplayName(label);
123:                        myProps.add(pd);
124:                    } catch (IntrospectionException ignore) {
125:                    }
126:
127:                    try {
128:                        PropertyDescriptor pd = new PropertyDescriptor(
129:                                "rowsToSkip", FlatfileTable.class,
130:                                "getRowsToSkip", null); // NOI18N
131:                        String nbBundle6 = mLoc
132:                                .t("PRSR001: Initial rows to skip");
133:                        String label = Localizer.parse(nbBundle6); // NOI18N
134:                        pd.setDisplayName(label);
135:                        myProps.add(pd);
136:                    } catch (IntrospectionException ignore) {
137:                    }
138:
139:                    try {
140:                        PropertyDescriptor pd = new PropertyDescriptor(
141:                                "maxFaults", FlatfileTable.class,
142:                                "getMaxFaults", null); // NOI18N
143:                        String nbBundle7 = mLoc
144:                                .t("PRSR001: Maximum # faults to tolerate");
145:                        String label = Localizer.parse(nbBundle7); // NOI18N
146:                        pd.setDisplayName(label);
147:                        myProps.add(pd);
148:                    } catch (IntrospectionException ignore) {
149:                    }
150:
151:                    try {
152:                        PropertyDescriptor pd = new PropertyDescriptor(
153:                                "isFirstLineHeader", FlatfileTable.class,
154:                                "isFirstLineHeader", null); // NOI18N
155:                        String nbBundle8 = mLoc
156:                                .t("PRSR001: First line is header");
157:                        String label = Localizer.parse(nbBundle8); // NOI18N
158:                        pd.setDisplayName(label);
159:                        myProps.add(pd);
160:                    } catch (IntrospectionException ignore) {
161:                    }
162:
163:                    try {
164:                        PropertyDescriptor pd = new PropertyDescriptor(
165:                                "recordDelimiter", FlatfileTable.class,
166:                                "getRecordDelimiter", null); // NOI18N
167:                        String nbBundle9 = mLoc.t("PRSR001: Record delimiter");
168:                        String label = Localizer.parse(nbBundle9); // NOI18N
169:                        pd.setDisplayName(label);
170:                        myProps.add(pd);
171:                    } catch (IntrospectionException ignore) {
172:                    }
173:
174:                    try {
175:                        PropertyDescriptor pd = new PropertyDescriptor(
176:                                "trimWhiteSpace", FlatfileTable.class,
177:                                "enableWhiteSpaceTrimming", null); // NOI18N
178:                        String nbBundle10 = mLoc
179:                                .t("PRSR001: Trim white space for columns");
180:                        String label = Localizer.parse(nbBundle10); // NOI18N
181:                        pd.setDisplayName(label);
182:                        myProps.add(pd);
183:                    } catch (IntrospectionException ignore) {
184:                    }
185:
186:                    properties = (PropertyDescriptor[]) myProps
187:                            .toArray(new PropertyDescriptor[myProps.size()]);
188:                }
189:
190:                return properties;
191:            }
192:
193:            /**
194:             * Gets the bean's <code>EventSetDescriptor</code>s.
195:             * 
196:             * @return An array of EventSetDescriptors describing the kinds of events fired by
197:             *         this bean. May return null if the information should be obtained by
198:             *         automatic analysis.
199:             */
200:            public EventSetDescriptor[] getEventSetDescriptors() {
201:                if (eventSets == null) {
202:                    eventSets = new EventSetDescriptor[0];
203:                }
204:
205:                return eventSets;
206:            }
207:
208:            /**
209:             * Gets the bean's <code>MethodDescriptor</code>s.
210:             * 
211:             * @return An array of MethodDescriptors describing the methods implemented by this
212:             *         bean. May return null if the information should be obtained by automatic
213:             *         analysis.
214:             */
215:            public MethodDescriptor[] getMethodDescriptors() {
216:                if (methods == null) {
217:                    methods = new MethodDescriptor[0];
218:                }
219:
220:                return methods;
221:            }
222:        }
w__ww.ja___va_2s__.co___m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.