Source Code Cross Referenced for HCElementRestrictions.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » webapp » jonasadmin » xml » xs » hardcoded » 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 » JOnAS 4.8.6 » org.objectweb.jonas.webapp.jonasadmin.xml.xs.hardcoded 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * JOnAS: Java(TM) Open Application Server
003:         * Copyright (C) 2005 Bull S.A.
004:         * Contact: jonas-team@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: HCElementRestrictions.java 7521 2005-10-19 02:14:21Z pasmith $
023:         * --------------------------------------------------------------------------
024:         */package org.objectweb.jonas.webapp.jonasadmin.xml.xs.hardcoded;
025:
026:        import java.util.List;
027:
028:        import org.objectweb.jonas.webapp.jonasadmin.xml.xs.ElementRestrictions;
029:
030:        /**
031:         * Represents schema restrictions for a single element. The restrictions are
032:         * hard coded.
033:         *
034:         * @author Gregory Lapouchnian
035:         * @author Patrick Smith
036:         */
037:        /**
038:         * @author pasmith
039:         *
040:         * TODO To change the template for this generated type comment go to
041:         * Window - Preferences - Java - Code Style - Code Templates
042:         */
043:        public class HCElementRestrictions implements  ElementRestrictions {
044:
045:            /** The name of the element. */
046:            private String name;
047:
048:            /** is this element complex */
049:            private boolean isComplex = false;
050:
051:            /** is this element a sequence */
052:            private boolean isSequence = false;
053:
054:            /** The children of this element. */
055:            private List children;
056:
057:            /** The attributes of this element.*/
058:            private List attributes;
059:
060:            /**
061:             * Makes a new Hard coded element restriction.
062:             * @param name the name of the element.
063:             * @param complex is this element complex.
064:             * @param children the children of this element.
065:             * @param attrs the attributes of this element.
066:             */
067:            public HCElementRestrictions(String name, boolean complex,
068:                    List children, List attrs) {
069:                this .name = name;
070:                this .isComplex = complex;
071:                this .children = children;
072:                this .attributes = attrs;
073:            }
074:
075:            /**
076:             * Is this element a simple type with no attributes.
077:             * @return true if this element is simple with no attributes, false otherwise.
078:             */
079:            public boolean isSimpleAndNoAttributes() {
080:                return (children == null && attributes == null);
081:            }
082:
083:            /**
084:             * Returns a list of children for this element.
085:             * @return a list of children for this element.
086:             */
087:            public List getChildren() {
088:                return children;
089:            }
090:
091:            /**
092:             * Set the list of children for this element.
093:             * @param children the list of children for this element.
094:             */
095:            public void setChildren(List children) {
096:                if (isComplex()) {
097:                    this .children = children;
098:                }
099:            }
100:
101:            /**
102:             * Is this element complex.
103:             * @return true if this element is complex.
104:             */
105:            public boolean isComplex() {
106:                return isComplex;
107:            }
108:
109:            /**
110:             * Sets if this element is complex or not.
111:             * @param isComplex if this element is complex or not.
112:             */
113:            public void setComplex(boolean isComplex) {
114:                this .isComplex = isComplex;
115:            }
116:
117:            /**
118:             * Returns the name of this element
119:             * @return the name of this element.
120:             */
121:            public String getName() {
122:                return name;
123:            }
124:
125:            /**
126:             * sets the name of this element.
127:             * @param name the name of this element.
128:             */
129:            public void setName(String name) {
130:                this .name = name;
131:            }
132:
133:            /**
134:             * Returns the list of attributes for this element.
135:             * @return the list of attributes for this element.
136:             */
137:            public List getAttributes() {
138:                return attributes;
139:            }
140:
141:            /**
142:             * Sets the list of elements for this element.
143:             * @param attributes the list of attributs to set for this element.
144:             */
145:            public void setAttributes(List attributes) {
146:                this .attributes = attributes;
147:            }
148:
149:            /**
150:             * Returns the min occurances for this element.
151:             * @return the min occurances for this element.
152:             */
153:            public int getMinOccurs() {
154:                return 0;
155:            }
156:
157:            /**
158:             * Sets the min occurances for this element.
159:             * @param min the min occurances for this element.
160:             */
161:            public void setMinOccurs(int min) {
162:                // TODO Auto-generated method stub
163:            }
164:
165:            /**
166:             * Returns the max occurances for this element.
167:             * @return the max occurances for this element.
168:             */
169:            public int getMaxOccurs() {
170:                return 0;
171:            }
172:
173:            /**
174:             * Sets the max occurances for this element.
175:             * @param min the max occurances for this element.
176:             */
177:            public void setMaxOccurs(int min) {
178:                // TODO Auto-generated method stub
179:            }
180:
181:            /**
182:             * Returns if this element is a sequence or not.
183:             * @return true if this element is a sequence.
184:             */
185:            public boolean isSequence() {
186:                return isSequence;
187:            }
188:
189:            /**
190:             * Sets if this element is a sequence.
191:             * @param isSequence the value to set if this element is a sequence.
192:             */
193:            public void setSequence(boolean isSequence) {
194:                this.isSequence = isSequence;
195:            }
196:        }
www_._jav___a___2_s.__c__o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.