001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.xml.wsdl.model;
043:
044: import java.util.List;
045: import java.util.Map;
046: import javax.xml.namespace.QName;
047: import org.netbeans.modules.xml.schema.model.ReferenceableSchemaComponent;
048: import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
049: import org.netbeans.modules.xml.xam.dom.DocumentComponent;
050: import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
051:
052: /**
053: *
054: * @author rico
055: * Base interface of all WSDL components
056: */
057: public interface WSDLComponent extends DocumentComponent<WSDLComponent> {
058: public static final String DOCUMENTATION_PROPERTY = "documentation"; //NOI18N
059: public static final String EXTENSIBILITY_ELEMENT_PROPERTY = "extensibilityElement";
060:
061: /**
062: * @return WSDL model.
063: */
064: WSDLModel getModel();
065:
066: void accept(WSDLVisitor visitor);
067:
068: void setDocumentation(Documentation doc);
069:
070: Documentation getDocumentation();
071:
072: /**
073: * Creates a global reference to the given target WSDL component.
074: * @param target the target WSDLComponent
075: * @param type actual type of the target
076: * @return the global reference.
077: */
078: <T extends ReferenceableWSDLComponent> NamedComponentReference<T> createReferenceTo(
079: T target, Class<T> type);
080:
081: /**
082: * Creates a GlobalReference to a Schema component
083: * @param target The schema component that is being referenced.
084: * @param type Class object of the schema component
085: */
086: <T extends ReferenceableSchemaComponent> NamedComponentReference<T> createSchemaReference(
087: T target, Class<T> type);
088:
089: void addExtensibilityElement(ExtensibilityElement ee);
090:
091: void removeExtensibilityElement(ExtensibilityElement ee);
092:
093: List<ExtensibilityElement> getExtensibilityElements();
094:
095: <T extends ExtensibilityElement> List<T> getExtensibilityElements(
096: Class<T> type);
097:
098: /**
099: * Returns map of attribute names and string values.
100: */
101: Map<QName, String> getAttributeMap();
102:
103: }
|