KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > common > tools > wsdl > Schema


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

17 package org.apache.servicemix.common.tools.wsdl;
18
19 import java.net.URI JavaDoc;
20 import java.util.ArrayList JavaDoc;
21 import java.util.List JavaDoc;
22
23 import org.w3c.dom.Element JavaDoc;
24
25 /**
26  * Contains informations related to a schema.
27  *
28  * @author gnodet
29  */

30 public class Schema {
31
32     private Element JavaDoc root;
33     private String JavaDoc namespace;
34     private List JavaDoc imports;
35     private URI JavaDoc sourceUri;
36     
37     /**
38      * Add a reference to an imported namespace.
39      * @param namespace the namespace to reference
40      */

41     public void addImport(String JavaDoc namespace) {
42         if (imports == null) {
43             imports = new ArrayList JavaDoc();
44         }
45         imports.add(namespace);
46     }
47     
48     /**
49      * @return Returns the imports.
50      */

51     public List JavaDoc getImports() {
52         return imports;
53     }
54
55     /**
56      * @param imports The imports to set.
57      */

58     public void setImports(List JavaDoc imports) {
59         this.imports = imports;
60     }
61
62     /**
63      * @return Returns the root.
64      */

65     public Element JavaDoc getRoot() {
66         return root;
67     }
68
69     /**
70      * @param root The root to set.
71      */

72     public void setRoot(Element JavaDoc root) {
73         this.root = root;
74     }
75
76     /**
77      * @return Returns the namespace.
78      */

79     public String JavaDoc getNamespace() {
80         return namespace;
81     }
82
83     /**
84      * @param namespace The namespace to set.
85      */

86     public void setNamespace(String JavaDoc namespace) {
87         this.namespace = namespace;
88     }
89
90     /**
91      * @return Returns the sourceUri.
92      */

93     public URI JavaDoc getSourceUri() {
94         return sourceUri;
95     }
96
97     /**
98      * @param sourceUri The sourceUri to set.
99      */

100     public void setSourceUri(URI JavaDoc sourceUri) {
101         this.sourceUri = sourceUri;
102     }
103
104 }
105
Popular Tags