Source Code Cross Referenced for FixedWidthFlatfileBeanInfo.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.IntrospectionException;
020:        import java.beans.PropertyDescriptor;
021:        import java.util.ArrayList;
022:        import java.util.Arrays;
023:        import java.util.List;
024:
025:        import net.java.hulp.i18n.Logger;
026:        import org.netbeans.modules.etl.logger.Localizer;
027:        import org.netbeans.modules.etl.logger.LogUtil;
028:
029:        /**
030:         * Concrete class to expose fixedwidth-specific flatfile table properties. TODO Extend
031:         * this class to expose setters for read-write property sheets
032:         * (MutableFixedWidthFlatfileBeanInfo?)
033:         * 
034:         * @author Jonathan Giron
035:         * @version $Revision$
036:         */
037:        public class FixedWidthFlatfileBeanInfo extends FlatfileTableBeanInfo {
038:
039:            private static BeanDescriptor beanDescriptor = null;
040:            private static transient final Logger mLogger = LogUtil
041:                    .getLogger(FixedWidthFlatfileBeanInfo.class.getName());
042:            private static transient final Localizer mLoc = Localizer.get();
043:            private static PropertyDescriptor[] properties = null;
044:
045:            /**
046:             * Gets the bean's <code>BeanDescriptor</code>s.
047:             * 
048:             * @return BeanDescriptor describing the editable properties of this bean. May return
049:             *         null if the information should be obtained by automatic analysis.
050:             */
051:            public BeanDescriptor getBeanDescriptor() {
052:                if (beanDescriptor == null) {
053:                    beanDescriptor = new BeanDescriptor(
054:                            FixedWidthFlatfile.class);
055:                }
056:
057:                return beanDescriptor;
058:            }
059:
060:            /**
061:             * Gets the bean's <code>PropertyDescriptor</code>s.
062:             * 
063:             * @return An array of PropertyDescriptors describing the editable properties
064:             *         supported by this bean. May return null if the information should be
065:             *         obtained by automatic analysis.
066:             *         <p>
067:             *         If a property is indexed, then its entry in the result array will belong to
068:             *         the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of
069:             *         getPropertyDescriptors can use "instanceof" to check if a given
070:             *         PropertyDescriptor is an IndexedPropertyDescriptor.
071:             */
072:            public PropertyDescriptor[] getPropertyDescriptors() {
073:                if (properties == null) {
074:                    List myProps = new ArrayList(Arrays.asList(super 
075:                            .getPropertyDescriptors()));
076:                    String nbBundle1 = mLoc.t("PRSR001: Record length");
077:                    try {
078:                        // This is a derived property and should not be writable
079:                        PropertyDescriptor pd = new PropertyDescriptor(
080:                                "recordLength", FixedWidthFlatfile.class,
081:                                "getRecordLength", null); // NOI18N
082:                        String label = Localizer.parse(nbBundle1); // NOI18N
083:                        pd.setDisplayName(label);
084:                        myProps.add(pd);
085:                    } catch (IntrospectionException ignore) {
086:                    }
087:
088:                    String nbBundle2 = mLoc.t("PRSR001: Header bytes to skip");
089:                    try {
090:                        PropertyDescriptor pd = new PropertyDescriptor(
091:                                "headerBytesOffset", FixedWidthFlatfile.class,
092:                                "getHeaderBytesOffset", null); // NOI18N
093:                        String label = Localizer.parse(nbBundle2); // NOI18N
094:                        pd.setDisplayName(label);
095:                        myProps.add(pd);
096:                    } catch (IntrospectionException ignore) {
097:                    }
098:
099:                    properties = (PropertyDescriptor[]) myProps
100:                            .toArray(new PropertyDescriptor[myProps.size()]);
101:                }
102:
103:                return properties;
104:            }
105:        }
w___w__w__.__j___a__v__a2__s__._c___om | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.