servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r359666 - in /incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl: ./ DocumentRootImpl.java JbiAssemblyFactoryImpl.java JbiAssemblyPackageImpl.java JbiBindingImpl.java
Date Wed, 28 Dec 2005 23:52:00 GMT
Author: gnodet
Date: Wed Dec 28 15:51:57 2005
New Revision: 359666

URL: http://svn.apache.org/viewcvs?rev=359666&view=rev
Log:
Add missing files

Added:
    incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/
    incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/DocumentRootImpl.java
    incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyFactoryImpl.java
    incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyPackageImpl.java
    incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiBindingImpl.java

Added: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/DocumentRootImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/DocumentRootImpl.java?rev=359666&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/DocumentRootImpl.java
(added)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/DocumentRootImpl.java
Wed Dec 28 15:51:57 2005
@@ -0,0 +1,310 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.sca.assembly.sdo.impl;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.servicemix.sca.assembly.sdo.DocumentRoot;
+import org.apache.servicemix.sca.assembly.sdo.JbiAssemblyPackage;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
+import org.eclipse.emf.ecore.sdo.impl.EDataObjectImpl;
+import org.eclipse.emf.ecore.sdo.util.BasicESequence;
+import org.eclipse.emf.ecore.sdo.util.ESequence;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.osoa.sca.model.JbiBinding;
+
+import commonj.sdo.Sequence;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Document Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p/>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link DocumentRootImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link DocumentRootImpl#getBindingWs <em>Binding Ws</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DocumentRootImpl extends EDataObjectImpl implements DocumentRoot {
+    /**
+     * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute
list.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getMixed()
+     */
+    protected ESequence mixed = null;
+
+    /**
+     * The cached value of the '{@link #getXMLNSPrefixMap() <em>XMLNS Prefix Map</em>}'
map.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getXMLNSPrefixMap()
+     */
+    protected EMap xMLNSPrefixMap = null;
+
+    /**
+     * The cached value of the '{@link #getXSISchemaLocation() <em>XSI Schema Location</em>}'
map.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getXSISchemaLocation()
+     */
+    protected EMap xSISchemaLocation = null;
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    protected DocumentRootImpl() {
+        super();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    protected EClass eStaticClass() {
+        return JbiAssemblyPackage.eINSTANCE.getDocumentRoot();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Sequence getMixed() {
+        if (mixed == null) {
+            mixed = new BasicESequence(new BasicFeatureMap(this, JbiAssemblyPackage.DOCUMENT_ROOT__MIXED));
+        }
+        return mixed;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Map getXMLNSPrefixMap() {
+        if (xMLNSPrefixMap == null) {
+            xMLNSPrefixMap = new EcoreEMap(EcorePackage.eINSTANCE.getEStringToStringMapEntry(),
EStringToStringMapEntryImpl.class, this, JbiAssemblyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+        }
+        return xMLNSPrefixMap.map();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Map getXSISchemaLocation() {
+        if (xSISchemaLocation == null) {
+            xSISchemaLocation = new EcoreEMap(EcorePackage.eINSTANCE.getEStringToStringMapEntry(),
EStringToStringMapEntryImpl.class, this, JbiAssemblyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+        }
+        return xSISchemaLocation.map();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public JbiBinding getBindingJbi() {
+        return (JbiBinding) ((ESequence) getMixed()).featureMap().get(JbiAssemblyPackage.eINSTANCE.getDocumentRoot_BindingJbi(),
true);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public NotificationChain basicSetBindingJbi(JbiBinding newBindingJbi, NotificationChain
msgs) {
+        return ((FeatureMap.Internal) ((ESequence) getMixed()).featureMap()).basicAdd(JbiAssemblyPackage.eINSTANCE.getDocumentRoot_BindingJbi(),
newBindingJbi, msgs);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void setBindingJbi(org.osoa.sca.model.JbiBinding newBindingJbi) {
+        ((FeatureMap.Internal) ((ESequence) getMixed()).featureMap()).set(JbiAssemblyPackage.eINSTANCE.getDocumentRoot_BindingJbi(),
newBindingJbi);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class
baseClass, NotificationChain msgs) {
+        if (featureID >= 0) {
+            switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
+            case JbiAssemblyPackage.DOCUMENT_ROOT__MIXED:
+                return ((InternalEList) ((ESequence) getMixed()).featureMap()).basicRemove(otherEnd,
msgs);
+            case JbiAssemblyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+                return ((InternalEList) ((EMap.InternalMapView) getXMLNSPrefixMap()).eMap()).basicRemove(otherEnd,
msgs);
+            case JbiAssemblyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+                return ((InternalEList) ((EMap.InternalMapView) getXSISchemaLocation()).eMap()).basicRemove(otherEnd,
msgs);
+            case JbiAssemblyPackage.DOCUMENT_ROOT__BINDING_JBI:
+                return basicSetBindingJbi(null, msgs);
+            default:
+                return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
+            }
+        }
+        return eBasicSetContainer(null, featureID, msgs);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Object eGet(EStructuralFeature eFeature, boolean resolve) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.DOCUMENT_ROOT__MIXED:
+            return ((ESequence) getMixed()).featureMap();
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+            return ((EMap.InternalMapView) getXMLNSPrefixMap()).eMap();
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+            return ((EMap.InternalMapView) getXSISchemaLocation()).eMap();
+        case JbiAssemblyPackage.DOCUMENT_ROOT__BINDING_JBI:
+            return getBindingJbi();
+        }
+        return eDynamicGet(eFeature, resolve);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void eSet(EStructuralFeature eFeature, Object newValue) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.DOCUMENT_ROOT__MIXED:
+            ((ESequence) getMixed()).featureMap().clear();
+            ((ESequence) getMixed()).featureMap().addAll((Collection) newValue);
+            return;
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+            getXMLNSPrefixMap().clear();
+            ((EMap.InternalMapView) getXMLNSPrefixMap()).eMap().addAll((Collection) newValue);
+            return;
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+            getXSISchemaLocation().clear();
+            ((EMap.InternalMapView) getXSISchemaLocation()).eMap().addAll((Collection) newValue);
+            return;
+        case JbiAssemblyPackage.DOCUMENT_ROOT__BINDING_JBI:
+            setBindingJbi((JbiBinding) newValue);
+            return;
+        }
+        eDynamicSet(eFeature, newValue);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void eUnset(EStructuralFeature eFeature) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.DOCUMENT_ROOT__MIXED:
+            ((ESequence) getMixed()).featureMap().clear();
+            return;
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+            getXMLNSPrefixMap().clear();
+            return;
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+            getXSISchemaLocation().clear();
+            return;
+        case JbiAssemblyPackage.DOCUMENT_ROOT__BINDING_JBI:
+            setBindingJbi((JbiBinding) null);
+            return;
+        }
+        eDynamicUnset(eFeature);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public boolean eIsSet(EStructuralFeature eFeature) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.DOCUMENT_ROOT__MIXED:
+            return mixed != null && !mixed.featureMap().isEmpty();
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+            return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+        case JbiAssemblyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+            return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+        case JbiAssemblyPackage.DOCUMENT_ROOT__BINDING_JBI:
+            return getBindingJbi() != null;
+        }
+        return eDynamicIsSet(eFeature);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    public String toString() {
+        if (eIsProxy()) return super.toString();
+
+        StringBuffer result = new StringBuffer(super.toString());
+        result.append(" (mixed: ");
+        result.append(mixed);
+        result.append(')');
+        return result.toString();
+	}
+
+} //DocumentRootImpl

Added: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyFactoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyFactoryImpl.java?rev=359666&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyFactoryImpl.java
(added)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyFactoryImpl.java
Wed Dec 28 15:51:57 2005
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.sca.assembly.sdo.impl;
+
+import org.apache.servicemix.sca.assembly.sdo.JbiAssemblyFactory;
+import org.apache.servicemix.sca.assembly.sdo.JbiAssemblyPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.osoa.sca.model.JbiBinding;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class JbiAssemblyFactoryImpl extends EFactoryImpl implements JbiAssemblyFactory {
+    /**
+     * Creates an instance of the factory.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public JbiAssemblyFactoryImpl() {
+        super();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EObject create(EClass eClass) {
+        switch (eClass.getClassifierID()) {
+        case JbiAssemblyPackage.DOCUMENT_ROOT:
+            return (EObject) createDocumentRoot();
+        case JbiAssemblyPackage.JBI_BINDING:
+            return (EObject) createJbiBinding();
+        default:
+            throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not
a valid classifier");
+        }
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public org.apache.servicemix.sca.assembly.sdo.DocumentRoot createDocumentRoot() {
+        DocumentRootImpl documentRoot = new DocumentRootImpl();
+        return documentRoot;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public org.osoa.sca.model.JbiBinding createJbiBindingGen() {
+        JbiBindingImpl jbiBinding = new JbiBindingImpl();
+        return jbiBinding;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public JbiAssemblyPackage getJbiAssemblyPackage() {
+        return (JbiAssemblyPackage) getEPackage();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @deprecated
+     */
+    public static JbiAssemblyPackage getPackage() {
+        return JbiAssemblyPackage.eINSTANCE;
+    }
+
+    /**
+     * Custom code
+     */
+
+    private final org.apache.servicemix.sca.assembly.JbiAssemblyFactory logicalModelFactory
= new org.apache.servicemix.sca.assembly.impl.JbiAssemblyFactoryImpl();
+
+    /**
+     * @see org.apache.tuscany.binding.axis.assembly.sdo.WebServiceAssemblyFactory#createWebServiceBinding()
+     */
+    public JbiBinding createJbiBinding() {
+        return (JbiBinding) logicalModelFactory.createJbiBinding();
+    }
+
+} //WebServiceAssemblyFactoryImpl

Added: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyPackageImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyPackageImpl.java?rev=359666&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyPackageImpl.java
(added)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyPackageImpl.java
Wed Dec 28 15:51:57 2005
@@ -0,0 +1,407 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.sca.assembly.sdo.impl;
+
+import org.apache.servicemix.sca.assembly.sdo.JbiAssemblyFactory;
+import org.apache.servicemix.sca.assembly.sdo.JbiAssemblyPackage;
+import org.apache.tuscany.model.assembly.sdo.AssemblyPackage;
+import org.apache.tuscany.model.assembly.sdo.impl.AssemblyPackageImpl;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.emf.ecore.xml.type.impl.XMLTypePackageImpl;
+import org.osoa.sca.model.JbiBinding;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class JbiAssemblyPackageImpl extends EPackageImpl implements JbiAssemblyPackage {
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    private EClass documentRootEClass = null;
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    private EClass jbiBindingEClass = null;
+
+    /**
+     * Creates an instance of the model <b>Package</b>, registered with
+     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+     * package URI value.
+     * <p>Note: the correct way to create the package is via the static
+     * factory method {@link #init init()}, which also performs
+     * initialization of the package, or returns the registered package,
+     * if one already exists.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @see org.eclipse.emf.ecore.EPackage.Registry
+     * @see org.apache.tuscany.binding.axis.assembly.sdo.WebServiceAssemblyPackage#eNS_URI
+     * @see #init()
+     */
+    private JbiAssemblyPackageImpl() {
+        super(eNS_URI, JbiAssemblyFactory.eINSTANCE);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    private static boolean isInited = false;
+
+    /**
+     * Creates, registers, and initializes the <b>Package</b> for this
+     * model, and for any others upon which it depends.  Simple
+     * dependencies are satisfied by calling this method on all
+     * dependent packages before doing anything else.  This method drives
+     * initialization for interdependent packages directly, in parallel
+     * with this package, itself.
+     * <p>Of this package and its interdependencies, all packages which
+     * have not yet been registered by their URI values are first created
+     * and registered.  The packages are then initialized in two steps:
+     * meta-model objects for all of the packages are created before any
+     * are initialized, since one package's meta-model objects may refer to
+     * those of another.
+     * <p>Invocation of this method will not affect any packages that have
+     * already been initialized.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @see #eNS_URI
+     * @see #createPackageContents()
+     * @see #initializePackageContents()
+     */
+    public static JbiAssemblyPackage init() {
+        if (isInited) return (JbiAssemblyPackage) EPackage.Registry.INSTANCE.getEPackage(JbiAssemblyPackage.eNS_URI);
+
+        // Obtain or create and register package
+        JbiAssemblyPackageImpl theWebServiceAssemblyPackage = (JbiAssemblyPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(eNS_URI)
instanceof JbiAssemblyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new
JbiAssemblyPackageImpl());
+
+        isInited = true;
+
+        // Initialize simple dependencies
+        AssemblyPackageImpl.init();
+        XMLTypePackageImpl.init();
+
+        // Create package meta-data objects
+        theWebServiceAssemblyPackage.createPackageContents();
+
+        // Initialize created meta-data
+        theWebServiceAssemblyPackage.initializePackageContents();
+
+        // Mark meta-data to indicate it can't be changed
+        theWebServiceAssemblyPackage.freeze();
+
+        return theWebServiceAssemblyPackage;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EClass getDocumentRoot() {
+        return documentRootEClass;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EAttribute getDocumentRoot_Mixed() {
+        return (EAttribute) documentRootEClass.getEStructuralFeatures().get(0);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EReference getDocumentRoot_XMLNSPrefixMap() {
+        return (EReference) documentRootEClass.getEStructuralFeatures().get(1);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EReference getDocumentRoot_XSISchemaLocation() {
+        return (EReference) documentRootEClass.getEStructuralFeatures().get(2);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EReference getDocumentRoot_BindingJbi() {
+        return (EReference) documentRootEClass.getEStructuralFeatures().get(3);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EClass getJbiBinding() {
+        return jbiBindingEClass;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EAttribute getJbiBinding_Any() {
+        return (EAttribute) jbiBindingEClass.getEStructuralFeatures().get(0);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EAttribute getJbiBinding_Port() {
+        return (EAttribute) jbiBindingEClass.getEStructuralFeatures().get(1);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public EAttribute getJbiBinding_AnyAttribute() {
+        return (EAttribute) jbiBindingEClass.getEStructuralFeatures().get(2);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public JbiAssemblyFactory getJbiAssemblyFactory() {
+        return (JbiAssemblyFactory) getEFactoryInstance();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    private boolean isCreated = false;
+
+    /**
+     * Creates the meta-model objects for the package.  This method is
+     * guarded to have no affect on any invocation but its first.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void createPackageContents() {
+        if (isCreated) return;
+        isCreated = true;
+
+        // Create classes and their features
+        documentRootEClass = createEClass(DOCUMENT_ROOT);
+        createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+        createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+        createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+        createEReference(documentRootEClass, DOCUMENT_ROOT__BINDING_JBI);
+
+        jbiBindingEClass = createEClass(JBI_BINDING);
+        createEAttribute(jbiBindingEClass, JBI_BINDING__ANY);
+        createEAttribute(jbiBindingEClass, JBI_BINDING__PORT);
+        createEAttribute(jbiBindingEClass, JBI_BINDING__ANY_ATTRIBUTE);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    private boolean isInitialized = false;
+
+    /**
+     * Complete the initialization of the package and its meta-model.  This
+     * method is guarded to have no affect on any invocation but its first.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void initializePackageContentsGen() {
+        if (isInitialized) return;
+        isInitialized = true;
+
+        // Initialize package
+        setName(eNAME);
+        setNsPrefix(eNS_PREFIX);
+        setNsURI(eNS_URI);
+
+        // Obtain other dependent packages
+        AssemblyPackageImpl theAssemblyPackage = (AssemblyPackageImpl) EPackage.Registry.INSTANCE.getEPackage(AssemblyPackage.eNS_URI);
+        XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl) EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+        // Add supertypes to classes
+        jbiBindingEClass.getESuperTypes().add(theAssemblyPackage.getBinding());
+
+        // Initialize classes and features; add operations and parameters
+        initEClass(documentRootEClass, org.apache.servicemix.sca.assembly.sdo.DocumentRoot.class,
"DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+        initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed",
null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
+        initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(),
null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+        initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(),
null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+        initEReference(getDocumentRoot_BindingJbi(), this.getJbiBinding(), null, "bindingWs",
null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+        initEClass(jbiBindingEClass, JbiBinding.class, "JbiBinding", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
+        initEAttribute(getJbiBinding_Any(), ecorePackage.getEFeatureMapEntry(), "any", null,
0, -1, JbiBinding.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
!IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+        initEAttribute(getJbiBinding_Port(), theXMLTypePackage.getAnyURI(), "port", null,
1, 1, JbiBinding.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
!IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+        initEAttribute(getJbiBinding_AnyAttribute(), ecorePackage.getEFeatureMapEntry(),
"anyAttribute", null, 0, -1, JbiBinding.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
!IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+        // Create resource
+        createResource(eNS_URI);
+
+        // Create annotations
+        // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+        createExtendedMetaDataAnnotations();
+    }
+
+    /**
+     * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    protected void createExtendedMetaDataAnnotations() {
+        String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+        addAnnotation
+                (documentRootEClass,
+                        source,
+                        new String[]{
+                                "name", "",
+                                "kind", "mixed"
+                        });
+        addAnnotation
+                (getDocumentRoot_Mixed(),
+                        source,
+                        new String[]{
+                                "kind", "elementWildcard",
+                                "name", ":mixed"
+                        });
+        addAnnotation
+                (getDocumentRoot_XMLNSPrefixMap(),
+                        source,
+                        new String[]{
+                                "kind", "attribute",
+                                "name", "xmlns:prefix"
+                        });
+        addAnnotation
+                (getDocumentRoot_XSISchemaLocation(),
+                        source,
+                        new String[]{
+                                "kind", "attribute",
+                                "name", "xsi:schemaLocation"
+                        });
+        addAnnotation
+                (getDocumentRoot_BindingJbi(),
+                        source,
+                        new String[]{
+                                "kind", "element",
+                                "name", "binding.jbi",
+                                "namespace", "##targetNamespace",
+                                "affiliation", "http://www.osoa.org/xmlns/sca/0.9#binding"
+                        });
+        addAnnotation
+                (jbiBindingEClass,
+                        source,
+                        new String[]{
+                                "name", "ServiceMixBinding",
+                                "kind", "elementOnly"
+                        });
+        addAnnotation
+                (getJbiBinding_Any(),
+                        source,
+                        new String[]{
+                                "kind", "elementWildcard",
+                                "wildcards", "##other",
+                                "name", ":1",
+                                "processing", "lax"
+                        });
+        addAnnotation
+                (getJbiBinding_Port(),
+                        source,
+                        new String[]{
+                                "kind", "attribute",
+                                "name", "port"
+                        });
+        addAnnotation
+                (getJbiBinding_AnyAttribute(),
+                        source,
+                        new String[]{
+                                "kind", "attributeWildcard",
+                                "wildcards", "##any",
+                                "name", ":3",
+                                "processing", "lax"
+                        });
+    }
+
+    /**
+     * Custom code
+     */
+
+    /**
+     * Initialize the package
+     */
+    public void initializePackageContents() {
+        initializePackageContentsGen();
+        AssemblyPackage.eINSTANCE.merge(this);
+	}
+
+} //WebServiceAssemblyPackageImpl

Added: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiBindingImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiBindingImpl.java?rev=359666&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiBindingImpl.java
(added)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiBindingImpl.java
Wed Dec 28 15:51:57 2005
@@ -0,0 +1,294 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.sca.assembly.sdo.impl;
+
+import java.util.Collection;
+
+import org.apache.servicemix.sca.assembly.sdo.JbiAssemblyPackage;
+import org.apache.tuscany.model.assembly.sdo.impl.BindingImpl;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.sdo.util.BasicESequence;
+import org.eclipse.emf.ecore.sdo.util.ESequence;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.osoa.sca.model.JbiBinding;
+
+import commonj.sdo.Sequence;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Web Service Binding</b></em>'.
+ * <!-- end-user-doc -->
+ * <p/>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link JbiBindingImpl#getAny <em>Any</em>}</li>
+ * <li>{@link JbiBindingImpl#getPort <em>Port</em>}</li>
+ * <li>{@link JbiBindingImpl#getAnyAttribute <em>Any Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class JbiBindingImpl extends BindingImpl implements JbiBinding {
+    /**
+     * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getAny()
+     */
+    protected ESequence any = null;
+
+    /**
+     * The default value of the '{@link #getPort() <em>Port</em>}' attribute.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getPort()
+     */
+    protected static final String PORT_EDEFAULT = null;
+
+    /**
+     * The cached value of the '{@link #getPort() <em>Port</em>}' attribute.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getPort()
+     */
+    protected String port = PORT_EDEFAULT;
+
+    /**
+     * The cached value of the '{@link #getAnyAttribute() <em>Any Attribute</em>}'
attribute list.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     * @ordered
+     * @see #getAnyAttribute()
+     */
+    protected ESequence anyAttribute = null;
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    protected JbiBindingImpl() {
+        super();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    protected EClass eStaticClass() {
+        return JbiAssemblyPackage.eINSTANCE.getJbiBinding();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Sequence getAny() {
+        if (any == null) {
+            any = new BasicESequence(new BasicFeatureMap(this, JbiAssemblyPackage.JBI_BINDING__ANY));
+        }
+        return any;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public String getPort() {
+        return port;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void setPort(String newPort) {
+        String oldPort = port;
+        port = newPort;
+        if (eNotificationRequired())
+            eNotify(new ENotificationImpl(this, Notification.SET, JbiAssemblyPackage.JBI_BINDING__PORT,
oldPort, port));
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Sequence getAnyAttribute() {
+        if (anyAttribute == null) {
+            anyAttribute = new BasicESequence(new BasicFeatureMap(this, JbiAssemblyPackage.JBI_BINDING__ANY_ATTRIBUTE));
+        }
+        return anyAttribute;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class
baseClass, NotificationChain msgs) {
+        if (featureID >= 0) {
+            switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
+            case JbiAssemblyPackage.JBI_BINDING__ANY:
+                return ((InternalEList) ((ESequence) getAny()).featureMap()).basicRemove(otherEnd,
msgs);
+            case JbiAssemblyPackage.JBI_BINDING__ANY_ATTRIBUTE:
+                return ((InternalEList) ((ESequence) getAnyAttribute()).featureMap()).basicRemove(otherEnd,
msgs);
+            default:
+                return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
+            }
+        }
+        return eBasicSetContainer(null, featureID, msgs);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public Object eGet(EStructuralFeature eFeature, boolean resolve) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.JBI_BINDING__URI:
+            return getUri();
+        case JbiAssemblyPackage.JBI_BINDING__ANY:
+            return ((ESequence) getAny()).featureMap();
+        case JbiAssemblyPackage.JBI_BINDING__PORT:
+            return getPort();
+        case JbiAssemblyPackage.JBI_BINDING__ANY_ATTRIBUTE:
+            return ((ESequence) getAnyAttribute()).featureMap();
+        }
+        return eDynamicGet(eFeature, resolve);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void eSet(EStructuralFeature eFeature, Object newValue) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.JBI_BINDING__URI:
+            setUri((String) newValue);
+            return;
+        case JbiAssemblyPackage.JBI_BINDING__ANY:
+            ((ESequence) getAny()).featureMap().clear();
+            ((ESequence) getAny()).featureMap().addAll((Collection) newValue);
+            return;
+        case JbiAssemblyPackage.JBI_BINDING__PORT:
+            setPort((String) newValue);
+            return;
+        case JbiAssemblyPackage.JBI_BINDING__ANY_ATTRIBUTE:
+            ((ESequence) getAnyAttribute()).featureMap().clear();
+            ((ESequence) getAnyAttribute()).featureMap().addAll((Collection) newValue);
+            return;
+        }
+        eDynamicSet(eFeature, newValue);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public void eUnset(EStructuralFeature eFeature) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.JBI_BINDING__URI:
+            setUri(URI_EDEFAULT);
+            return;
+        case JbiAssemblyPackage.JBI_BINDING__ANY:
+            ((ESequence) getAny()).featureMap().clear();
+            return;
+        case JbiAssemblyPackage.JBI_BINDING__PORT:
+            setPort(PORT_EDEFAULT);
+            return;
+        case JbiAssemblyPackage.JBI_BINDING__ANY_ATTRIBUTE:
+            ((ESequence) getAnyAttribute()).featureMap().clear();
+            return;
+        }
+        eDynamicUnset(eFeature);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     *
+     * @generated
+     */
+    public boolean eIsSet(EStructuralFeature eFeature) {
+        switch (eDerivedStructuralFeatureID(eFeature)) {
+        case JbiAssemblyPackage.JBI_BINDING__URI:
+            return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
+        case JbiAssemblyPackage.JBI_BINDING__ANY:
+            return any != null && !any.featureMap().isEmpty();
+        case JbiAssemblyPackage.JBI_BINDING__PORT:
+            return PORT_EDEFAULT == null ? port != null : !PORT_EDEFAULT.equals(port);
+        case JbiAssemblyPackage.JBI_BINDING__ANY_ATTRIBUTE:
+            return anyAttribute != null && !anyAttribute.featureMap().isEmpty();
+        }
+        return eDynamicIsSet(eFeature);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    public String toString() {
+        if (eIsProxy()) return super.toString();
+
+        StringBuffer result = new StringBuffer(super.toString());
+        result.append(" (any: ");
+        result.append(any);
+        result.append(", port: ");
+        result.append(port);
+        result.append(", anyAttribute: ");
+        result.append(anyAttribute);
+        result.append(')');
+        return result.toString();
+	}
+
+} //WebServiceBindingImpl



Mime
View raw message