You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by dk...@apache.org on 2006/08/28 20:54:46 UTC
svn commit: r437778 [40/42] - in /incubator/tuscany/java: ./ buildtools/
buildtools/src/main/resources/ das/ das/rdb/
das/rdb/src/main/java/org/apache/tuscany/das/rdb/
das/rdb/src/main/java/org/apache/tuscany/das/rdb/generator/impl/
das/rdb/src/main/ja...
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java Mon Aug 28 11:53:49 2006
@@ -1,447 +1,447 @@
-/**
- *
- * Copyright 2005 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 com.example.sequences.impl;
-
-import com.example.sequences.TwoRCsMixed;
-
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-import commonj.sdo.helper.TypeHelper;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-import org.apache.tuscany.sdo.util.BasicSequence;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Two RCs Mixed</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getMixed <em>Mixed</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup <em>Group</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getA <em>A</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getB <em>B</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getSplit <em>Split</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup1 <em>Group1</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getY <em>Y</em>}</li>
- * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getZ <em>Z</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class TwoRCsMixedImpl extends DataObjectBase implements TwoRCsMixed
-{
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int MIXED = 0;
-
- /**
- * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMixed()
- * @generated
- * @ordered
- */
-
- // How to get BasicSequence from Sequence?
-
- protected BasicSequence mixed = null;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int GROUP = 1;
-
- /**
- * The feature id for the '<em><b>A</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int A = 2;
-
- /**
- * The feature id for the '<em><b>B</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int B = 3;
-
- /**
- * The feature id for the '<em><b>Split</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int SPLIT = 4;
-
- /**
- * The default value of the '{@link #getSplit() <em>Split</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSplit()
- * @generated
- * @ordered
- */
- protected static final String SPLIT_DEFAULT_ = null;
-
- /**
- * The feature id for the '<em><b>Group1</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int GROUP1 = 5;
-
- /**
- * The feature id for the '<em><b>Y</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int Y = 6;
-
- /**
- * The feature id for the '<em><b>Z</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int Z = 7;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TwoRCsMixedImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getType()
- {
- return TypeHelper.INSTANCE.getType(TwoRCsMixed.class); //TBD Generate a more efficient implementation
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Sequence getMixed()
- {
- if (mixed == null)
- {
- mixed = createSequence(MIXED);
-
- }
- return mixed;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Sequence getGroup()
- {
- return createSequence(getMixed(), getType(), GROUP);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getA()
- {
- return getList(getGroup(), getType(), A);
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getB()
- {
- return getList(getGroup(), getType(), B);
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getSplit()
- {
- return (String)get(getMixed(), getType(), SPLIT);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSplit(String newSplit)
- {
- set(getMixed(), getType(), SPLIT, newSplit);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Sequence getGroup1()
- {
- return createSequence(getMixed(), getType(), GROUP1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getY()
- {
- return getList(getGroup1(), getType(), Y);
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getZ()
- {
- return getList(getGroup1(), getType(), Z);
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case MIXED:
- return removeFromSequence(getMixed(), otherEnd, changeContext);
- case GROUP:
- return removeFromSequence(getGroup(), otherEnd, changeContext);
- case GROUP1:
- return removeFromSequence(getGroup1(), otherEnd, changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case MIXED:
- // 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 getMixed();
- case GROUP:
- // 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 getGroup();
- case A:
- return getA();
- case B:
- return getB();
- case SPLIT:
- return getSplit();
- case GROUP1:
- // 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 getGroup1();
- case Y:
- return getY();
- case Z:
- return getZ();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case MIXED:
- setSequence(getMixed(), newValue);
- return;
- case GROUP:
- setSequence(getGroup(), newValue);
- return;
- case A:
- getA().clear();
- getA().addAll((Collection)newValue);
- return;
- case B:
- getB().clear();
- getB().addAll((Collection)newValue);
- return;
- case SPLIT:
- setSplit((String)newValue);
- return;
- case GROUP1:
- setSequence(getGroup1(), newValue);
- return;
- case Y:
- getY().clear();
- getY().addAll((Collection)newValue);
- return;
- case Z:
- getZ().clear();
- getZ().addAll((Collection)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case MIXED:
- unsetSequence(getMixed());
- return;
- case GROUP:
- unsetSequence(getGroup());
- return;
- case A:
- getA().clear();
- return;
- case B:
- getB().clear();
- return;
- case SPLIT:
- setSplit(SPLIT_DEFAULT_);
- return;
- case GROUP1:
- unsetSequence(getGroup1());
- return;
- case Y:
- getY().clear();
- return;
- case Z:
- getZ().clear();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case MIXED:
- // KDK - should this be !isSequenceEmpty?
- return mixed != null && !isSequenceEmpty(getMixed());
- case GROUP:
- return !isSequenceEmpty(getGroup());
- case A:
- return !getA().isEmpty();
- case B:
- return !getB().isEmpty();
- case SPLIT:
- return SPLIT_DEFAULT_ == null ? getSplit() != null : !SPLIT_DEFAULT_.equals(getSplit());
- case GROUP1:
- return !isSequenceEmpty(getGroup1());
- case Y:
- return !getY().isEmpty();
- case Z:
- return !getZ().isEmpty();
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString()
- {
- if (isProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (mixed: ");
- result.append(mixed);
- result.append(')');
- return result.toString();
- }
-
-} //TwoRCsMixedImpl
+/**
+ *
+ * Copyright 2005 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 com.example.sequences.impl;
+
+import com.example.sequences.TwoRCsMixed;
+
+import commonj.sdo.Sequence;
+import commonj.sdo.Type;
+
+import commonj.sdo.helper.TypeHelper;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.tuscany.sdo.impl.DataObjectBase;
+
+import org.apache.tuscany.sdo.util.BasicSequence;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Two RCs Mixed</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getB <em>B</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getSplit <em>Split</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup1 <em>Group1</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getY <em>Y</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getZ <em>Z</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TwoRCsMixedImpl extends DataObjectBase implements TwoRCsMixed
+{
+ /**
+ * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int MIXED = 0;
+
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+
+ // How to get BasicSequence from Sequence?
+
+ protected BasicSequence mixed = null;
+
+ /**
+ * The feature id for the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int GROUP = 1;
+
+ /**
+ * The feature id for the '<em><b>A</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int A = 2;
+
+ /**
+ * The feature id for the '<em><b>B</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int B = 3;
+
+ /**
+ * The feature id for the '<em><b>Split</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int SPLIT = 4;
+
+ /**
+ * The default value of the '{@link #getSplit() <em>Split</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSplit()
+ * @generated
+ * @ordered
+ */
+ protected static final String SPLIT_DEFAULT_ = null;
+
+ /**
+ * The feature id for the '<em><b>Group1</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int GROUP1 = 5;
+
+ /**
+ * The feature id for the '<em><b>Y</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int Y = 6;
+
+ /**
+ * The feature id for the '<em><b>Z</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int Z = 7;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TwoRCsMixedImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getType()
+ {
+ return TypeHelper.INSTANCE.getType(TwoRCsMixed.class); //TBD Generate a more efficient implementation
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getMixed()
+ {
+ if (mixed == null)
+ {
+ mixed = createSequence(MIXED);
+
+ }
+ return mixed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup()
+ {
+ return createSequence(getMixed(), getType(), GROUP);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getA()
+ {
+ return getList(getGroup(), getType(), A);
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getB()
+ {
+ return getList(getGroup(), getType(), B);
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSplit()
+ {
+ return (String)get(getMixed(), getType(), SPLIT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSplit(String newSplit)
+ {
+ set(getMixed(), getType(), SPLIT, newSplit);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup1()
+ {
+ return createSequence(getMixed(), getType(), GROUP1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getY()
+ {
+ return getList(getGroup1(), getType(), Y);
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getZ()
+ {
+ return getList(getGroup1(), getType(), Z);
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return removeFromSequence(getMixed(), otherEnd, changeContext);
+ case GROUP:
+ return removeFromSequence(getGroup(), otherEnd, changeContext);
+ case GROUP1:
+ return removeFromSequence(getGroup1(), otherEnd, changeContext);
+ }
+ return super.inverseRemove(otherEnd, propertyIndex, changeContext);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object get(int propertyIndex, boolean resolve)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ // 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 getMixed();
+ case GROUP:
+ // 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 getGroup();
+ case A:
+ return getA();
+ case B:
+ return getB();
+ case SPLIT:
+ return getSplit();
+ case GROUP1:
+ // 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 getGroup1();
+ case Y:
+ return getY();
+ case Z:
+ return getZ();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ setSequence(getMixed(), newValue);
+ return;
+ case GROUP:
+ setSequence(getGroup(), newValue);
+ return;
+ case A:
+ getA().clear();
+ getA().addAll((Collection)newValue);
+ return;
+ case B:
+ getB().clear();
+ getB().addAll((Collection)newValue);
+ return;
+ case SPLIT:
+ setSplit((String)newValue);
+ return;
+ case GROUP1:
+ setSequence(getGroup1(), newValue);
+ return;
+ case Y:
+ getY().clear();
+ getY().addAll((Collection)newValue);
+ return;
+ case Z:
+ getZ().clear();
+ getZ().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ unsetSequence(getMixed());
+ return;
+ case GROUP:
+ unsetSequence(getGroup());
+ return;
+ case A:
+ getA().clear();
+ return;
+ case B:
+ getB().clear();
+ return;
+ case SPLIT:
+ setSplit(SPLIT_DEFAULT_);
+ return;
+ case GROUP1:
+ unsetSequence(getGroup1());
+ return;
+ case Y:
+ getY().clear();
+ return;
+ case Z:
+ getZ().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ // KDK - should this be !isSequenceEmpty?
+ return mixed != null && !isSequenceEmpty(getMixed());
+ case GROUP:
+ return !isSequenceEmpty(getGroup());
+ case A:
+ return !getA().isEmpty();
+ case B:
+ return !getB().isEmpty();
+ case SPLIT:
+ return SPLIT_DEFAULT_ == null ? getSplit() != null : !SPLIT_DEFAULT_.equals(getSplit());
+ case GROUP1:
+ return !isSequenceEmpty(getGroup1());
+ case Y:
+ return !getY().isEmpty();
+ case Z:
+ return !getZ().isEmpty();
+ }
+ return super.isSet(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString()
+ {
+ if (isProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TwoRCsMixedImpl
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTestCase.java?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTestCase.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTestCase.java Mon Aug 28 11:53:49 2006
@@ -1,249 +1,249 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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.tuscany.sdo.test;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.sequences.MixedQuote;
-import com.example.sequences.MixedRepeatingChoice;
-import com.example.sequences.RepeatingChoice;
-import com.example.sequences.SequencesFactory;
-import com.example.sequences.TwoRCs;
-import com.example.sequences.TwoRCsMixed;
-import commonj.sdo.DataObject;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.XMLHelper;
-
-
-public class StaticSequenceNoEmfTestCase extends TestCase {
- private final String TEST_NAMESPACE = "http://www.example.com/sequences";
- private final String MQ_TEST_DATA = "/mixedStaticTestResult.xml";
- private final String RC_TEST_DATA = "/repeatingChoiceTestResult.xml";
- private final String MRC_TEST_DATA = "/mixedRepeatingChoiceTestResult.xml";
- private final String RC2_TEST_DATA = "/twoRepeatingChoicesTestResult.xml";
- private final String RC2M_TEST_DATA = "/twoRepeatingChoicesMixedTestResult.xml";
-
- /**
- * Sequenced type SDO 2 test.
- */
- public void testMixedQuoteType() throws IOException {
- MixedQuote quote = SequencesFactory.INSTANCE.createMixedQuote();
-
- Type t = ((DataObject)quote).getType();
- List ps = t.getProperties();
-
-
- Sequence sequence = quote.getMixed();
-
- sequence.add("\n ");
-
- quote.setSymbol("fbnt");
-
- sequence.add("\n ");
-
- quote.setCompanyName("FlyByNightTechnology");
-
- sequence.add("\n some text\n ");
-
- List quotes = quote.getQuotes();
- MixedQuote child = SequencesFactory.INSTANCE.createMixedQuote();
- quotes.add(child);
-
- child.setPrice(new BigDecimal("2000.0"));
-
- sequence.add("\n more text\n ");
-
- sequence.add("price", new BigDecimal("1000.0"));
-
- sequence.add("\n");
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- XMLHelper.INSTANCE.save((DataObject)quote, TEST_NAMESPACE, "mixedStockQuote", baos);
- assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MQ_TEST_DATA)));
- }
-
- public void testRepeatingChoice() throws IOException
- {
- RepeatingChoice rc = SequencesFactory.INSTANCE.createRepeatingChoice();
-
- List as = rc.getA();
- List bs = rc.getB();
-
- bs.add(new Integer(1));
- as.add("foo");
- as.add("bar");
- bs.add(new Integer(2));
-
-
-
-
- Sequence group = rc.getGroup();
- assertEquals(group.size(), 4);
- assertEquals(rc.getA().size(), 2);
- assertEquals(rc.getB().size(),2);
-
- assertEquals(group.getValue(0), new Integer(1));
- assertEquals(group.getValue(1), "foo");
- assertEquals(group.getValue(2), "bar");
- assertEquals(group.getValue(3), new Integer(2));
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- XMLHelper.INSTANCE.save((DataObject)rc, TEST_NAMESPACE, "rc", baos);
- assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC_TEST_DATA)));
- }
-
- public void testMixedRepeatingChoice() throws Exception {
- MixedRepeatingChoice mrc = SequencesFactory.INSTANCE.createMixedRepeatingChoice();
-
- List as = mrc.getA();
- List bs = mrc.getB();
-
-
- bs.add(new Integer(1));
- as.add("foo");
- Sequence mixed = mrc.getMixed();
- mixed.add("some mixed text");
- as.add("bar");
- bs.add(new Integer(2));
-
- // FIXME reintroduce check
- // assertEquals(4, mrc.getGroup().size());
- assertEquals(5, mrc.getMixed().size());
- assertEquals(2, mrc.getA().size());
- assertEquals(2, mrc.getB().size(),2);
-
-
-
- assertEquals(mixed.getValue(0), new Integer(1));
- assertEquals(mixed.getValue(1), "foo");
- assertEquals(mixed.getValue(3), "bar");
- assertEquals(mixed.getValue(4), new Integer(2));
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-
- XMLHelper.INSTANCE.save((DataObject)mrc, TEST_NAMESPACE, "mrc", baos);
- assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MRC_TEST_DATA)));
- }
-
- public void test2RepeatingChoices() throws Exception {
- TwoRCs rc2 = SequencesFactory.INSTANCE.createTwoRCs();
-
- List as = rc2.getA();
- List bs = rc2.getB();
- List ys = rc2.getY();
- List zs = rc2.getZ();
-
- zs.add(new Integer(99));
- bs.add(new Integer(1));
- ys.add("fred");
- as.add("foo");
- as.add("bar");
- bs.add(new Integer(2));
- rc2.setSplit("banana");
-
-
- Sequence group = rc2.getGroup();
- assertEquals(group.size(), 4);
- assertEquals(rc2.getA().size(), 2);
- assertEquals(rc2.getB().size(),2);
-
- Sequence group1 = rc2.getGroup1();
- assertEquals(group1.size(), 2);
- assertEquals(rc2.getY().size(), 1);
- assertEquals(rc2.getZ().size(),1);
-
- assertEquals(group.getValue(0), new Integer(1));
- assertEquals(group.getValue(1), "foo");
- assertEquals(group.getValue(2), "bar");
- assertEquals(group.getValue(3), new Integer(2));
- assertEquals(group1.getValue(0), new Integer(99));
- assertEquals(group1.getValue(1), "fred");
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-
- XMLHelper.INSTANCE.save((DataObject)rc2, TEST_NAMESPACE, "rc2", baos);
- assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC2_TEST_DATA)));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- SDOUtil.registerStaticTypes(SequencesFactory.class);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void test2RepeatingChoicesMixed() throws Exception {
- TwoRCsMixed rc2m = SequencesFactory.INSTANCE.createTwoRCsMixed();
-
- List as = rc2m.getA();
- List bs = rc2m.getB();
- List ys = rc2m.getY();
- List zs = rc2m.getZ();
- Sequence mixed = rc2m.getMixed();
-
- bs.add(new Integer(1));
- mixed.add("where will this appear?");
- as.add("foo");
- as.add("bar");
- bs.add(new Integer(2));
- rc2m.setSplit("pea");
- zs.add(new Integer(99));
- ys.add("fred");
-
-
- assertEquals(8, mixed.size());
-
- Sequence group = rc2m.getGroup();
- // FIXME reintroduce test assertEquals(4, group.size());
- assertEquals(rc2m.getA().size(), 2);
- assertEquals(rc2m.getB().size(),2);
-
- Sequence group1 = rc2m.getGroup1();
- // FIXME ditto assertEquals(group1.size(), 2);
- assertEquals(rc2m.getY().size(), 1);
- assertEquals(rc2m.getZ().size(),1);
-
- int i = 0;
- assertEquals(mixed.getValue(i++), new Integer(1));
- assertEquals(mixed.getValue(i++), "where will this appear?");
- assertEquals(mixed.getValue(i++), "foo");
- assertEquals(mixed.getValue(i++), "bar");
- assertEquals(mixed.getValue(i++), new Integer(2));
- assertEquals(mixed.getValue(i++), "pea");
- assertEquals(mixed.getValue(i++), new Integer(99));
- assertEquals(mixed.getValue(i++), "fred");
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- XMLHelper.INSTANCE.save((DataObject)rc2m, TEST_NAMESPACE, "rc2m", baos);
- assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC2M_TEST_DATA)));
- }
-
-
-}
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.tuscany.sdo.test;
+
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sdo.util.SDOUtil;
+
+import com.example.sequences.MixedQuote;
+import com.example.sequences.MixedRepeatingChoice;
+import com.example.sequences.RepeatingChoice;
+import com.example.sequences.SequencesFactory;
+import com.example.sequences.TwoRCs;
+import com.example.sequences.TwoRCsMixed;
+import commonj.sdo.DataObject;
+import commonj.sdo.Sequence;
+import commonj.sdo.Type;
+import commonj.sdo.helper.XMLHelper;
+
+
+public class StaticSequenceNoEmfTestCase extends TestCase {
+ private final String TEST_NAMESPACE = "http://www.example.com/sequences";
+ private final String MQ_TEST_DATA = "/mixedStaticTestResult.xml";
+ private final String RC_TEST_DATA = "/repeatingChoiceTestResult.xml";
+ private final String MRC_TEST_DATA = "/mixedRepeatingChoiceTestResult.xml";
+ private final String RC2_TEST_DATA = "/twoRepeatingChoicesTestResult.xml";
+ private final String RC2M_TEST_DATA = "/twoRepeatingChoicesMixedTestResult.xml";
+
+ /**
+ * Sequenced type SDO 2 test.
+ */
+ public void testMixedQuoteType() throws IOException {
+ MixedQuote quote = SequencesFactory.INSTANCE.createMixedQuote();
+
+ Type t = ((DataObject)quote).getType();
+ List ps = t.getProperties();
+
+
+ Sequence sequence = quote.getMixed();
+
+ sequence.add("\n ");
+
+ quote.setSymbol("fbnt");
+
+ sequence.add("\n ");
+
+ quote.setCompanyName("FlyByNightTechnology");
+
+ sequence.add("\n some text\n ");
+
+ List quotes = quote.getQuotes();
+ MixedQuote child = SequencesFactory.INSTANCE.createMixedQuote();
+ quotes.add(child);
+
+ child.setPrice(new BigDecimal("2000.0"));
+
+ sequence.add("\n more text\n ");
+
+ sequence.add("price", new BigDecimal("1000.0"));
+
+ sequence.add("\n");
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ XMLHelper.INSTANCE.save((DataObject)quote, TEST_NAMESPACE, "mixedStockQuote", baos);
+ assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MQ_TEST_DATA)));
+ }
+
+ public void testRepeatingChoice() throws IOException
+ {
+ RepeatingChoice rc = SequencesFactory.INSTANCE.createRepeatingChoice();
+
+ List as = rc.getA();
+ List bs = rc.getB();
+
+ bs.add(new Integer(1));
+ as.add("foo");
+ as.add("bar");
+ bs.add(new Integer(2));
+
+
+
+
+ Sequence group = rc.getGroup();
+ assertEquals(group.size(), 4);
+ assertEquals(rc.getA().size(), 2);
+ assertEquals(rc.getB().size(),2);
+
+ assertEquals(group.getValue(0), new Integer(1));
+ assertEquals(group.getValue(1), "foo");
+ assertEquals(group.getValue(2), "bar");
+ assertEquals(group.getValue(3), new Integer(2));
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ XMLHelper.INSTANCE.save((DataObject)rc, TEST_NAMESPACE, "rc", baos);
+ assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC_TEST_DATA)));
+ }
+
+ public void testMixedRepeatingChoice() throws Exception {
+ MixedRepeatingChoice mrc = SequencesFactory.INSTANCE.createMixedRepeatingChoice();
+
+ List as = mrc.getA();
+ List bs = mrc.getB();
+
+
+ bs.add(new Integer(1));
+ as.add("foo");
+ Sequence mixed = mrc.getMixed();
+ mixed.add("some mixed text");
+ as.add("bar");
+ bs.add(new Integer(2));
+
+ // FIXME reintroduce check
+ // assertEquals(4, mrc.getGroup().size());
+ assertEquals(5, mrc.getMixed().size());
+ assertEquals(2, mrc.getA().size());
+ assertEquals(2, mrc.getB().size(),2);
+
+
+
+ assertEquals(mixed.getValue(0), new Integer(1));
+ assertEquals(mixed.getValue(1), "foo");
+ assertEquals(mixed.getValue(3), "bar");
+ assertEquals(mixed.getValue(4), new Integer(2));
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+
+ XMLHelper.INSTANCE.save((DataObject)mrc, TEST_NAMESPACE, "mrc", baos);
+ assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MRC_TEST_DATA)));
+ }
+
+ public void test2RepeatingChoices() throws Exception {
+ TwoRCs rc2 = SequencesFactory.INSTANCE.createTwoRCs();
+
+ List as = rc2.getA();
+ List bs = rc2.getB();
+ List ys = rc2.getY();
+ List zs = rc2.getZ();
+
+ zs.add(new Integer(99));
+ bs.add(new Integer(1));
+ ys.add("fred");
+ as.add("foo");
+ as.add("bar");
+ bs.add(new Integer(2));
+ rc2.setSplit("banana");
+
+
+ Sequence group = rc2.getGroup();
+ assertEquals(group.size(), 4);
+ assertEquals(rc2.getA().size(), 2);
+ assertEquals(rc2.getB().size(),2);
+
+ Sequence group1 = rc2.getGroup1();
+ assertEquals(group1.size(), 2);
+ assertEquals(rc2.getY().size(), 1);
+ assertEquals(rc2.getZ().size(),1);
+
+ assertEquals(group.getValue(0), new Integer(1));
+ assertEquals(group.getValue(1), "foo");
+ assertEquals(group.getValue(2), "bar");
+ assertEquals(group.getValue(3), new Integer(2));
+ assertEquals(group1.getValue(0), new Integer(99));
+ assertEquals(group1.getValue(1), "fred");
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+
+ XMLHelper.INSTANCE.save((DataObject)rc2, TEST_NAMESPACE, "rc2", baos);
+ assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC2_TEST_DATA)));
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ SDOUtil.registerStaticTypes(SequencesFactory.class);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void test2RepeatingChoicesMixed() throws Exception {
+ TwoRCsMixed rc2m = SequencesFactory.INSTANCE.createTwoRCsMixed();
+
+ List as = rc2m.getA();
+ List bs = rc2m.getB();
+ List ys = rc2m.getY();
+ List zs = rc2m.getZ();
+ Sequence mixed = rc2m.getMixed();
+
+ bs.add(new Integer(1));
+ mixed.add("where will this appear?");
+ as.add("foo");
+ as.add("bar");
+ bs.add(new Integer(2));
+ rc2m.setSplit("pea");
+ zs.add(new Integer(99));
+ ys.add("fred");
+
+
+ assertEquals(8, mixed.size());
+
+ Sequence group = rc2m.getGroup();
+ // FIXME reintroduce test assertEquals(4, group.size());
+ assertEquals(rc2m.getA().size(), 2);
+ assertEquals(rc2m.getB().size(),2);
+
+ Sequence group1 = rc2m.getGroup1();
+ // FIXME ditto assertEquals(group1.size(), 2);
+ assertEquals(rc2m.getY().size(), 1);
+ assertEquals(rc2m.getZ().size(),1);
+
+ int i = 0;
+ assertEquals(mixed.getValue(i++), new Integer(1));
+ assertEquals(mixed.getValue(i++), "where will this appear?");
+ assertEquals(mixed.getValue(i++), "foo");
+ assertEquals(mixed.getValue(i++), "bar");
+ assertEquals(mixed.getValue(i++), new Integer(2));
+ assertEquals(mixed.getValue(i++), "pea");
+ assertEquals(mixed.getValue(i++), new Integer(99));
+ assertEquals(mixed.getValue(i++), "fred");
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ XMLHelper.INSTANCE.save((DataObject)rc2m, TEST_NAMESPACE, "rc2m", baos);
+ assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC2M_TEST_DATA)));
+ }
+
+
+}
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java Mon Aug 28 11:53:49 2006
@@ -1,285 +1,285 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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.tuscany.sdo.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-public class TestUtil
-{
- private static void getAllNodes(NodeList nodeList, List nodes)
- {
- int length = nodeList.getLength();
- if (length == 0)
- {
- return;
- }
-
- for (int i=0; i<length; i++)
- {
- Node node = nodeList.item(i);
- nodes.add(node);
- getAllNodes(node.getChildNodes(), nodes);
- } // for
- }
-
- private static boolean equalNamedNodeMap(NamedNodeMap mapA, NamedNodeMap mapB) {
- if (mapA == null) {
- if (mapB == null) {
- return true;
- }
- return false;
- }
- if (mapA.getLength() != mapB.getLength()) {
- return false;
- }
- for (int i = 0; i < mapA.getLength(); i++) {
- Node trialNode = mapA.item(i);
- if (trialNode == null) {
- return false;
- }
- Node checkNode = mapB.getNamedItem(trialNode.getNodeName());
- if (checkNode == null) {
- return false;
- }
- if (!equalNode(trialNode, checkNode)) {
- return false;
- }
- }
- return true;
- }
-
- private static boolean equalNode(Node nodeA, Node nodeB) {
- if (nodeA == null) {
- if (nodeB == null) {
- return true;
- }
- return false;
- }
- // following is intended to provide same function as 1.5 isEqualNode()
- if (nodeA.getNodeType() != nodeB.getNodeType()) {
- return false;
- }
- if (!equalString(nodeA.getNodeName(), nodeB.getNodeName())) {
- return false;
- }
- if (!equalString(nodeA.getLocalName(), nodeB.getLocalName())) {
- return false;
- }
- if (!equalString(nodeA.getNamespaceURI(), nodeB.getNamespaceURI())) {
- return false;
- }
- if (!equalString(nodeA.getNamespaceURI(), nodeB.getNamespaceURI())) {
- return false;
- }
- if (!equalString(nodeA.getPrefix(), nodeB.getPrefix())) {
- return false;
- }
- if (!equalString(nodeA.getNodeValue(), nodeB.getNodeValue())) {
- return false;
- }
- if (!equalNamedNodeMap(nodeA.getAttributes(), nodeB.getAttributes())) {
- return false;
- }
- if (!equalNodeList(nodeA.getChildNodes(), nodeB.getChildNodes())) {
- return false;
- }
- if (nodeA.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
- DocumentType documentTypeA = (DocumentType) nodeA;
- DocumentType documentTypeB = (DocumentType) nodeB;
- if (!equalString(documentTypeA.getPublicId(), documentTypeB.getPublicId())) {
- return false;
- }
- if (!equalString(documentTypeA.getSystemId(), documentTypeB.getSystemId())) {
- return false;
- }
- if (!equalString(documentTypeA.getInternalSubset(), documentTypeB.getInternalSubset())) {
- return false;
- }
- if (!equalNamedNodeMap(documentTypeA.getEntities(), documentTypeB.getEntities())) {
- return false;
- }
- if (!equalNamedNodeMap(documentTypeA.getNotations(), documentTypeB.getNotations())) {
- return false;
- }
- }
- return true;
- }
-
- private static boolean equalNodeList(NodeList nodeListA, NodeList nodeListB) {
- if (nodeListA == null) {
- if (nodeListB == null) {
- return true;
- }
- return false;
- }
- return equalNodes(nodeListA, nodeListB);
- }
-
- private static boolean equalString(String stringA, String stringB) {
- if (stringA == null) {
- if (stringB == null) {
- return true;
- }
- return false;
- }
- return stringA.equals(stringB);
- }
-
- private static boolean equalNodes(NodeList sourceNodeList, NodeList targetNodeList)
- {
- ArrayList sourceNodes = new ArrayList();
- ArrayList targetNodes = new ArrayList();
-
- getAllNodes(sourceNodeList, sourceNodes);
- getAllNodes(targetNodeList, targetNodes);
-
- int sourceLength = sourceNodes.size();
- int targetLength = targetNodes.size();
-
- if (sourceLength != targetLength)
- {
- return false;
- }
-
- for (int i=0; i<sourceLength; i++)
- {
- Node sourceNode = (Node)sourceNodes.get(i);
- Node targetNode = (Node)targetNodes.get(i);
-
- /* remove comment when migrated to Java 1.5
- if (!sourceNode.isEqualNode(targetNode))
- {
- return false;
- }
- */
- // following is intended as 1.4 equivalent of isEqualNode()
- if (!equalNode(sourceNode, targetNode))
- {
- return false;
- }
- } // for
-
- return true;
- }
-
- public static boolean equalXmlFiles(URL source, URL target)
- {
- try {
- return equalXmlFiles(source.openStream(), target.openStream());
- }
- catch (IOException e)
- {
- return false;
- }
- }
-
- public static boolean equalXmlFiles(InputStream sourceStream, URL target)
- {
- try {
- return equalXmlFiles(sourceStream, target.openStream());
- }
- catch (IOException e)
- {
- return false;
- }
- }
-
- public static boolean equalXmlFiles(URL source, InputStream targetStream)
- {
- try {
- return equalXmlFiles(source.openStream(), targetStream);
- }
- catch (IOException e)
- {
- return false;
- }
- }
-
- public static boolean equalXmlFiles(InputStream sourceStream, InputStream targetStream)
- {
- DocumentBuilder builder;
- Document sourceDocument;
- Document targetDocument;
-
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setIgnoringComments(true);
- builder = factory.newDocumentBuilder();
- //builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- sourceDocument = builder.parse(sourceStream);
- targetDocument = builder.parse(targetStream);
- }
- catch (FactoryConfigurationError fce) {
- return false;
- }
- catch (ParserConfigurationException ce) {
- return false;
- }
- catch (SAXException se)
- {
- return false;
- }
- catch (IOException ie)
- {
- return false;
- }
-
- sourceDocument.normalize();
- targetDocument.normalize();
-
- /* remove comment when migrated to Java 1.5
- if (!sourceDocument.getXmlVersion().equals(targetDocument.getXmlVersion()))
- {
- return false;
- }
-
- String sourceXmlEncoding = sourceDocument.getXmlEncoding();
- String targetXmlEncoding = targetDocument.getXmlEncoding();
-
- if (sourceXmlEncoding != null && targetXmlEncoding != null &&
- sourceXmlEncoding.equalsIgnoreCase(targetXmlEncoding))
- {
- // continue
- }
- else
- {
- return false;
- }
- */
-
- NodeList sourceNodes = sourceDocument.getChildNodes();
- NodeList targetNodes = targetDocument.getChildNodes();
-
- return equalNodes(sourceNodes, targetNodes);
- }
-}
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.tuscany.sdo.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+public class TestUtil
+{
+ private static void getAllNodes(NodeList nodeList, List nodes)
+ {
+ int length = nodeList.getLength();
+ if (length == 0)
+ {
+ return;
+ }
+
+ for (int i=0; i<length; i++)
+ {
+ Node node = nodeList.item(i);
+ nodes.add(node);
+ getAllNodes(node.getChildNodes(), nodes);
+ } // for
+ }
+
+ private static boolean equalNamedNodeMap(NamedNodeMap mapA, NamedNodeMap mapB) {
+ if (mapA == null) {
+ if (mapB == null) {
+ return true;
+ }
+ return false;
+ }
+ if (mapA.getLength() != mapB.getLength()) {
+ return false;
+ }
+ for (int i = 0; i < mapA.getLength(); i++) {
+ Node trialNode = mapA.item(i);
+ if (trialNode == null) {
+ return false;
+ }
+ Node checkNode = mapB.getNamedItem(trialNode.getNodeName());
+ if (checkNode == null) {
+ return false;
+ }
+ if (!equalNode(trialNode, checkNode)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static boolean equalNode(Node nodeA, Node nodeB) {
+ if (nodeA == null) {
+ if (nodeB == null) {
+ return true;
+ }
+ return false;
+ }
+ // following is intended to provide same function as 1.5 isEqualNode()
+ if (nodeA.getNodeType() != nodeB.getNodeType()) {
+ return false;
+ }
+ if (!equalString(nodeA.getNodeName(), nodeB.getNodeName())) {
+ return false;
+ }
+ if (!equalString(nodeA.getLocalName(), nodeB.getLocalName())) {
+ return false;
+ }
+ if (!equalString(nodeA.getNamespaceURI(), nodeB.getNamespaceURI())) {
+ return false;
+ }
+ if (!equalString(nodeA.getNamespaceURI(), nodeB.getNamespaceURI())) {
+ return false;
+ }
+ if (!equalString(nodeA.getPrefix(), nodeB.getPrefix())) {
+ return false;
+ }
+ if (!equalString(nodeA.getNodeValue(), nodeB.getNodeValue())) {
+ return false;
+ }
+ if (!equalNamedNodeMap(nodeA.getAttributes(), nodeB.getAttributes())) {
+ return false;
+ }
+ if (!equalNodeList(nodeA.getChildNodes(), nodeB.getChildNodes())) {
+ return false;
+ }
+ if (nodeA.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
+ DocumentType documentTypeA = (DocumentType) nodeA;
+ DocumentType documentTypeB = (DocumentType) nodeB;
+ if (!equalString(documentTypeA.getPublicId(), documentTypeB.getPublicId())) {
+ return false;
+ }
+ if (!equalString(documentTypeA.getSystemId(), documentTypeB.getSystemId())) {
+ return false;
+ }
+ if (!equalString(documentTypeA.getInternalSubset(), documentTypeB.getInternalSubset())) {
+ return false;
+ }
+ if (!equalNamedNodeMap(documentTypeA.getEntities(), documentTypeB.getEntities())) {
+ return false;
+ }
+ if (!equalNamedNodeMap(documentTypeA.getNotations(), documentTypeB.getNotations())) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static boolean equalNodeList(NodeList nodeListA, NodeList nodeListB) {
+ if (nodeListA == null) {
+ if (nodeListB == null) {
+ return true;
+ }
+ return false;
+ }
+ return equalNodes(nodeListA, nodeListB);
+ }
+
+ private static boolean equalString(String stringA, String stringB) {
+ if (stringA == null) {
+ if (stringB == null) {
+ return true;
+ }
+ return false;
+ }
+ return stringA.equals(stringB);
+ }
+
+ private static boolean equalNodes(NodeList sourceNodeList, NodeList targetNodeList)
+ {
+ ArrayList sourceNodes = new ArrayList();
+ ArrayList targetNodes = new ArrayList();
+
+ getAllNodes(sourceNodeList, sourceNodes);
+ getAllNodes(targetNodeList, targetNodes);
+
+ int sourceLength = sourceNodes.size();
+ int targetLength = targetNodes.size();
+
+ if (sourceLength != targetLength)
+ {
+ return false;
+ }
+
+ for (int i=0; i<sourceLength; i++)
+ {
+ Node sourceNode = (Node)sourceNodes.get(i);
+ Node targetNode = (Node)targetNodes.get(i);
+
+ /* remove comment when migrated to Java 1.5
+ if (!sourceNode.isEqualNode(targetNode))
+ {
+ return false;
+ }
+ */
+ // following is intended as 1.4 equivalent of isEqualNode()
+ if (!equalNode(sourceNode, targetNode))
+ {
+ return false;
+ }
+ } // for
+
+ return true;
+ }
+
+ public static boolean equalXmlFiles(URL source, URL target)
+ {
+ try {
+ return equalXmlFiles(source.openStream(), target.openStream());
+ }
+ catch (IOException e)
+ {
+ return false;
+ }
+ }
+
+ public static boolean equalXmlFiles(InputStream sourceStream, URL target)
+ {
+ try {
+ return equalXmlFiles(sourceStream, target.openStream());
+ }
+ catch (IOException e)
+ {
+ return false;
+ }
+ }
+
+ public static boolean equalXmlFiles(URL source, InputStream targetStream)
+ {
+ try {
+ return equalXmlFiles(source.openStream(), targetStream);
+ }
+ catch (IOException e)
+ {
+ return false;
+ }
+ }
+
+ public static boolean equalXmlFiles(InputStream sourceStream, InputStream targetStream)
+ {
+ DocumentBuilder builder;
+ Document sourceDocument;
+ Document targetDocument;
+
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setIgnoringComments(true);
+ builder = factory.newDocumentBuilder();
+ //builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ sourceDocument = builder.parse(sourceStream);
+ targetDocument = builder.parse(targetStream);
+ }
+ catch (FactoryConfigurationError fce) {
+ return false;
+ }
+ catch (ParserConfigurationException ce) {
+ return false;
+ }
+ catch (SAXException se)
+ {
+ return false;
+ }
+ catch (IOException ie)
+ {
+ return false;
+ }
+
+ sourceDocument.normalize();
+ targetDocument.normalize();
+
+ /* remove comment when migrated to Java 1.5
+ if (!sourceDocument.getXmlVersion().equals(targetDocument.getXmlVersion()))
+ {
+ return false;
+ }
+
+ String sourceXmlEncoding = sourceDocument.getXmlEncoding();
+ String targetXmlEncoding = targetDocument.getXmlEncoding();
+
+ if (sourceXmlEncoding != null && targetXmlEncoding != null &&
+ sourceXmlEncoding.equalsIgnoreCase(targetXmlEncoding))
+ {
+ // continue
+ }
+ else
+ {
+ return false;
+ }
+ */
+
+ NodeList sourceNodes = sourceDocument.getChildNodes();
+ NodeList targetNodes = targetDocument.getChildNodes();
+
+ return equalNodes(sourceNodes, targetNodes);
+ }
+}
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/enum.xsd
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon Aug 28 11:53:49 2006
@@ -1 +1 @@
-Rev,Date
+Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/enum.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml Mon Aug 28 11:53:49 2006
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<sequences:mrc xmlns:sequences="http://www.example.com/sequences">
- <b>1</b>
- <a>foo</a>
-some mixed text <a>bar</a>
- <b>2</b>
-</sequences:mrc>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<sequences:mrc xmlns:sequences="http://www.example.com/sequences">
+ <b>1</b>
+ <a>foo</a>
+some mixed text <a>bar</a>
+ <b>2</b>
+</sequences:mrc>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml Mon Aug 28 11:53:49 2006
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<sequences:mixedStockQuote xmlns:sequences="http://www.example.com/sequences">
-
- <symbol>fbnt</symbol>
-
- <companyName>FlyByNightTechnology</companyName>
-
- some text
- <quotes>
- <price>2000.0</price>
- </quotes>
-
- more text
- <price>1000.0</price>
-
-</sequences:mixedStockQuote>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<sequences:mixedStockQuote xmlns:sequences="http://www.example.com/sequences">
+
+ <symbol>fbnt</symbol>
+
+ <companyName>FlyByNightTechnology</companyName>
+
+ some text
+ <quotes>
+ <price>2000.0</price>
+ </quotes>
+
+ more text
+ <price>1000.0</price>
+
+</sequences:mixedStockQuote>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/mixedStaticTestResult.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd Mon Aug 28 11:53:49 2006
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<xsd:schema xmlns:repchoice="http://www.example.com/repchoice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/repchoice">
-
- <xsd:element name="rc" type="repchoice:RCType"/>
-
- <xsd:complexType name="RCType">
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="s" type="xsd:string"/>
- <xsd:element name="i" type="xsd:int"/>
- <xsd:element name="f" type="xsd:float"/>
- </xsd:choice>
- </xsd:complexType>
-
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsd:schema xmlns:repchoice="http://www.example.com/repchoice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/repchoice">
+
+ <xsd:element name="rc" type="repchoice:RCType"/>
+
+ <xsd:complexType name="RCType">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="s" type="xsd:string"/>
+ <xsd:element name="i" type="xsd:int"/>
+ <xsd:element name="f" type="xsd:float"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+</xsd:schema>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoice.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml Mon Aug 28 11:53:49 2006
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<sequences:rc xmlns:sequences="http://www.example.com/sequences">
- <b>1</b>
- <a>foo</a>
- <a>bar</a>
- <b>2</b>
-</sequences:rc>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<sequences:rc xmlns:sequences="http://www.example.com/sequences">
+ <b>1</b>
+ <a>foo</a>
+ <a>bar</a>
+ <b>2</b>
+</sequences:rc>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd Mon Aug 28 11:53:49 2006
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<xsd:schema xmlns:seq="http://www.example.com/sequences"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.com/sequences">
-
- <xsd:element name="mixedStockQuote" type="seq:MixedQuote" />
- <xsd:element name="rc" type="seq:RepeatingChoice" />
- <xsd:element name="mrc" type="seq:MixedRepeatingChoice" />
- <xsd:element name="rc2" type="seq:TwoRCs" />
- <xsd:element name="mrc2" type="seq:TwoRCsMixed" />
-
-
-
- <xsd:complexType mixed="true" name="MixedQuote">
- <xsd:sequence>
- <xsd:element name="symbol" type="xsd:string" />
- <xsd:element name="companyName" type="xsd:string" />
- <xsd:element name="price" type="xsd:decimal" />
- <xsd:element name="open1" type="xsd:decimal" />
- <xsd:element name="high" type="xsd:decimal" />
- <xsd:element name="low" type="xsd:decimal" />
- <xsd:element name="volume" type="xsd:double" />
- <xsd:element name="change1" type="xsd:double" />
- <xsd:element maxOccurs="unbounded" minOccurs="0"
- name="quotes" type="seq:MixedQuote" />
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="RepeatingChoice">
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="a" type="xsd:string" />
- <xsd:element name="b" type="xsd:int" />
- </xsd:choice>
- </xsd:complexType>
-
-
- <xsd:complexType mixed="true" name="MixedRepeatingChoice">
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="a" type="xsd:string" />
- <xsd:element name="b" type="xsd:int" />
- </xsd:choice>
- </xsd:complexType>
-
-
- <xsd:complexType name="TwoRCs">
- <xsd:sequence>
-
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="a" type="xsd:string" />
- <xsd:element name="b" type="xsd:int" />
- </xsd:choice>
-
- <xsd:element name="split" type="xsd:string" />
-
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="y" type="xsd:string" />
- <xsd:element name="z" type="xsd:int" />
- </xsd:choice>
-
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType mixed="true" name="TwoRCsMixed">
- <xsd:sequence>
-
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="a" type="xsd:string" />
- <xsd:element name="b" type="xsd:int" />
- </xsd:choice>
-
- <xsd:element name="split" type="xsd:string" />
-
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element name="y" type="xsd:string" />
- <xsd:element name="z" type="xsd:int" />
- </xsd:choice>
-
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsd:schema xmlns:seq="http://www.example.com/sequences"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.example.com/sequences">
+
+ <xsd:element name="mixedStockQuote" type="seq:MixedQuote" />
+ <xsd:element name="rc" type="seq:RepeatingChoice" />
+ <xsd:element name="mrc" type="seq:MixedRepeatingChoice" />
+ <xsd:element name="rc2" type="seq:TwoRCs" />
+ <xsd:element name="mrc2" type="seq:TwoRCsMixed" />
+
+
+
+ <xsd:complexType mixed="true" name="MixedQuote">
+ <xsd:sequence>
+ <xsd:element name="symbol" type="xsd:string" />
+ <xsd:element name="companyName" type="xsd:string" />
+ <xsd:element name="price" type="xsd:decimal" />
+ <xsd:element name="open1" type="xsd:decimal" />
+ <xsd:element name="high" type="xsd:decimal" />
+ <xsd:element name="low" type="xsd:decimal" />
+ <xsd:element name="volume" type="xsd:double" />
+ <xsd:element name="change1" type="xsd:double" />
+ <xsd:element maxOccurs="unbounded" minOccurs="0"
+ name="quotes" type="seq:MixedQuote" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="RepeatingChoice">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType mixed="true" name="MixedRepeatingChoice">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="TwoRCs">
+ <xsd:sequence>
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+
+ <xsd:element name="split" type="xsd:string" />
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="y" type="xsd:string" />
+ <xsd:element name="z" type="xsd:int" />
+ </xsd:choice>
+
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType mixed="true" name="TwoRCsMixed">
+ <xsd:sequence>
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+
+ <xsd:element name="split" type="xsd:string" />
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="y" type="xsd:string" />
+ <xsd:element name="z" type="xsd:int" />
+ </xsd:choice>
+
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/sequences.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/simple.xsd
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon Aug 28 11:53:49 2006
@@ -1 +1 @@
-Rev,Date
+Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/simple.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml Mon Aug 28 11:53:49 2006
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<sequences:rc2m xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sequences="http://www.example.com/sequences" xsi:type="sequences:TwoRCsMixed">
- <b>1</b>
-where will this appear? <a>foo</a>
- <a>bar</a>
- <b>2</b>
- <split>pea</split>
- <z>99</z>
- <y>fred</y>
-</sequences:rc2m>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<sequences:rc2m xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sequences="http://www.example.com/sequences" xsi:type="sequences:TwoRCsMixed">
+ <b>1</b>
+where will this appear? <a>foo</a>
+ <a>bar</a>
+ <b>2</b>
+ <split>pea</split>
+ <z>99</z>
+ <y>fred</y>
+</sequences:rc2m>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml?rev=437778&r1=437777&r2=437778&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml (original)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml Mon Aug 28 11:53:49 2006
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
-
- 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.
- -->
-<sequences:rc2 xmlns:sequences="http://www.example.com/sequences">
- <b>1</b>
- <a>foo</a>
- <a>bar</a>
- <b>2</b>
- <split>banana</split>
- <z>99</z>
- <y>fred</y>
-</sequences:rc2>
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<sequences:rc2 xmlns:sequences="http://www.example.com/sequences">
+ <b>1</b>
+ <a>foo</a>
+ <a>bar</a>
+ <b>2</b>
+ <split>banana</split>
+ <z>99</z>
+ <y>fred</y>
+</sequences:rc2>
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/spec/commonj/LICENSE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/tuscany/java/spec/commonj/NOTICE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/tuscany/java/spec/commonj/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/spec/commonj/src/main/resources/META-INF/LICENSE
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/tuscany/java/spec/commonj/src/main/resources/META-INF/NOTICE
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/tuscany/java/spec/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/spec/sca/LICENSE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/tuscany/java/spec/sca/README.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/tuscany/java/spec/sca/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/spec/sca/src/main/resources/schemas/sca-binding-sca.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/spec/sca/src/main/resources/schemas/sca-binding-webservice.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
Propchange: incubator/tuscany/java/spec/sca/src/main/resources/schemas/sca-core.xsd
------------------------------------------------------------------------------
svn:mime-type = text/xml
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org