Source Code Cross Referenced for Options.java in  » J2EE » Sofia » com » salmonllc » xml » 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 » J2EE » Sofia » com.salmonllc.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.salmonllc.xml;
002:
003:        /////////////////////////
004:        //$Archive: /SOFIA/SourceCode/com/salmonllc/xml/Options.java $
005:        //$Author: Dan $ 
006:        //$Revision: 10 $ 
007:        //$Modtime: 6/11/03 4:53p $ 
008:        /////////////////////////
009:        import java.util.*;
010:
011:        /**
012:         * This data structure is used to store Option details which can be a part of a Dropdown, readioButtonGroup etc.
013:         * This is used as a corresponding java object for the options.dtd XML schema.
014:         * Creation date: (7/26/01 1:59:20 PM)
015:         * @author: Administrator
016:         */
017:        public class Options extends java.util.Hashtable {
018:            private String fieldType = "";
019:            private String fieldComponent = "";
020:            private String fieldTable = "";
021:            private String fieldInitColumn = "";
022:            private String fieldDescColumn = "";
023:            private boolean fieldMandatory = false;
024:
025:            /**
026:             * Values constructor comment.
027:             */
028:            public Options() {
029:                super ();
030:            }
031:
032:            /**
033:             * Gets the component to be used by options.
034:             * Creation date: (7/26/01 5:23:19 PM)
035:             * @return java.lang.String
036:             */
037:            public java.lang.String getComponent() {
038:                return fieldComponent;
039:            }
040:
041:            /**
042:             * Gets the Table Desctiptor columne name
043:             * Creation date: (7/26/01 5:29:55 PM)
044:             * @return java.lang.String
045:             */
046:            public java.lang.String getDescColumn() {
047:                return fieldDescColumn;
048:            }
049:
050:            /**
051:             * Gets the column name from the XML file which defines the init for this option
052:             * Creation date: (7/26/01 5:28:57 PM)
053:             * @return java.lang.String
054:             */
055:            public java.lang.String getInitColumn() {
056:                return fieldInitColumn;
057:            }
058:
059:            /**
060:             * Gets the Keys mentioned in XML file.
061:             * Creation date: (7/26/01 2:43:22 PM)
062:             * @return int[]
063:             */
064:            public int[] getIntKeys() throws Exception {
065:
066:                Enumeration eKeys = keys();
067:                int[] iKeys = new int[size()];
068:                int count = 0;
069:                while (eKeys.hasMoreElements()) {
070:                    Object objKey = eKeys.nextElement();
071:                    if (objKey instanceof  String) {
072:                        iKeys[count] = (new Integer((String) objKey))
073:                                .intValue();
074:                        count++;
075:                    }
076:                }
077:                return iKeys;
078:            }
079:
080:            /**
081:             * Get the keys in form of strings for all options.
082:             * Creation date: (7/26/01 2:43:22 PM)
083:             * @return int[]
084:             */
085:            public String[] getStringKeys() {
086:
087:                Enumeration eKeys = keys();
088:                String[] sKeys = new String[size()];
089:                int count = 0;
090:                while (eKeys.hasMoreElements()) {
091:                    Object objKey = eKeys.nextElement();
092:                    if (objKey instanceof  String) {
093:                        sKeys[count] = (String) objKey;
094:                        count++;
095:                    }
096:                }
097:                return sKeys;
098:            }
099:
100:            /**
101:             * Gets all the String objects present in form of options
102:             * Creation date: (7/26/01 2:43:22 PM)
103:             * @return int[]
104:             */
105:            public String[] getStringObjects() {
106:
107:                Enumeration eKeys = keys();
108:                String[] sObjects = new String[size()];
109:                int count = 0;
110:                while (eKeys.hasMoreElements()) {
111:                    Object objKey = eKeys.nextElement();
112:                    if (objKey instanceof  String) {
113:                        sObjects[count] = (String) get(objKey);
114:                        count++;
115:                    }
116:                }
117:                return sObjects;
118:
119:            }
120:
121:            /**
122:             * Get the table name used for extracting options
123:             * Creation date: (7/26/01 5:28:57 PM)
124:             * @return java.lang.String
125:             */
126:            public java.lang.String getTable() {
127:                return fieldTable;
128:            }
129:
130:            /**
131:             * Get the type used by the Options
132:             * Creation date: (7/26/01 2:54:31 PM)
133:             * @return java.lang.String
134:             */
135:            public java.lang.String getType() {
136:                return fieldType;
137:            }
138:
139:            /**
140:             * Get the flag if the option selection is mandatory. if false this introduces a bank option at top
141:             * Creation date: (8/10/01 1:55:28 PM)
142:             * @return boolean
143:             */
144:            public boolean isMandatory() {
145:                return fieldMandatory;
146:            }
147:
148:            /**
149:             * Sethe the componentused by the option
150:             * Creation date: (7/26/01 5:23:19 PM)
151:             * @param newComponent java.lang.String
152:             */
153:            public void setComponent(java.lang.String newComponent) {
154:                fieldComponent = newComponent;
155:            }
156:
157:            /**
158:             * Sets the description column used by options if options are retrived from the table
159:             * Creation date: (7/26/01 5:29:55 PM)
160:             * @param newDescColumn java.lang.String
161:             */
162:            public void setDescColumn(java.lang.String newDescColumn) {
163:                fieldDescColumn = newDescColumn;
164:            }
165:
166:            /**
167:             * Sets the init column used by options if options are retrived from the table
168:             * Creation date: (7/26/01 5:28:57 PM)
169:             * @param newInitColumn java.lang.String
170:             */
171:            public void setInitColumn(java.lang.String newInitColumn) {
172:                fieldInitColumn = newInitColumn;
173:            }
174:
175:            /**
176:             * Sets the mandatory flag for options
177:             * Creation date: (8/10/01 1:55:28 PM)
178:             * @param newMandatory boolean
179:             */
180:            public void setMandatory(boolean newMandatory) {
181:                fieldMandatory = newMandatory;
182:            }
183:
184:            /**
185:             * Sets the table name for the options
186:             * Creation date: (7/26/01 5:28:57 PM)
187:             * @param newTable java.lang.String
188:             */
189:            public void setTable(java.lang.String newTable) {
190:                fieldTable = newTable;
191:            }
192:
193:            /**
194:             * Sets the type of options
195:             * Creation date: (7/26/01 2:54:31 PM)
196:             * @param newType java.lang.String
197:             */
198:            public void setType(java.lang.String newType) {
199:                fieldType = newType;
200:            }
201:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.