Source Code Cross Referenced for ModelGroupImpl.java in  » 6.0-JDK-Modules » jaxb-xjc » com » sun » xml » xsom » impl » 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 » 6.0 JDK Modules » jaxb xjc » com.sun.xml.xsom.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms
003:         * of the Common Development and Distribution License
004:         * (the "License").  You may not use this file except
005:         * in compliance with the License.
006:         * 
007:         * You can obtain a copy of the license at
008:         * https://jwsdp.dev.java.net/CDDLv1.0.html
009:         * See the License for the specific language governing
010:         * permissions and limitations under the License.
011:         * 
012:         * When distributing Covered Code, include this CDDL
013:         * HEADER in each file and include the License file at
014:         * https://jwsdp.dev.java.net/CDDLv1.0.html  If applicable,
015:         * add the following below this CDDL HEADER, with the
016:         * fields enclosed by brackets "[]" replaced with your
017:         * own identifying information: Portions Copyright [yyyy]
018:         * [name of copyright owner]
019:         */
020:        package com.sun.xml.xsom.impl;
021:
022:        import com.sun.xml.xsom.XSElementDecl;
023:        import com.sun.xml.xsom.XSModelGroup;
024:        import com.sun.xml.xsom.XSModelGroupDecl;
025:        import com.sun.xml.xsom.XSParticle;
026:        import com.sun.xml.xsom.XSTerm;
027:        import com.sun.xml.xsom.XSWildcard;
028:        import com.sun.xml.xsom.impl.parser.SchemaDocumentImpl;
029:        import com.sun.xml.xsom.visitor.XSFunction;
030:        import com.sun.xml.xsom.visitor.XSTermFunction;
031:        import com.sun.xml.xsom.visitor.XSTermFunctionWithParam;
032:        import com.sun.xml.xsom.visitor.XSTermVisitor;
033:        import com.sun.xml.xsom.visitor.XSVisitor;
034:        import org.xml.sax.Locator;
035:
036:        import java.util.Arrays;
037:        import java.util.Iterator;
038:
039:        public class ModelGroupImpl extends ComponentImpl implements 
040:                XSModelGroup, Ref.Term {
041:            public ModelGroupImpl(SchemaDocumentImpl owner,
042:                    AnnotationImpl _annon, Locator _loc,
043:                    ForeignAttributesImpl _fa, Compositor _compositor,
044:                    ParticleImpl[] _children) {
045:
046:                super (owner, _annon, _loc, _fa);
047:                this .compositor = _compositor;
048:                this .children = _children;
049:
050:                if (compositor == null)
051:                    throw new IllegalArgumentException();
052:                for (int i = children.length - 1; i >= 0; i--)
053:                    if (children[i] == null)
054:                        throw new IllegalArgumentException();
055:            }
056:
057:            private final ParticleImpl[] children;
058:
059:            public ParticleImpl getChild(int idx) {
060:                return children[idx];
061:            }
062:
063:            public int getSize() {
064:                return children.length;
065:            }
066:
067:            public ParticleImpl[] getChildren() {
068:                return children;
069:            }
070:
071:            private final Compositor compositor;
072:
073:            public Compositor getCompositor() {
074:                return compositor;
075:            }
076:
077:            public void redefine(ModelGroupDeclImpl oldMG) {
078:                for (ParticleImpl p : children)
079:                    p.redefine(oldMG);
080:            }
081:
082:            public Iterator<XSParticle> iterator() {
083:                return Arrays.asList((XSParticle[]) children).iterator();
084:            }
085:
086:            public boolean isWildcard() {
087:                return false;
088:            }
089:
090:            public boolean isModelGroupDecl() {
091:                return false;
092:            }
093:
094:            public boolean isModelGroup() {
095:                return true;
096:            }
097:
098:            public boolean isElementDecl() {
099:                return false;
100:            }
101:
102:            public XSWildcard asWildcard() {
103:                return null;
104:            }
105:
106:            public XSModelGroupDecl asModelGroupDecl() {
107:                return null;
108:            }
109:
110:            public XSModelGroup asModelGroup() {
111:                return this ;
112:            }
113:
114:            public XSElementDecl asElementDecl() {
115:                return null;
116:            }
117:
118:            public void visit(XSVisitor visitor) {
119:                visitor.modelGroup(this );
120:            }
121:
122:            public void visit(XSTermVisitor visitor) {
123:                visitor.modelGroup(this );
124:            }
125:
126:            public Object apply(XSTermFunction function) {
127:                return function.modelGroup(this );
128:            }
129:
130:            public <T, P> T apply(XSTermFunctionWithParam<T, P> function,
131:                    P param) {
132:                return function.modelGroup(this , param);
133:            }
134:
135:            public Object apply(XSFunction function) {
136:                return function.modelGroup(this );
137:            }
138:
139:            // Ref.Term implementation
140:            public XSTerm getTerm() {
141:                return this;
142:            }
143:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.