KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > impl > XSAnnotationImpl


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.xs.impl;
18
19 import org.apache.ws.jaxme.xs.XSAnnotation;
20 import org.apache.ws.jaxme.xs.XSAppinfo;
21 import org.apache.ws.jaxme.xs.XSDocumentation;
22 import org.apache.ws.jaxme.xs.XSObject;
23 import org.apache.ws.jaxme.xs.xml.XsEAnnotation;
24 import org.apache.ws.jaxme.xs.xml.XsEAppinfo;
25 import org.apache.ws.jaxme.xs.xml.XsEDocumentation;
26 import org.xml.sax.SAXException JavaDoc;
27
28
29 /**
30  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
31  */

32 public class XSAnnotationImpl extends XSOpenAttrsImpl implements XSAnnotation {
33   private final XSAppinfo[] appinfos;
34   private final XSDocumentation[] documentations;
35
36   protected XSAnnotationImpl(XSObject pParent, XsEAnnotation pBaseAnnotation) throws SAXException JavaDoc {
37     super(pParent, pBaseAnnotation);
38
39     XsEDocumentation[] xsDocumentations = ((XsEAnnotation) getXsObject()).getDocumentations();
40     documentations = new XSDocumentation[xsDocumentations.length];
41     for (int i = 0; i < xsDocumentations.length; i++) {
42       documentations[i] = getXSSchema().getXSObjectFactory().newXSDocumentation(this, xsDocumentations[i]);
43     }
44
45     XsEAppinfo[] xsAppinfos = ((XsEAnnotation) getXsObject()).getAppinfos();
46     appinfos = new XSAppinfo[xsAppinfos.length];
47     for (int i = 0; i < xsAppinfos.length; i++) {
48       XsEAppinfo xsAppinfo = xsAppinfos[i];
49       XSAppinfo appinfo = getXSSchema().getXSObjectFactory().newXSAppinfo(this, xsAppinfo);
50       appinfos[i] = appinfo;
51     }
52   }
53
54   public XSDocumentation[] getDocumentations() {
55     return documentations;
56   }
57
58   public XSAppinfo[] getAppinfos() {
59     return appinfos;
60   }
61
62   public void validate() throws SAXException JavaDoc {
63   }
64 }
65
Popular Tags