You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by fr...@apache.org on 2006/11/20 23:16:02 UTC
svn commit: r477364 [2/8] - in /incubator/tuscany/java/sdo:
impl/src/main/java/org/apache/tuscany/sdo/helper/
impl/src/main/java/org/apache/tuscany/sdo/impl/
impl/src/main/java/org/apache/tuscany/sdo/model/
impl/src/main/java/org/apache/tuscany/sdo/mod...
Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java?view=diff&rev=477364&r1=477363&r2=477364
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java (original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java Mon Nov 20 14:16:00 2006
@@ -1,38 +1,16 @@
/**
+ * <copyright>
+ * </copyright>
*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
+ * $Id$
*/
package org.apache.tuscany.sdo.model.impl;
import commonj.sdo.Sequence;
-
+import commonj.sdo.Type;
import org.apache.tuscany.sdo.model.DataGraphType;
-import org.apache.tuscany.sdo.util.BasicSequence;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
+import org.apache.tuscany.sdo.model.ModelFactory;
/**
* <!-- begin-user-doc -->
@@ -50,6 +28,61 @@
public class DataGraphTypeImpl extends BaseDataGraphTypeImpl implements DataGraphType
{
/**
+ * The feature id for the '<em><b>Models</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int MODELS = BaseDataGraphTypeImpl.MODELS;
+
+ /**
+ * The feature id for the '<em><b>Xsd</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int XSD = BaseDataGraphTypeImpl.XSD;
+
+ /**
+ * The feature id for the '<em><b>Change Summary</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int CHANGE_SUMMARY = BaseDataGraphTypeImpl.CHANGE_SUMMARY;
+
+ /**
+ * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int ANY_ATTRIBUTE = BaseDataGraphTypeImpl.ANY_ATTRIBUTE;
+
+ /**
+ * The feature id for the '<em><b>Any</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int ANY = BaseDataGraphTypeImpl.SDO_PROPERTY_COUNT + 0;
+
+ /**
+ * This represents the number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+
+ public final static int SDO_PROPERTY_COUNT = BaseDataGraphTypeImpl.SDO_PROPERTY_COUNT + 1;
+
+ /**
* The cached value of the '{@link #getAny() <em>Any</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -57,8 +90,9 @@
* @generated
* @ordered
*/
- protected BasicSequence any = null;
-
+
+ protected Sequence any = null;
+
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -74,9 +108,9 @@
* <!-- end-user-doc -->
* @generated
*/
- protected EClass eStaticClass()
+ public Type getType()
{
- return ModelPackageImpl.Literals.DATA_GRAPH_TYPE;
+ return ((ModelFactoryImpl)ModelFactory.INSTANCE).getDataGraphType();
}
/**
@@ -88,24 +122,23 @@
{
if (any == null)
{
- any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.DATA_GRAPH_TYPE__ANY));
+ any = createSequence(ANY);
}
return any;
}
-
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
{
- switch (featureID)
+ switch (propertyIndex)
{
- case ModelPackageImpl.DATA_GRAPH_TYPE__ANY:
- return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs);
+ case ANY:
+ return removeFromSequence(getAny(), otherEnd, changeContext);
}
- return super.eInverseRemove(otherEnd, featureID, msgs);
+ return super.inverseRemove(otherEnd, propertyIndex, changeContext);
}
/**
@@ -113,15 +146,16 @@
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(int featureID, boolean resolve, boolean coreType)
+ public Object get(int propertyIndex, boolean resolve)
{
- switch (featureID)
+ switch (propertyIndex)
{
- case ModelPackageImpl.DATA_GRAPH_TYPE__ANY:
- if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap();
+ case ANY:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
return getAny();
}
- return super.eGet(featureID, resolve, coreType);
+ return super.get(propertyIndex, resolve);
}
/**
@@ -129,15 +163,15 @@
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(int featureID, Object newValue)
+ public void set(int propertyIndex, Object newValue)
{
- switch (featureID)
+ switch (propertyIndex)
{
- case ModelPackageImpl.DATA_GRAPH_TYPE__ANY:
- ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue);
+ case ANY:
+ setSequence(getAny(), newValue);
return;
}
- super.eSet(featureID, newValue);
+ super.set(propertyIndex, newValue);
}
/**
@@ -145,15 +179,15 @@
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(int featureID)
+ public void unset(int propertyIndex)
{
- switch (featureID)
+ switch (propertyIndex)
{
- case ModelPackageImpl.DATA_GRAPH_TYPE__ANY:
- ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear();
+ case ANY:
+ unsetSequence(getAny());
return;
}
- super.eUnset(featureID);
+ super.unset(propertyIndex);
}
/**
@@ -161,14 +195,14 @@
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(int featureID)
+ public boolean isSet(int propertyIndex)
{
- switch (featureID)
+ switch (propertyIndex)
{
- case ModelPackageImpl.DATA_GRAPH_TYPE__ANY:
- return any != null && !any.featureMap().isEmpty();
+ case ANY:
+ return any != null && !isSequenceEmpty(getAny());
}
- return super.eIsSet(featureID);
+ return super.isSet(propertyIndex);
}
/**
@@ -178,7 +212,7 @@
*/
public String toString()
{
- if (eIsProxy()) return super.toString();
+ if (isProxy(this)) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (any: ");
Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java?view=diff&rev=477364&r1=477363&r2=477364
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java (original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java Mon Nov 20 14:16:00 2006
@@ -1,27 +1,17 @@
/**
+ * <copyright>
+ * </copyright>
*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
+ * $Id$
*/
package org.apache.tuscany.sdo.model.impl;
-import org.apache.tuscany.sdo.model.DataObject;
+import commonj.sdo.Type;
-import org.eclipse.emf.ecore.EClass;
+import org.apache.tuscany.sdo.impl.DataObjectBase;
+
+import org.apache.tuscany.sdo.model.DataObject;
+import org.apache.tuscany.sdo.model.ModelFactory;
/**
* <!-- begin-user-doc -->
@@ -32,9 +22,19 @@
*
* @generated
*/
-public abstract class DataObjectImpl extends org.apache.tuscany.sdo.impl.DataObjectImpl implements DataObject
+public abstract class DataObjectImpl extends DataObjectBase implements DataObject
{
/**
+ * This represents the number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+
+ public final static int SDO_PROPERTY_COUNT = 0;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -49,9 +49,9 @@
* <!-- end-user-doc -->
* @generated
*/
- protected EClass eStaticClass()
+ public Type getType()
{
- return ModelPackageImpl.Literals.DATA_OBJECT;
+ return ((ModelFactoryImpl)ModelFactory.INSTANCE).getDataObject();
}
} //DataObjectImpl
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org