KickJava   Java API By Example, From Geeks To Geeks.

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


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.XSAppinfo;
20 import org.apache.ws.jaxme.xs.XSObject;
21 import org.apache.ws.jaxme.xs.xml.XsAnyURI;
22 import org.apache.ws.jaxme.xs.xml.XsEAppinfo;
23
24
25 /**
26  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
27  */

28 public class XSAppinfoImpl extends XSObjectImpl implements XSAppinfo {
29   /** <p>Creates a new instance of XSAppinfoImpl.</p>
30    */

31   protected XSAppinfoImpl(XSObject pParent, XsEAppinfo pBaseObject) {
32     super(pParent, pBaseObject);
33   }
34
35   public XsAnyURI getSource() {
36     return ((XsEAppinfo) getXsObject()).getSource();
37   }
38
39   public Object JavaDoc[] getChilds() {
40     return ((XsEAppinfo) getXsObject()).getChilds();
41   }
42
43   public String JavaDoc getText() {
44     StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
45     Object JavaDoc[] childs = ((XsEAppinfo) getXsObject()).getChilds();
46     for (int i = 0; i < childs.length; i++) {
47       if (childs[i] instanceof String JavaDoc) {
48         sb.append((String JavaDoc) childs[i]);
49       }
50     }
51     return sb.toString();
52   }
53 }
54
Popular Tags