You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2007/07/13 17:46:33 UTC
svn commit: r556041 [1/4] - in
/incubator/tuscany/branches/sdo-1.0-incubating/impl/src:
main/java/org/apache/tuscany/sdo/helper/
main/java/org/apache/tuscany/sdo/impl/ main/java/org/apache/tuscany/sdo/util/
test/java/com/example/ExpectedException/ test...
Author: kelvingoodson
Date: Fri Jul 13 08:46:26 2007
New Revision: 556041
URL: http://svn.apache.org/viewvc?view=rev&rev=556041
Log:
TUSCANY-578 port to branch
Added:
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionFactory.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionType.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionTypeImpl.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/SequenceReadOnlyTypeImpl.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ExpectedExceptionsTestCase.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/resources/expectedExceptions.xsd
Modified:
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java
incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
Modified: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java?view=diff&rev=556041&r1=556040&r2=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java Fri Jul 13 08:46:26 2007
@@ -53,7 +53,11 @@
public DataObject create(Type type) {
if ((type instanceof EClass) && !type.isAbstract()) {
EClass eClass = (EClass)type;
- return (DataObject)EcoreUtil.create(eClass);
+ try {
+ return (DataObject)EcoreUtil.create(eClass);
+ } catch (ClassCastException e) {
+ throw new IllegalArgumentException();
+ }
}
throw new IllegalArgumentException();
}
Modified: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java?view=diff&rev=556041&r1=556040&r2=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java Fri Jul 13 08:46:26 2007
@@ -270,6 +270,16 @@
return null;
}
+ public void set(int featureID, Object newValue)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void unset(int propertyIndex)
+ {
+ throw new UnsupportedOperationException();
+ }
+
private ChangeContextImpl initializeChangeContext(ChangeContext changeContext)
{
ChangeContextImpl changeContextImpl;
@@ -467,6 +477,8 @@
}
} //DataObjectBase
+
+
Modified: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java?view=diff&rev=556041&r1=556040&r2=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java Fri Jul 13 08:46:26 2007
@@ -156,7 +156,11 @@
if (featureID < eClass().getFeatureCount())
{
EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- eDynamicSet(featureID, eFeature, newValue);
+ try {
+ eDynamicSet(featureID, eFeature, newValue);
+ } catch (IllegalArgumentException e) {
+ throw new UnsupportedOperationException(e.getMessage());
+ }
}
else
{
@@ -169,7 +173,11 @@
if (featureID < eClass().getFeatureCount())
{
EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- eDynamicUnset(featureID, eFeature);
+ try {
+ eDynamicUnset(featureID, eFeature);
+ } catch (IllegalArgumentException e) {
+ throw new UnsupportedOperationException(e.getMessage());
+ }
}
else
{
Modified: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java?view=diff&rev=556041&r1=556040&r2=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java Fri Jul 13 08:46:26 2007
@@ -2468,13 +2468,15 @@
public static Property getProperty(DataObject dataObject, int propertyIndex)
{
List typeProperties = dataObject.getType().getProperties();
+ try {
+ Property property = propertyIndex < typeProperties.size() ?
+ (Property)typeProperties.get(propertyIndex) :
+ (Property)dataObject.getInstanceProperties().get(propertyIndex);
- Property property = propertyIndex < typeProperties.size() ?
- (Property)typeProperties.get(propertyIndex) :
- (Property)dataObject.getInstanceProperties().get(propertyIndex);
-
- //FB maybe should catch bad index exception and throw IllegalArgumentException?
- return property;
+ return property;
+ } catch (IndexOutOfBoundsException e) {
+ throw new IllegalArgumentException();
+ }
}
public static Property getContainmentProperty(Property property)
Added: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionFactory.java?view=auto&rev=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionFactory.java (added)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionFactory.java Fri Jul 13 08:46:26 2007
@@ -0,0 +1,57 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package com.example.ExpectedException;
+
+import commonj.sdo.helper.HelperContext;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public interface ExpectedExceptionFactory
+{
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ExpectedExceptionFactory INSTANCE = com.example.ExpectedException.impl.ExpectedExceptionFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type</em>'.
+ * @generated
+ */
+ ExpectedExceptionType createExpectedExceptionType();
+
+ /**
+ * Returns a new object of class '<em>Sequence Read Only Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Sequence Read Only Type</em>'.
+ * @generated
+ */
+ SequenceReadOnlyType createSequenceReadOnlyType();
+
+ /**
+ * Registers the types supported by this Factory within the supplied scope.argument
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param scope an instance of HelperContext used to manage the scoping of types.
+ * @generated
+ */
+ public void register(HelperContext scope);
+
+} //ExpectedExceptionFactory
Added: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionType.java?view=auto&rev=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionType.java (added)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionType.java Fri Jul 13 08:46:26 2007
@@ -0,0 +1,773 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package com.example.ExpectedException;
+
+import java.io.Serializable;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal <em>String Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal <em>Boolean Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal <em>Byte Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal <em>Decimal Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal <em>Int Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal <em>Float Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal <em>Double Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal <em>Date Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal <em>Short Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal <em>Long Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getListVal <em>List Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal <em>Bytes Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal <em>Integer Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal <em>Char Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyVal <em>Read Only Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyListVal <em>Read Only List Val</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface ExpectedExceptionType extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>String Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>String Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>String Val</em>' attribute.
+ * @see #isSetStringVal()
+ * @see #unsetStringVal()
+ * @see #setStringVal(String)
+ * @generated
+ */
+ String getStringVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal <em>String Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>String Val</em>' attribute.
+ * @see #isSetStringVal()
+ * @see #unsetStringVal()
+ * @see #getStringVal()
+ * @generated
+ */
+ void setStringVal(String value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal <em>String Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetStringVal()
+ * @see #getStringVal()
+ * @see #setStringVal(String)
+ * @generated
+ */
+ void unsetStringVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal <em>String Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>String Val</em>' attribute is set.
+ * @see #unsetStringVal()
+ * @see #getStringVal()
+ * @see #setStringVal(String)
+ * @generated
+ */
+ boolean isSetStringVal();
+
+ /**
+ * Returns the value of the '<em><b>Boolean Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Boolean Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Boolean Val</em>' attribute.
+ * @see #isSetBooleanVal()
+ * @see #unsetBooleanVal()
+ * @see #setBooleanVal(boolean)
+ * @generated
+ */
+ boolean isBooleanVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal <em>Boolean Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Boolean Val</em>' attribute.
+ * @see #isSetBooleanVal()
+ * @see #unsetBooleanVal()
+ * @see #isBooleanVal()
+ * @generated
+ */
+ void setBooleanVal(boolean value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal <em>Boolean Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetBooleanVal()
+ * @see #isBooleanVal()
+ * @see #setBooleanVal(boolean)
+ * @generated
+ */
+ void unsetBooleanVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal <em>Boolean Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Boolean Val</em>' attribute is set.
+ * @see #unsetBooleanVal()
+ * @see #isBooleanVal()
+ * @see #setBooleanVal(boolean)
+ * @generated
+ */
+ boolean isSetBooleanVal();
+
+ /**
+ * Returns the value of the '<em><b>Byte Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Byte Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Byte Val</em>' attribute.
+ * @see #isSetByteVal()
+ * @see #unsetByteVal()
+ * @see #setByteVal(byte)
+ * @generated
+ */
+ byte getByteVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal <em>Byte Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Byte Val</em>' attribute.
+ * @see #isSetByteVal()
+ * @see #unsetByteVal()
+ * @see #getByteVal()
+ * @generated
+ */
+ void setByteVal(byte value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal <em>Byte Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetByteVal()
+ * @see #getByteVal()
+ * @see #setByteVal(byte)
+ * @generated
+ */
+ void unsetByteVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal <em>Byte Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Byte Val</em>' attribute is set.
+ * @see #unsetByteVal()
+ * @see #getByteVal()
+ * @see #setByteVal(byte)
+ * @generated
+ */
+ boolean isSetByteVal();
+
+ /**
+ * Returns the value of the '<em><b>Decimal Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Decimal Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Decimal Val</em>' attribute.
+ * @see #isSetDecimalVal()
+ * @see #unsetDecimalVal()
+ * @see #setDecimalVal(BigDecimal)
+ * @generated
+ */
+ BigDecimal getDecimalVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal <em>Decimal Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Decimal Val</em>' attribute.
+ * @see #isSetDecimalVal()
+ * @see #unsetDecimalVal()
+ * @see #getDecimalVal()
+ * @generated
+ */
+ void setDecimalVal(BigDecimal value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal <em>Decimal Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetDecimalVal()
+ * @see #getDecimalVal()
+ * @see #setDecimalVal(BigDecimal)
+ * @generated
+ */
+ void unsetDecimalVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal <em>Decimal Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Decimal Val</em>' attribute is set.
+ * @see #unsetDecimalVal()
+ * @see #getDecimalVal()
+ * @see #setDecimalVal(BigDecimal)
+ * @generated
+ */
+ boolean isSetDecimalVal();
+
+ /**
+ * Returns the value of the '<em><b>Int Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Int Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Int Val</em>' attribute.
+ * @see #isSetIntVal()
+ * @see #unsetIntVal()
+ * @see #setIntVal(int)
+ * @generated
+ */
+ int getIntVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal <em>Int Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Int Val</em>' attribute.
+ * @see #isSetIntVal()
+ * @see #unsetIntVal()
+ * @see #getIntVal()
+ * @generated
+ */
+ void setIntVal(int value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal <em>Int Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetIntVal()
+ * @see #getIntVal()
+ * @see #setIntVal(int)
+ * @generated
+ */
+ void unsetIntVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal <em>Int Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Int Val</em>' attribute is set.
+ * @see #unsetIntVal()
+ * @see #getIntVal()
+ * @see #setIntVal(int)
+ * @generated
+ */
+ boolean isSetIntVal();
+
+ /**
+ * Returns the value of the '<em><b>Float Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Float Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Float Val</em>' attribute.
+ * @see #isSetFloatVal()
+ * @see #unsetFloatVal()
+ * @see #setFloatVal(float)
+ * @generated
+ */
+ float getFloatVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal <em>Float Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Float Val</em>' attribute.
+ * @see #isSetFloatVal()
+ * @see #unsetFloatVal()
+ * @see #getFloatVal()
+ * @generated
+ */
+ void setFloatVal(float value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal <em>Float Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetFloatVal()
+ * @see #getFloatVal()
+ * @see #setFloatVal(float)
+ * @generated
+ */
+ void unsetFloatVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal <em>Float Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Float Val</em>' attribute is set.
+ * @see #unsetFloatVal()
+ * @see #getFloatVal()
+ * @see #setFloatVal(float)
+ * @generated
+ */
+ boolean isSetFloatVal();
+
+ /**
+ * Returns the value of the '<em><b>Double Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Double Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Double Val</em>' attribute.
+ * @see #isSetDoubleVal()
+ * @see #unsetDoubleVal()
+ * @see #setDoubleVal(double)
+ * @generated
+ */
+ double getDoubleVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal <em>Double Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Double Val</em>' attribute.
+ * @see #isSetDoubleVal()
+ * @see #unsetDoubleVal()
+ * @see #getDoubleVal()
+ * @generated
+ */
+ void setDoubleVal(double value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal <em>Double Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetDoubleVal()
+ * @see #getDoubleVal()
+ * @see #setDoubleVal(double)
+ * @generated
+ */
+ void unsetDoubleVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal <em>Double Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Double Val</em>' attribute is set.
+ * @see #unsetDoubleVal()
+ * @see #getDoubleVal()
+ * @see #setDoubleVal(double)
+ * @generated
+ */
+ boolean isSetDoubleVal();
+
+ /**
+ * Returns the value of the '<em><b>Date Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Date Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Date Val</em>' attribute.
+ * @see #isSetDateVal()
+ * @see #unsetDateVal()
+ * @see #setDateVal(String)
+ * @generated
+ */
+ String getDateVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal <em>Date Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Date Val</em>' attribute.
+ * @see #isSetDateVal()
+ * @see #unsetDateVal()
+ * @see #getDateVal()
+ * @generated
+ */
+ void setDateVal(String value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal <em>Date Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetDateVal()
+ * @see #getDateVal()
+ * @see #setDateVal(String)
+ * @generated
+ */
+ void unsetDateVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal <em>Date Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Date Val</em>' attribute is set.
+ * @see #unsetDateVal()
+ * @see #getDateVal()
+ * @see #setDateVal(String)
+ * @generated
+ */
+ boolean isSetDateVal();
+
+ /**
+ * Returns the value of the '<em><b>Short Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Short Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Short Val</em>' attribute.
+ * @see #isSetShortVal()
+ * @see #unsetShortVal()
+ * @see #setShortVal(short)
+ * @generated
+ */
+ short getShortVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal <em>Short Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Short Val</em>' attribute.
+ * @see #isSetShortVal()
+ * @see #unsetShortVal()
+ * @see #getShortVal()
+ * @generated
+ */
+ void setShortVal(short value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal <em>Short Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetShortVal()
+ * @see #getShortVal()
+ * @see #setShortVal(short)
+ * @generated
+ */
+ void unsetShortVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal <em>Short Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Short Val</em>' attribute is set.
+ * @see #unsetShortVal()
+ * @see #getShortVal()
+ * @see #setShortVal(short)
+ * @generated
+ */
+ boolean isSetShortVal();
+
+ /**
+ * Returns the value of the '<em><b>Long Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Long Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Long Val</em>' attribute.
+ * @see #isSetLongVal()
+ * @see #unsetLongVal()
+ * @see #setLongVal(long)
+ * @generated
+ */
+ long getLongVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal <em>Long Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Long Val</em>' attribute.
+ * @see #isSetLongVal()
+ * @see #unsetLongVal()
+ * @see #getLongVal()
+ * @generated
+ */
+ void setLongVal(long value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal <em>Long Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLongVal()
+ * @see #getLongVal()
+ * @see #setLongVal(long)
+ * @generated
+ */
+ void unsetLongVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal <em>Long Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Long Val</em>' attribute is set.
+ * @see #unsetLongVal()
+ * @see #getLongVal()
+ * @see #setLongVal(long)
+ * @generated
+ */
+ boolean isSetLongVal();
+
+ /**
+ * Returns the value of the '<em><b>List Val</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>List Val</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>List Val</em>' attribute list.
+ * @generated
+ */
+ List getListVal();
+
+ /**
+ * Returns the value of the '<em><b>Bytes Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Bytes Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Bytes Val</em>' attribute.
+ * @see #isSetBytesVal()
+ * @see #unsetBytesVal()
+ * @see #setBytesVal(byte[])
+ * @generated
+ */
+ byte[] getBytesVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal <em>Bytes Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Bytes Val</em>' attribute.
+ * @see #isSetBytesVal()
+ * @see #unsetBytesVal()
+ * @see #getBytesVal()
+ * @generated
+ */
+ void setBytesVal(byte[] value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal <em>Bytes Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetBytesVal()
+ * @see #getBytesVal()
+ * @see #setBytesVal(byte[])
+ * @generated
+ */
+ void unsetBytesVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal <em>Bytes Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Bytes Val</em>' attribute is set.
+ * @see #unsetBytesVal()
+ * @see #getBytesVal()
+ * @see #setBytesVal(byte[])
+ * @generated
+ */
+ boolean isSetBytesVal();
+
+ /**
+ * Returns the value of the '<em><b>Integer Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Integer Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Integer Val</em>' attribute.
+ * @see #isSetIntegerVal()
+ * @see #unsetIntegerVal()
+ * @see #setIntegerVal(BigInteger)
+ * @generated
+ */
+ BigInteger getIntegerVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal <em>Integer Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Integer Val</em>' attribute.
+ * @see #isSetIntegerVal()
+ * @see #unsetIntegerVal()
+ * @see #getIntegerVal()
+ * @generated
+ */
+ void setIntegerVal(BigInteger value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal <em>Integer Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetIntegerVal()
+ * @see #getIntegerVal()
+ * @see #setIntegerVal(BigInteger)
+ * @generated
+ */
+ void unsetIntegerVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal <em>Integer Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Integer Val</em>' attribute is set.
+ * @see #unsetIntegerVal()
+ * @see #getIntegerVal()
+ * @see #setIntegerVal(BigInteger)
+ * @generated
+ */
+ boolean isSetIntegerVal();
+
+ /**
+ * Returns the value of the '<em><b>Char Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Char Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Char Val</em>' attribute.
+ * @see #isSetCharVal()
+ * @see #unsetCharVal()
+ * @see #setCharVal(String)
+ * @generated
+ */
+ String getCharVal();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal <em>Char Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Char Val</em>' attribute.
+ * @see #isSetCharVal()
+ * @see #unsetCharVal()
+ * @see #getCharVal()
+ * @generated
+ */
+ void setCharVal(String value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal <em>Char Val</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetCharVal()
+ * @see #getCharVal()
+ * @see #setCharVal(String)
+ * @generated
+ */
+ void unsetCharVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal <em>Char Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Char Val</em>' attribute is set.
+ * @see #unsetCharVal()
+ * @see #getCharVal()
+ * @see #setCharVal(String)
+ * @generated
+ */
+ boolean isSetCharVal();
+
+ /**
+ * Returns the value of the '<em><b>Read Only Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Read Only Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Read Only Val</em>' attribute.
+ * @see #isSetReadOnlyVal()
+ * @generated
+ */
+ String getReadOnlyVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyVal <em>Read Only Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Read Only Val</em>' attribute is set.
+ * @see #getReadOnlyVal()
+ * @generated
+ */
+ boolean isSetReadOnlyVal();
+
+ /**
+ * Returns the value of the '<em><b>Read Only List Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Read Only List Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Read Only List Val</em>' attribute.
+ * @see #isSetReadOnlyListVal()
+ * @generated
+ */
+ String getReadOnlyListVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyListVal <em>Read Only List Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Read Only List Val</em>' attribute is set.
+ * @see #getReadOnlyListVal()
+ * @generated
+ */
+ boolean isSetReadOnlyListVal();
+
+} // ExpectedExceptionType
Added: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java?view=auto&rev=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java (added)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java Fri Jul 13 08:46:26 2007
@@ -0,0 +1,145 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package com.example.ExpectedException;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Sequence Read Only Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.ExpectedException.SequenceReadOnlyType#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.ExpectedException.SequenceReadOnlyType#getReadOnlyVal <em>Read Only Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.SequenceReadOnlyType#getReadOnlyListVal <em>Read Only List Val</em>}</li>
+ * <li>{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName <em>Unique Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface SequenceReadOnlyType extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mixed</em>' attribute list.
+ * @generated
+ */
+ Sequence getMixed();
+
+ /**
+ * Returns the value of the '<em><b>Read Only Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Read Only Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Read Only Val</em>' attribute.
+ * @see #isSetReadOnlyVal()
+ * @generated
+ */
+ String getReadOnlyVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getReadOnlyVal <em>Read Only Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Read Only Val</em>' attribute is set.
+ * @see #getReadOnlyVal()
+ * @generated
+ */
+ boolean isSetReadOnlyVal();
+
+ /**
+ * Returns the value of the '<em><b>Read Only List Val</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Read Only List Val</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Read Only List Val</em>' attribute.
+ * @see #isSetReadOnlyListVal()
+ * @generated
+ */
+ String getReadOnlyListVal();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getReadOnlyListVal <em>Read Only List Val</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Read Only List Val</em>' attribute is set.
+ * @see #getReadOnlyListVal()
+ * @generated
+ */
+ boolean isSetReadOnlyListVal();
+
+ /**
+ * Returns the value of the '<em><b>Unique Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Unique Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Unique Name</em>' attribute.
+ * @see #isSetUniqueName()
+ * @see #unsetUniqueName()
+ * @see #setUniqueName(String)
+ * @generated
+ */
+ String getUniqueName();
+
+ /**
+ * Sets the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName <em>Unique Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Unique Name</em>' attribute.
+ * @see #isSetUniqueName()
+ * @see #unsetUniqueName()
+ * @see #getUniqueName()
+ * @generated
+ */
+ void setUniqueName(String value);
+
+ /**
+ * Unsets the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName <em>Unique Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetUniqueName()
+ * @see #getUniqueName()
+ * @see #setUniqueName(String)
+ * @generated
+ */
+ void unsetUniqueName();
+
+ /**
+ * Returns whether the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName <em>Unique Name</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Unique Name</em>' attribute is set.
+ * @see #unsetUniqueName()
+ * @see #getUniqueName()
+ * @see #setUniqueName(String)
+ * @generated
+ */
+ boolean isSetUniqueName();
+
+} // SequenceReadOnlyType
Added: incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java?view=auto&rev=556041
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java (added)
+++ incubator/tuscany/branches/sdo-1.0-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java Fri Jul 13 08:46:26 2007
@@ -0,0 +1,566 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package com.example.ExpectedException.impl;
+
+import commonj.sdo.helper.HelperContext;
+import org.apache.tuscany.sdo.helper.TypeHelperImpl;
+
+import com.example.ExpectedException.*;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Type;
+
+import org.apache.tuscany.sdo.SDOFactory;
+
+import org.apache.tuscany.sdo.impl.FactoryBase;
+
+import org.apache.tuscany.sdo.model.ModelFactory;
+
+import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
+
+import org.apache.tuscany.sdo.model.internal.InternalFactory;
+
+import org.apache.tuscany.sdo.util.SDOUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * Generator information:
+ * patternVersion=1.2; -prefix ExpectedException
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ExpectedExceptionFactoryImpl extends FactoryBase implements ExpectedExceptionFactory
+{
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_URI = "http://example.com/ExpectedException";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_PREFIX = "expect";
+
+ /**
+ * The version of the generator pattern used to generate this class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String PATTERN_VERSION = "1.2";
+
+ public static final int EXPECTED_EXCEPTION_TYPE = 1;
+ public static final int SEQUENCE_READ_ONLY_TYPE = 2;
+ public static final int CHAR = 3;
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpectedExceptionFactoryImpl()
+ {
+ super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.sdo.test.ExpectedException");
+ }
+
+ /**
+ * Registers the Factory instance so that it is available within the supplied scope.
+ * @argument scope a HelperContext instance that will make the types supported by this Factory available.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void register(HelperContext scope) {
+ if(scope == null) {
+ throw new IllegalArgumentException("Scope can not be null");
+ }
+ TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
+ th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DataObject create(int typeNumber)
+ {
+ switch (typeNumber)
+ {
+ case EXPECTED_EXCEPTION_TYPE: return (DataObject)createExpectedExceptionType();
+ case SEQUENCE_READ_ONLY_TYPE: return (DataObject)createSequenceReadOnlyType();
+ default:
+ return super.create(typeNumber);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object createFromString(int typeNumber, String initialValue)
+ {
+ switch (typeNumber)
+ {
+ case CHAR:
+ return createcharFromString(initialValue);
+ default:
+ throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertToString(int typeNumber, Object instanceValue)
+ {
+ switch (typeNumber)
+ {
+ case CHAR:
+ return convertcharToString(instanceValue);
+ default:
+ throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
+ }
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpectedExceptionType createExpectedExceptionType()
+ {
+ ExpectedExceptionTypeImpl expectedExceptionType = new ExpectedExceptionTypeImpl();
+ return expectedExceptionType;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SequenceReadOnlyType createSequenceReadOnlyType()
+ {
+ SequenceReadOnlyTypeImpl sequenceReadOnlyType = new SequenceReadOnlyTypeImpl();
+ return sequenceReadOnlyType;
+ }
+
+ // Following creates and initializes SDO metadata for the supported types.
+ protected Type expectedExceptionTypeType = null;
+
+ public Type getExpectedExceptionType()
+ {
+ return expectedExceptionTypeType;
+ }
+
+ protected Type sequenceReadOnlyTypeType = null;
+
+ public Type getSequenceReadOnlyType()
+ {
+ return sequenceReadOnlyTypeType;
+ }
+
+ protected Type char_Type = null;
+
+ public Type getchar()
+ {
+ return char_Type;
+ }
+
+
+ private static boolean isInited = false;
+
+ public static ExpectedExceptionFactoryImpl init()
+ {
+ if (isInited) return (ExpectedExceptionFactoryImpl)FactoryBase.getStaticFactory(ExpectedExceptionFactoryImpl.NAMESPACE_URI);
+ ExpectedExceptionFactoryImpl theExpectedExceptionFactoryImpl = new ExpectedExceptionFactoryImpl();
+ isInited = true;
+
+ // Initialize dependencies
+ SDOUtil.registerStaticTypes(SDOFactory.class);
+ SDOUtil.registerStaticTypes(ModelFactory.class);
+ SDOUtil.registerStaticTypes(InternalFactory.class);
+
+ // Create package meta-data objects
+ theExpectedExceptionFactoryImpl.createMetaData();
+
+ // Initialize created meta-data
+ theExpectedExceptionFactoryImpl.initializeMetaData();
+
+ // Mark meta-data to indicate it can't be changed
+ //theExpectedExceptionFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
+
+ return theExpectedExceptionFactoryImpl;
+ }
+
+ private boolean isCreated = false;
+
+ public void createMetaData()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create types and their properties
+ expectedExceptionTypeType = createType(false, EXPECTED_EXCEPTION_TYPE);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_STRING_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_BOOLEAN_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_BYTE_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_DECIMAL_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_INT_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_FLOAT_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_DOUBLE_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_DATE_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_SHORT_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_LONG_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_LIST_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_BYTES_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_INTEGER_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_CHAR_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_VAL);
+ createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_LIST_VAL);
+ sequenceReadOnlyTypeType = createType(false, SEQUENCE_READ_ONLY_TYPE);
+ createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_MIXED);
+ createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_VAL);
+ createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_LIST_VAL);
+ createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_UNIQUE_NAME);
+
+ // Create data types
+ char_Type = createType(true, CHAR );
+ }
+
+ private boolean isInitialized = false;
+
+ public void initializeMetaData()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Obtain other dependent packages
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ Property property = null;
+
+ // Add supertypes to types
+
+ // Initialize types and properties
+ initializeType(expectedExceptionTypeType, ExpectedExceptionType.class, "ExpectedExceptionType", false);
+ property = getLocalProperty(expectedExceptionTypeType, 0);
+ initializeProperty(property, theModelPackageImpl.getString(), "stringVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 1);
+ initializeProperty(property, theModelPackageImpl.getBoolean(), "booleanVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 2);
+ initializeProperty(property, theModelPackageImpl.getByte(), "byteVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 3);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "decimalVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 4);
+ initializeProperty(property, theModelPackageImpl.getInt(), "intVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 5);
+ initializeProperty(property, theModelPackageImpl.getFloat(), "floatVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 6);
+ initializeProperty(property, theModelPackageImpl.getDouble(), "doubleVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 7);
+ initializeProperty(property, theModelPackageImpl.getDateTime(), "dateVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 8);
+ initializeProperty(property, theModelPackageImpl.getShort(), "shortVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 9);
+ initializeProperty(property, theModelPackageImpl.getLong(), "longVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 10);
+ initializeProperty(property, theModelPackageImpl.getString(), "listVal", null, 0, -1, ExpectedExceptionType.class, false, false, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 11);
+ initializeProperty(property, theModelPackageImpl.getBytes(), "bytesVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 12);
+ initializeProperty(property, theModelPackageImpl.getInteger(), "integerVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 13);
+ initializeProperty(property, this.getchar(), "charVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
+
+ property = getLocalProperty(expectedExceptionTypeType, 14);
+ initializeProperty(property, theModelPackageImpl.getString(), "readOnlyVal", null, 1, 1, ExpectedExceptionType.class, true, true, false);
+ setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
+
+ property = getLocalProperty(expectedExceptionTypeType, 15);
+ initializeProperty(property, theModelPackageImpl.getString(), "readOnlyListVal", null, 1, 1, ExpectedExceptionType.class, true, true, false);
+ setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
+
+ initializeType(sequenceReadOnlyTypeType, SequenceReadOnlyType.class, "SequenceReadOnlyType", false);
+ property = getLocalProperty(sequenceReadOnlyTypeType, 0);
+ initializeProperty(property, getSequence(), "mixed", null, 0, -1, SequenceReadOnlyType.class, false, false, false);
+
+ property = getLocalProperty(sequenceReadOnlyTypeType, 1);
+ initializeProperty(property, theModelPackageImpl.getString(), "readOnlyVal", null, 1, 1, SequenceReadOnlyType.class, true, true, true);
+ setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
+
+ property = getLocalProperty(sequenceReadOnlyTypeType, 2);
+ initializeProperty(property, theModelPackageImpl.getString(), "readOnlyListVal", null, 1, 1, SequenceReadOnlyType.class, true, true, true);
+ setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
+
+ property = getLocalProperty(sequenceReadOnlyTypeType, 3);
+ initializeProperty(property, theModelPackageImpl.getString(), "uniqueName", null, 1, 1, SequenceReadOnlyType.class, false, true, true);
+
+ // Initialize data types
+ initializeType(char_Type, String.class, "char", true, false);
+
+ createXSDMetaData(theModelPackageImpl);
+ }
+
+ protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
+ {
+ super.initXSD();
+
+ Property property = null;
+
+
+ property = createGlobalProperty
+ ("expectedExceptionsElem",
+ this.getExpectedExceptionType(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "expectedExceptionsElem",
+ "namespace", "##targetNamespace"
+ });
+
+ property = createGlobalProperty
+ ("sequencedReadOnlyElem",
+ this.getSequenceReadOnlyType(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "sequencedReadOnlyElem",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (expectedExceptionTypeType,
+ new String[]
+ {
+ "name", "ExpectedExceptionType",
+ "kind", "elementOnly"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_STRING_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "stringVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_BOOLEAN_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "booleanVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_BYTE_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "byteVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_DECIMAL_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "decimalVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_INT_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "intVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_FLOAT_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "floatVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_DOUBLE_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "doubleVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_DATE_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "dateVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_SHORT_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "shortVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_LONG_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "longVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_LIST_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "listVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_BYTES_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "bytesVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_INTEGER_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "integerVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_CHAR_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "charVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "readOnlyVal"
+ });
+
+ addXSDMapping
+ (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_LIST_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "readOnlyListVal"
+ });
+
+ addXSDMapping
+ (sequenceReadOnlyTypeType,
+ new String[]
+ {
+ "name", "SequenceReadOnlyType",
+ "kind", "mixed"
+ });
+
+ addXSDMapping
+ (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_MIXED),
+ new String[]
+ {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+
+ addXSDMapping
+ (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "readOnlyVal"
+ });
+
+ addXSDMapping
+ (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_LIST_VAL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "readOnlyListVal"
+ });
+
+ addXSDMapping
+ (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_UNIQUE_NAME),
+ new String[]
+ {
+ "kind", "element",
+ "name", "uniqueName"
+ });
+
+ addXSDMapping
+ (char_Type,
+ new String[]
+ {
+ "name", "char",
+ "baseType", "commonj.sdo#String",
+ "length", "1"
+ });
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String createcharFromString(String initialValue)
+ {
+ return (String)((ModelFactoryImpl)ModelFactory.INSTANCE).createStringFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertcharToString(Object instanceValue)
+ {
+ return ((ModelFactoryImpl)ModelFactory.INSTANCE).convertStringToString(instanceValue);
+ }
+
+} //ExpectedExceptionFactoryImpl
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org