001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: /**
021: *
022: */package org.netbeans.modules.bpel.model.api;
023:
024: import org.netbeans.modules.bpel.model.api.events.VetoException;
025:
026: /**
027: * @author ads
028: * <p>
029: * The <import> element is used within a WS-BPEL process to
030: * explicitly indicate a dependency on external XML Schema or WSDL
031: * definitions. Any number of <import> elements may appear as
032: * initial children of the <process> element, before any other
033: * child element. Each <import> element contains a mandatory and
034: * two optional attributes.
035: * </p>
036: * <p>
037: * <li>"namespace". The namespace attribute specifies an absolute URI
038: * that identifies the imported definitions. This attribute is optional.
039: * An import element without<span style=""> </span>a namespace
040: * attribute indicates that external definitions are in use which are
041: * not namespace qualified.</li>
042: * </p>
043: * <p>
044: * <li>"location". The location attribute contains a URI indicating the
045: * location of a document that contains relevant definitions in the
046: * namespace specified. The location URI may be a relative URI,
047: * following the usual rules for resolution of the URI base (XML Base
048: * and RFC 2396). The location attribute is optional. An import element
049: * without a location attribute indicates that external definitions are
050: * used by the process but makes no statement about where those
051: * definitions may be found. The document located at the location URI
052: * MUST identify the definitions it contains with a URI matching the URI
053: * indicated by the namespace attribute. The location attribute is a
054: * hint and that the BPEL Processor is not required to retrieve the
055: * document being imported from the specified location.</li>
056: * </p>
057: * <p>
058: * <li>"importType". The importType attribute identifies the type of
059: * document being imported by providing an absolute URI that identifies
060: * the encoding language used in the document. The value of the
061: * importType attribute MUST be set to
062: * "http://www.w3.org/2001/XMLSchema"; when importing XML Schema 1.0
063: * documents, and to "http://schemas.xmlsoap.org/wsdl/"; when importing
064: * WSDL 1.1 documents. Note: other importType URI values MAY be used
065: * here. </li>
066: * </p>
067: * <p>
068: * Observe that according to these rules, it is permissible to have an
069: * import element without namespace and location attributes, and only
070: * containing an importType attribute. Such an import element indicates
071: * that external definitions of the indicated type are in use which are
072: * not namespace qualified, and makes no statement about where those
073: * definitions may be found.
074: * </p>
075: * <p>
076: * A BPEL process definition MUST import all XML Schema and WSDL
077: * definitions it uses. This includes all XML Schema type and element
078: * definitions, all WSLD port types and message types as well as
079: * property and property alias definitions used by the process. In order
080: * to support the use of definitions from namespaces spanning multiple
081: * documents, a BPEL process MAY include more than one import
082: * declarations for the same namespace and importType, provided that
083: * those declarations include different location values. Import elements
084: * are conceptually unordered. It is an error if the imported documents
085: * contain conflicting definitions of a component used by the importing
086: * process definition (as could be caused, for example, when the XSD
087: * redefinition mechanism is used).
088: * <p>
089: * Java class for tImport complex type.
090: * <p>
091: * The following schema fragment specifies the expected content
092: * contained within this class.
093: *
094: * <pre>
095: * <complexType name="tImport">
096: * <complexContent>
097: * <extension base="{http://docs.oasis-open.org/wsbpel/2.0/process/executable}tExtensibleElements">
098: * <attribute name="importType" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
099: * <attribute name="location" use="optional" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
100: * <attribute name="namespace" use="optional" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
101: * </extension>
102: * </complexContent>
103: * </complexType>
104: * </pre>
105: */
106: public interface Import extends ExtensibleElements, NamespaceSpec {
107:
108: String LOCATION = "location"; // NOI18N
109:
110: String IMPORT_TYPE = "importType"; // NOI18N
111:
112: /**
113: * This type should be used for xsd document.
114: */
115: String SCHEMA_IMPORT_TYPE = "http://www.w3.org/2001/XMLSchema"; // NOI18N
116:
117: /**
118: * This type should be used for wsdl document.
119: */
120: String WSDL_IMPORT_TYPE = "http://schemas.xmlsoap.org/wsdl/"; // NOI18N
121:
122: /**
123: * Getter for "location" attribute.
124: *
125: * @return "location" attribute value.
126: */
127: String getLocation();
128:
129: /**
130: * Setter for "location" attribute.
131: *
132: * @param value
133: * New "location" attribute value.
134: * @throws VetoException
135: * Will be thrown if value is not acceptable as value here.
136: */
137: void setLocation(String value) throws VetoException;
138:
139: /**
140: * Removes "location" attribute.
141: */
142: void removeLocation();
143:
144: /**
145: * Getter for ""importType" attribute.
146: *
147: * @return "importType" attribute value.
148: */
149: String getImportType();
150:
151: /**
152: * Setter for ""importType" attribute.
153: *
154: * @param value
155: * New "importType" attribute value.
156: * @throws VetoException
157: * Will be thrown if value is not acceptable as value here.
158: */
159: void setImportType(String value) throws VetoException;
160:
161: /**
162: * Removes "namespace" attribute.
163: */
164: void removeNamespace();
165: }
|