KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > model > WSDLModel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.wsdl.model;
21
22 import java.util.List JavaDoc;
23 import javax.xml.namespace.QName JavaDoc;
24 import org.netbeans.modules.xml.schema.model.Schema;
25 import org.netbeans.modules.xml.xam.ModelSource;
26 import org.netbeans.modules.xml.xam.Referenceable;
27 import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
28
29 /**
30  *
31  * @author rico
32  * This interface represents an instance of a wsdl model. A wsdl model is
33  * bound to a single file.
34  */

35 public abstract class WSDLModel extends AbstractDocumentModel<WSDLComponent> implements Referenceable {
36     
37     protected WSDLModel(ModelSource source) {
38         super(source);
39     }
40     
41     /**
42      * @return WSDL model root component 'definitions'
43      */

44     public abstract Definitions getDefinitions();
45     
46     /**
47      * @return WSDL component factory.
48      */

49     public abstract WSDLComponentFactory getFactory();
50     
51     /**
52      * Search from all imported WSDL models those with specified target namespace.
53      * @param namespaceURI the target namespace to search for model
54      * @return list WSDL models or empty list if none found.
55      */

56     public abstract List JavaDoc<WSDLModel> findWSDLModel(String JavaDoc namespaceURI);
57     
58     /**
59      * Search for all schemas visible from imported/included/redefined in the
60      * schema extensibility elements. Schema model imported through wsdl:import
61      * are also in the search.
62      * @param namespaceURI the target namespace to search for model
63      * @return list of schema match the give namespace.
64      */

65     public abstract List JavaDoc<Schema> findSchemas(String JavaDoc namespaceURI);
66     
67     /**
68      * Find named WSDL component by name and type within current model.
69      * @param name local name of target component
70      * @param type type of target component
71      * @return WSDL component of specified type and name; null if not found.
72      */

73     public abstract <T extends ReferenceableWSDLComponent> T findComponentByName(String JavaDoc name, Class JavaDoc<T> type);
74     
75     /**
76      * Find named WSDL component by QName and type.
77      * @param name QName of the target component.
78      * @param type type of target component
79      * @return WSDL component of specified type and name; null if not found.
80      */

81     public abstract <T extends ReferenceableWSDLComponent> T findComponentByName(QName JavaDoc name, Class JavaDoc<T> type);
82 }
83
Popular Tags