diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:19:15 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:19:15 +0000 |
commit | c993ba575bdd1530b7bbc0c6a19c32e66fce4b89 (patch) | |
tree | 94cfba65fe887c9017ea73727966d673e51d1ab7 /branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model | |
parent | dc741421e88c3e4210b00f39877159c5117b99d3 (diff) |
moving SDO branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834612 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model')
30 files changed, 0 insertions, 10209 deletions
diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java deleted file mode 100644 index e57b11474b..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.Sequence; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Base Data Graph Type</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels <em>Models</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd <em>Xsd</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary <em>Change Summary</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getAnyAttribute <em>Any Attribute</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface BaseDataGraphType extends Serializable -{ - /** - * Returns the value of the '<em><b>Models</b></em>' containment reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Models</em>' containment reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Models</em>' containment reference. - * @see #isSetModels() - * @see #unsetModels() - * @see #setModels(ModelsType) - * @generated - */ - ModelsType getModels(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels <em>Models</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Models</em>' containment reference. - * @see #isSetModels() - * @see #unsetModels() - * @see #getModels() - * @generated - */ - void setModels(ModelsType value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels <em>Models</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetModels() - * @see #getModels() - * @see #setModels(ModelsType) - * @generated - */ - void unsetModels(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels <em>Models</em>}' containment reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Models</em>' containment reference is set. - * @see #unsetModels() - * @see #getModels() - * @see #setModels(ModelsType) - * @generated - */ - boolean isSetModels(); - - /** - * Returns the value of the '<em><b>Xsd</b></em>' containment reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Xsd</em>' containment reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Xsd</em>' containment reference. - * @see #isSetXsd() - * @see #unsetXsd() - * @see #setXsd(XSDType) - * @generated - */ - XSDType getXsd(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd <em>Xsd</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Xsd</em>' containment reference. - * @see #isSetXsd() - * @see #unsetXsd() - * @see #getXsd() - * @generated - */ - void setXsd(XSDType value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd <em>Xsd</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetXsd() - * @see #getXsd() - * @see #setXsd(XSDType) - * @generated - */ - void unsetXsd(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd <em>Xsd</em>}' containment reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Xsd</em>' containment reference is set. - * @see #unsetXsd() - * @see #getXsd() - * @see #setXsd(XSDType) - * @generated - */ - boolean isSetXsd(); - - /** - * Returns the value of the '<em><b>Change Summary</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Change Summary</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Change Summary</em>' attribute. - * @see #isSetChangeSummary() - * @see #unsetChangeSummary() - * @see #setChangeSummary(ChangeSummary) - * @generated - */ - ChangeSummary getChangeSummary(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary <em>Change Summary</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Change Summary</em>' attribute. - * @see #isSetChangeSummary() - * @see #unsetChangeSummary() - * @see #getChangeSummary() - * @generated - */ - void setChangeSummary(ChangeSummary value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary <em>Change Summary</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetChangeSummary() - * @see #getChangeSummary() - * @see #setChangeSummary(ChangeSummary) - * @generated - */ - void unsetChangeSummary(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary <em>Change Summary</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Change Summary</em>' attribute is set. - * @see #unsetChangeSummary() - * @see #getChangeSummary() - * @see #setChangeSummary(ChangeSummary) - * @generated - */ - boolean isSetChangeSummary(); - - /** - * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any Attribute</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>Any Attribute</em>' attribute list. - * @generated - */ - Sequence getAnyAttribute(); - -} // BaseDataGraphType diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java deleted file mode 100644 index 2c83244789..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import commonj.sdo.Sequence; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Data Graph Type</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.DataGraphType#getAny <em>Any</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public interface DataGraphType extends BaseDataGraphType -{ - /** - * Returns the value of the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any</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>Any</em>' attribute list. - * @generated - */ - Sequence getAny(); - -} // DataGraphType diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java deleted file mode 100644 index 9e3b2a1386..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Data Object</b></em>'. - * <!-- end-user-doc --> - * - * - * @extends Serializable - * @generated - */ -public interface DataObject extends Serializable -{ -} // DataObject diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java deleted file mode 100644 index c8fe69167e..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -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 ModelFactory -{ - - /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - ModelFactory INSTANCE = org.apache.tuscany.sdo.model.impl.ModelFactoryImpl.init(); - - /** - * Returns a new object of class '<em>Data Graph Type</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Data Graph Type</em>'. - * @generated - */ - DataGraphType createDataGraphType(); - - /** - * Returns a new object of class '<em>Models Type</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Models Type</em>'. - * @generated - */ - ModelsType createModelsType(); - - /** - * Returns a new object of class '<em>Property</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Property</em>'. - * @generated - */ - Property createProperty(); - - /** - * 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 - */ - Type createType(); - - /** - * Returns a new object of class '<em>Types</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Types</em>'. - * @generated - */ - Types createTypes(); - - /** - * Returns a new object of class '<em>XSD Type</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>XSD Type</em>'. - * @generated - */ - XSDType createXSDType(); - - /** - * 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); - -} //ModelFactory diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java deleted file mode 100644 index 4159ac9dc1..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import commonj.sdo.Sequence; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Models Type</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * - * Expected type is emof:Package. - * - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.ModelsType#getAny <em>Any</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface ModelsType extends Serializable -{ - /** - * Returns the value of the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any</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>Any</em>' attribute list. - * @generated - */ - Sequence getAny(); - -} // ModelsType diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java deleted file mode 100644 index 15ee4c2f99..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java +++ /dev/null @@ -1,503 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import commonj.sdo.Sequence; - -import java.io.Serializable; - -import java.util.List; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Property</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.Property#getAliasName <em>Alias Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#getAny <em>Any</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#getName <em>Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#isMany <em>Many</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#isContainment <em>Containment</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#getDefault <em>Default</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#isReadOnly <em>Read Only</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#getType_ <em>Type</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#getOpposite <em>Opposite</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#isNullable <em>Nullable</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Property#getAnyAttribute <em>Any Attribute</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface Property extends Serializable -{ - /** - * Returns the value of the '<em><b>Alias Name</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Alias Name</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>Alias Name</em>' attribute list. - * @generated - */ - List getAliasName(); - - /** - * Returns the value of the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any</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>Any</em>' attribute list. - * @generated - */ - Sequence getAny(); - - /** - * Returns the value of the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>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>Name</em>' attribute. - * @see #isSetName() - * @see #unsetName() - * @see #setName(String) - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Name</em>' attribute. - * @see #isSetName() - * @see #unsetName() - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetName() - * @see #getName() - * @see #setName(String) - * @generated - */ - void unsetName(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getName <em>Name</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Name</em>' attribute is set. - * @see #unsetName() - * @see #getName() - * @see #setName(String) - * @generated - */ - boolean isSetName(); - - /** - * Returns the value of the '<em><b>Many</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Many</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Many</em>' attribute. - * @see #isSetMany() - * @see #unsetMany() - * @see #setMany(boolean) - * @generated - */ - boolean isMany(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isMany <em>Many</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Many</em>' attribute. - * @see #isSetMany() - * @see #unsetMany() - * @see #isMany() - * @generated - */ - void setMany(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isMany <em>Many</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetMany() - * @see #isMany() - * @see #setMany(boolean) - * @generated - */ - void unsetMany(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isMany <em>Many</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Many</em>' attribute is set. - * @see #unsetMany() - * @see #isMany() - * @see #setMany(boolean) - * @generated - */ - boolean isSetMany(); - - /** - * Returns the value of the '<em><b>Containment</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Containment</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Containment</em>' attribute. - * @see #isSetContainment() - * @see #unsetContainment() - * @see #setContainment(boolean) - * @generated - */ - boolean isContainment(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isContainment <em>Containment</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Containment</em>' attribute. - * @see #isSetContainment() - * @see #unsetContainment() - * @see #isContainment() - * @generated - */ - void setContainment(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isContainment <em>Containment</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetContainment() - * @see #isContainment() - * @see #setContainment(boolean) - * @generated - */ - void unsetContainment(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isContainment <em>Containment</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Containment</em>' attribute is set. - * @see #unsetContainment() - * @see #isContainment() - * @see #setContainment(boolean) - * @generated - */ - boolean isSetContainment(); - - /** - * Returns the value of the '<em><b>Default</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Default</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Default</em>' attribute. - * @see #isSetDefault() - * @see #unsetDefault() - * @see #setDefault_(String) - * @generated - */ - String getDefault_(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getDefault <em>Default</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Default</em>' attribute. - * @see #isSetDefault() - * @see #unsetDefault() - * @see #getDefault_() - * @generated - */ - void setDefault_(String value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getDefault <em>Default</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetDefault() - * @see #getDefault_() - * @see #setDefault_(String) - * @generated - */ - void unsetDefault(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getDefault <em>Default</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Default</em>' attribute is set. - * @see #unsetDefault() - * @see #getDefault_() - * @see #setDefault_(String) - * @generated - */ - boolean isSetDefault(); - - /** - * Returns the value of the '<em><b>Read Only</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Read Only</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</em>' attribute. - * @see #isSetReadOnly() - * @see #unsetReadOnly() - * @see #setReadOnly(boolean) - * @generated - */ - boolean isReadOnly(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isReadOnly <em>Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Read Only</em>' attribute. - * @see #isSetReadOnly() - * @see #unsetReadOnly() - * @see #isReadOnly() - * @generated - */ - void setReadOnly(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isReadOnly <em>Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetReadOnly() - * @see #isReadOnly() - * @see #setReadOnly(boolean) - * @generated - */ - void unsetReadOnly(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isReadOnly <em>Read Only</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Read Only</em>' attribute is set. - * @see #unsetReadOnly() - * @see #isReadOnly() - * @see #setReadOnly(boolean) - * @generated - */ - boolean isSetReadOnly(); - - /** - * Returns the value of the '<em><b>Type</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type</em>' reference. - * @see #isSetType() - * @see #unsetType() - * @see #setType(Type) - * @generated - */ - Type getType_(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getType_ <em>Type</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Type</em>' reference. - * @see #isSetType() - * @see #unsetType() - * @see #getType_() - * @generated - */ - void setType(Type value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getType_ <em>Type</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetType() - * @see #getType_() - * @see #setType(Type) - * @generated - */ - void unsetType(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getType_ <em>Type</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Type</em>' reference is set. - * @see #unsetType() - * @see #getType_() - * @see #setType(Type) - * @generated - */ - boolean isSetType(); - - /** - * Returns the value of the '<em><b>Opposite</b></em>' reference. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Opposite</em>' reference isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Opposite</em>' reference. - * @see #isSetOpposite() - * @see #unsetOpposite() - * @see #setOpposite_(Property) - * @generated - */ - Property getOpposite_(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getOpposite <em>Opposite</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Opposite</em>' reference. - * @see #isSetOpposite() - * @see #unsetOpposite() - * @see #getOpposite_() - * @generated - */ - void setOpposite_(Property value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getOpposite <em>Opposite</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetOpposite() - * @see #getOpposite_() - * @see #setOpposite_(Property) - * @generated - */ - void unsetOpposite(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getOpposite <em>Opposite</em>}' reference is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Opposite</em>' reference is set. - * @see #unsetOpposite() - * @see #getOpposite_() - * @see #setOpposite_(Property) - * @generated - */ - boolean isSetOpposite(); - - /** - * Returns the value of the '<em><b>Nullable</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Nullable</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Nullable</em>' attribute. - * @see #isSetNullable() - * @see #unsetNullable() - * @see #setNullable(boolean) - * @generated - */ - boolean isNullable(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isNullable <em>Nullable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Nullable</em>' attribute. - * @see #isSetNullable() - * @see #unsetNullable() - * @see #isNullable() - * @generated - */ - void setNullable(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isNullable <em>Nullable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetNullable() - * @see #isNullable() - * @see #setNullable(boolean) - * @generated - */ - void unsetNullable(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isNullable <em>Nullable</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Nullable</em>' attribute is set. - * @see #unsetNullable() - * @see #isNullable() - * @see #setNullable(boolean) - * @generated - */ - boolean isSetNullable(); - - /** - * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any Attribute</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>Any Attribute</em>' attribute list. - * @generated - */ - Sequence getAnyAttribute(); - -} // Property diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java deleted file mode 100644 index 741343e5a8..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import java.io.Serializable; - -import java.util.List; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Text Type</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.TextType#getText <em>Text</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface TextType extends Serializable -{ - /** - * Returns the value of the '<em><b>Text</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Text</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>Text</em>' attribute list. - * @generated - */ - List getText(); - -} // TextType diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java deleted file mode 100644 index 26a02f7cc0..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java +++ /dev/null @@ -1,431 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import commonj.sdo.Sequence; - -import java.io.Serializable; - -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 org.apache.tuscany.sdo.model.Type#getBaseType <em>Base Type</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#getProperty <em>Property</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#getAliasName <em>Alias Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#getAny <em>Any</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#getName <em>Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#getUri <em>Uri</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#isDataType <em>Data Type</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#isOpen <em>Open</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#isSequenced <em>Sequenced</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#isAbstract <em>Abstract</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.Type#getAnyAttribute <em>Any Attribute</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface Type extends Serializable -{ - /** - * Returns the value of the '<em><b>Base Type</b></em>' reference list. - * The list contents are of type {@link org.apache.tuscany.sdo.model.Type}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Base Type</em>' reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Base Type</em>' reference list. - * @generated - */ - List getBaseType(); - - /** - * Returns the value of the '<em><b>Property</b></em>' containment reference list. - * The list contents are of type {@link org.apache.tuscany.sdo.model.Property}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Property</em>' containment reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Property</em>' containment reference list. - * @generated - */ - List getProperty(); - - /** - * Returns the value of the '<em><b>Alias Name</b></em>' attribute list. - * The list contents are of type {@link java.lang.String}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Alias Name</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>Alias Name</em>' attribute list. - * @generated - */ - List getAliasName(); - - /** - * Returns the value of the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any</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>Any</em>' attribute list. - * @generated - */ - Sequence getAny(); - - /** - * Returns the value of the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>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>Name</em>' attribute. - * @see #isSetName() - * @see #unsetName() - * @see #setName(String) - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Name</em>' attribute. - * @see #isSetName() - * @see #unsetName() - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#getName <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetName() - * @see #getName() - * @see #setName(String) - * @generated - */ - void unsetName(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#getName <em>Name</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Name</em>' attribute is set. - * @see #unsetName() - * @see #getName() - * @see #setName(String) - * @generated - */ - boolean isSetName(); - - /** - * Returns the value of the '<em><b>Uri</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Uri</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Uri</em>' attribute. - * @see #isSetUri() - * @see #unsetUri() - * @see #setUri(String) - * @generated - */ - String getUri(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#getUri <em>Uri</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Uri</em>' attribute. - * @see #isSetUri() - * @see #unsetUri() - * @see #getUri() - * @generated - */ - void setUri(String value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#getUri <em>Uri</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetUri() - * @see #getUri() - * @see #setUri(String) - * @generated - */ - void unsetUri(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#getUri <em>Uri</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Uri</em>' attribute is set. - * @see #unsetUri() - * @see #getUri() - * @see #setUri(String) - * @generated - */ - boolean isSetUri(); - - /** - * Returns the value of the '<em><b>Data Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Data Type</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Data Type</em>' attribute. - * @see #isSetDataType() - * @see #unsetDataType() - * @see #setDataType(boolean) - * @generated - */ - boolean isDataType(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isDataType <em>Data Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Data Type</em>' attribute. - * @see #isSetDataType() - * @see #unsetDataType() - * @see #isDataType() - * @generated - */ - void setDataType(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isDataType <em>Data Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetDataType() - * @see #isDataType() - * @see #setDataType(boolean) - * @generated - */ - void unsetDataType(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isDataType <em>Data Type</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Data Type</em>' attribute is set. - * @see #unsetDataType() - * @see #isDataType() - * @see #setDataType(boolean) - * @generated - */ - boolean isSetDataType(); - - /** - * Returns the value of the '<em><b>Open</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Open</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Open</em>' attribute. - * @see #isSetOpen() - * @see #unsetOpen() - * @see #setOpen(boolean) - * @generated - */ - boolean isOpen(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isOpen <em>Open</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Open</em>' attribute. - * @see #isSetOpen() - * @see #unsetOpen() - * @see #isOpen() - * @generated - */ - void setOpen(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isOpen <em>Open</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetOpen() - * @see #isOpen() - * @see #setOpen(boolean) - * @generated - */ - void unsetOpen(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isOpen <em>Open</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Open</em>' attribute is set. - * @see #unsetOpen() - * @see #isOpen() - * @see #setOpen(boolean) - * @generated - */ - boolean isSetOpen(); - - /** - * Returns the value of the '<em><b>Sequenced</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Sequenced</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Sequenced</em>' attribute. - * @see #isSetSequenced() - * @see #unsetSequenced() - * @see #setSequenced(boolean) - * @generated - */ - boolean isSequenced(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isSequenced <em>Sequenced</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Sequenced</em>' attribute. - * @see #isSetSequenced() - * @see #unsetSequenced() - * @see #isSequenced() - * @generated - */ - void setSequenced(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isSequenced <em>Sequenced</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetSequenced() - * @see #isSequenced() - * @see #setSequenced(boolean) - * @generated - */ - void unsetSequenced(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isSequenced <em>Sequenced</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Sequenced</em>' attribute is set. - * @see #unsetSequenced() - * @see #isSequenced() - * @see #setSequenced(boolean) - * @generated - */ - boolean isSetSequenced(); - - /** - * Returns the value of the '<em><b>Abstract</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Abstract</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Abstract</em>' attribute. - * @see #isSetAbstract() - * @see #unsetAbstract() - * @see #setAbstract(boolean) - * @generated - */ - boolean isAbstract(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isAbstract <em>Abstract</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Abstract</em>' attribute. - * @see #isSetAbstract() - * @see #unsetAbstract() - * @see #isAbstract() - * @generated - */ - void setAbstract(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isAbstract <em>Abstract</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetAbstract() - * @see #isAbstract() - * @see #setAbstract(boolean) - * @generated - */ - void unsetAbstract(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isAbstract <em>Abstract</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Abstract</em>' attribute is set. - * @see #unsetAbstract() - * @see #isAbstract() - * @see #setAbstract(boolean) - * @generated - */ - boolean isSetAbstract(); - - /** - * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any Attribute</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>Any Attribute</em>' attribute list. - * @generated - */ - Sequence getAnyAttribute(); - - String getInstanceClassName(); - -} // Type diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java deleted file mode 100644 index 26fb9c57ce..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import java.io.Serializable; - -import java.util.List; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Types</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.Types#getType_ <em>Type</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface Types extends Serializable -{ - /** - * Returns the value of the '<em><b>Type</b></em>' containment reference list. - * The list contents are of type {@link org.apache.tuscany.sdo.model.Type}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type</em>' containment reference list isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type</em>' containment reference list. - * @generated - */ - List getType_(); - - List getTypeList(); - -} // Types diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java deleted file mode 100644 index 32cde02086..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model; - -import commonj.sdo.Sequence; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>XSD Type</b></em>'. - * <!-- end-user-doc --> - * - * <!-- begin-model-doc --> - * - * Expected type is xsd:schema. - * - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.XSDType#getAny <em>Any</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface XSDType extends Serializable -{ - /** - * Returns the value of the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Any</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>Any</em>' attribute list. - * @generated - */ - Sequence getAny(); - -} // XSDType diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java deleted file mode 100644 index e8824974a0..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java +++ /dev/null @@ -1,625 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.BaseDataGraphType; -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.ModelsType; -import org.apache.tuscany.sdo.model.XSDType; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Base Data Graph Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getModels <em>Models</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getXsd <em>Xsd</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getChangeSummary <em>Change Summary</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getAnyAttribute <em>Any Attribute</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public abstract class BaseDataGraphTypeImpl extends DataObjectBase implements BaseDataGraphType -{ - - public final static int MODELS = 0; - - public final static int XSD = 1; - - public final static int CHANGE_SUMMARY = 2; - - public final static int ANY_ATTRIBUTE = -1; - - public final static int SDO_PROPERTY_COUNT = 3; - - public final static int EXTENDED_PROPERTY_COUNT = -1; - - - /** - * The internal feature id for the '<em><b>Models</b></em>' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_MODELS = 0; - - /** - * The internal feature id for the '<em><b>Xsd</b></em>' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_XSD = 1; - - /** - * The internal feature id for the '<em><b>Change Summary</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_CHANGE_SUMMARY = 2; - - /** - * The internal feature id for the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY_ATTRIBUTE = 3; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 4; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_MODELS: return MODELS; - case INTERNAL_XSD: return XSD; - case INTERNAL_CHANGE_SUMMARY: return CHANGE_SUMMARY; - case INTERNAL_ANY_ATTRIBUTE: return ANY_ATTRIBUTE; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getModels() <em>Models</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getModels() - * @generated - * @ordered - */ - - protected ModelsType models = null; - - /** - * This is true if the Models containment reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean models_set_ = false; - - /** - * The cached value of the '{@link #getXsd() <em>Xsd</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getXsd() - * @generated - * @ordered - */ - - protected XSDType xsd = null; - - /** - * This is true if the Xsd containment reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean xsd_set_ = false; - - /** - * The default value of the '{@link #getChangeSummary() <em>Change Summary</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getChangeSummary() - * @generated - * @ordered - */ - protected static final ChangeSummary CHANGE_SUMMARY_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getChangeSummary() <em>Change Summary</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getChangeSummary() - * @generated - * @ordered - */ - protected ChangeSummary changeSummary = CHANGE_SUMMARY_DEFAULT_; - - /** - * This is true if the Change Summary attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean changeSummary_set_ = false; - - /** - * The cached value of the '{@link #getAnyAttribute() <em>Any Attribute</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAnyAttribute() - * @generated - * @ordered - */ - - protected Sequence anyAttribute = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BaseDataGraphTypeImpl() - { - super(); - createChangeSummary(CHANGE_SUMMARY); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getBaseDataGraphType(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ModelsType getModels() - { - return models; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext basicSetModels(ModelsType newModels, ChangeContext changeContext) - { - ModelsType oldModels = models; - models = newModels; - boolean oldModels_set_ = models_set_; - models_set_ = true; - if (isNotifying()) - { - addNotification(this, ChangeKind.SET, INTERNAL_MODELS, oldModels, newModels, !oldModels_set_, changeContext); - } - return changeContext; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setModels(ModelsType newModels) - { - if (newModels != models) - { - ChangeContext changeContext = null; - if (models != null) - changeContext = inverseRemove(models, this, OPPOSITE_FEATURE_BASE - INTERNAL_MODELS, null, changeContext); - if (newModels != null) - changeContext = inverseAdd(newModels, this, OPPOSITE_FEATURE_BASE - INTERNAL_MODELS, null, changeContext); - changeContext = basicSetModels(newModels, changeContext); - if (changeContext != null) dispatch(changeContext); - } - else - { - boolean oldModels_set_ = models_set_; - models_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_MODELS, newModels, newModels, !oldModels_set_); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext basicUnsetModels(ChangeContext changeContext) - { - ModelsType oldModels = models; - models = null; - boolean oldModels_set_ = models_set_; - models_set_ = false; - if (isNotifying()) - { - addNotification(this, ChangeKind.UNSET, INTERNAL_MODELS, oldModels, null, !oldModels_set_, changeContext); - } - return changeContext; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetModels() - { - if (models != null) - { - ChangeContext changeContext = null; - changeContext = inverseRemove(models, this, EOPPOSITE_FEATURE_BASE - INTERNAL_MODELS, null, changeContext); - changeContext = basicUnsetModels(changeContext); - if (changeContext != null) dispatch(changeContext); - } - else - { - boolean oldModels_set_ = models_set_; - models_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_MODELS, null, null, oldModels_set_); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetModels() - { - return models_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public XSDType getXsd() - { - return xsd; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext basicSetXsd(XSDType newXsd, ChangeContext changeContext) - { - XSDType oldXsd = xsd; - xsd = newXsd; - boolean oldXsd_set_ = xsd_set_; - xsd_set_ = true; - if (isNotifying()) - { - addNotification(this, ChangeKind.SET, INTERNAL_XSD, oldXsd, newXsd, !oldXsd_set_, changeContext); - } - return changeContext; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setXsd(XSDType newXsd) - { - if (newXsd != xsd) - { - ChangeContext changeContext = null; - if (xsd != null) - changeContext = inverseRemove(xsd, this, OPPOSITE_FEATURE_BASE - INTERNAL_XSD, null, changeContext); - if (newXsd != null) - changeContext = inverseAdd(newXsd, this, OPPOSITE_FEATURE_BASE - INTERNAL_XSD, null, changeContext); - changeContext = basicSetXsd(newXsd, changeContext); - if (changeContext != null) dispatch(changeContext); - } - else - { - boolean oldXsd_set_ = xsd_set_; - xsd_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_XSD, newXsd, newXsd, !oldXsd_set_); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext basicUnsetXsd(ChangeContext changeContext) - { - XSDType oldXsd = xsd; - xsd = null; - boolean oldXsd_set_ = xsd_set_; - xsd_set_ = false; - if (isNotifying()) - { - addNotification(this, ChangeKind.UNSET, INTERNAL_XSD, oldXsd, null, !oldXsd_set_, changeContext); - } - return changeContext; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetXsd() - { - if (xsd != null) - { - ChangeContext changeContext = null; - changeContext = inverseRemove(xsd, this, EOPPOSITE_FEATURE_BASE - INTERNAL_XSD, null, changeContext); - changeContext = basicUnsetXsd(changeContext); - if (changeContext != null) dispatch(changeContext); - } - else - { - boolean oldXsd_set_ = xsd_set_; - xsd_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_XSD, null, null, oldXsd_set_); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetXsd() - { - return xsd_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeSummary getChangeSummary() - { - return changeSummary; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setChangeSummary(ChangeSummary newChangeSummary) - { - ChangeSummary oldChangeSummary = changeSummary; - changeSummary = newChangeSummary; - boolean oldChangeSummary_set_ = changeSummary_set_; - changeSummary_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_CHANGE_SUMMARY, oldChangeSummary, changeSummary, !oldChangeSummary_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetChangeSummary() - { - ChangeSummary oldChangeSummary = changeSummary; - boolean oldChangeSummary_set_ = changeSummary_set_; - changeSummary = CHANGE_SUMMARY_DEFAULT_; - changeSummary_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_CHANGE_SUMMARY, oldChangeSummary, CHANGE_SUMMARY_DEFAULT_, oldChangeSummary_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetChangeSummary() - { - return changeSummary_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAnyAttribute() - { - if (anyAttribute == null) - { - anyAttribute = createSequence(INTERNAL_ANY_ATTRIBUTE); - } - return anyAttribute; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case MODELS: - return basicUnsetModels(changeContext); - case XSD: - return basicUnsetXsd(changeContext); - case ANY_ATTRIBUTE: - return removeFromSequence(getAnyAttribute(), 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 MODELS: - return getModels(); - case XSD: - return getXsd(); - case CHANGE_SUMMARY: - return getChangeSummary(); - case ANY_ATTRIBUTE: - // 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 getAnyAttribute(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case MODELS: - setModels((ModelsType)newValue); - return; - case XSD: - setXsd((XSDType)newValue); - return; - case CHANGE_SUMMARY: - setChangeSummary((ChangeSummary)newValue); - return; - case ANY_ATTRIBUTE: - setSequence(getAnyAttribute(), newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case MODELS: - unsetModels(); - return; - case XSD: - unsetXsd(); - return; - case CHANGE_SUMMARY: - unsetChangeSummary(); - return; - case ANY_ATTRIBUTE: - unsetSequence(getAnyAttribute()); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case MODELS: - return isSetModels(); - case XSD: - return isSetXsd(); - case CHANGE_SUMMARY: - return isSetChangeSummary(); - case ANY_ATTRIBUTE: - return anyAttribute != null && !isSequenceEmpty(getAnyAttribute()); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (changeSummary: "); - if (changeSummary_set_) result.append(changeSummary); else result.append("<unset>"); - result.append(", anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - -} //BaseDataGraphTypeImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java deleted file mode 100644 index ef13797850..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.model.DataGraphType; -import org.apache.tuscany.sdo.model.ModelFactory; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Data Graph Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.DataGraphTypeImpl#getAny <em>Any</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class DataGraphTypeImpl extends BaseDataGraphTypeImpl implements DataGraphType -{ - - public final static int ANY = BaseDataGraphTypeImpl.EXTENDED_PROPERTY_COUNT + -1; - - public final static int SDO_PROPERTY_COUNT = BaseDataGraphTypeImpl.SDO_PROPERTY_COUNT + 0; - - public final static int EXTENDED_PROPERTY_COUNT = BaseDataGraphTypeImpl.EXTENDED_PROPERTY_COUNT - 1; - - - /** - * The internal feature id for the '<em><b>Models</b></em>' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_MODELS = BaseDataGraphTypeImpl.INTERNAL_MODELS; - - /** - * The internal feature id for the '<em><b>Xsd</b></em>' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_XSD = BaseDataGraphTypeImpl.INTERNAL_XSD; - - /** - * The internal feature id for the '<em><b>Change Summary</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_CHANGE_SUMMARY = BaseDataGraphTypeImpl.INTERNAL_CHANGE_SUMMARY; - - /** - * The internal feature id for the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY_ATTRIBUTE = BaseDataGraphTypeImpl.INTERNAL_ANY_ATTRIBUTE; - - /** - * The internal feature id for the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = BaseDataGraphTypeImpl.INTERNAL_PROPERTY_COUNT + 0; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = BaseDataGraphTypeImpl.INTERNAL_PROPERTY_COUNT + 1; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_MODELS: return MODELS; - case INTERNAL_XSD: return XSD; - case INTERNAL_CHANGE_SUMMARY: return CHANGE_SUMMARY; - case INTERNAL_ANY_ATTRIBUTE: return ANY_ATTRIBUTE; - case INTERNAL_ANY: return ANY; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DataGraphTypeImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getDataGraphType(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = createSequence(INTERNAL_ANY); - } - return any; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case ANY: - return removeFromSequence(getAny(), 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 ANY: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getAny(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case ANY: - setSequence(getAny(), newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case ANY: - unsetSequence(getAny()); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case ANY: - return any != null && !isSequenceEmpty(getAny()); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (any: "); - result.append(any); - result.append(')'); - return result.toString(); - } - -} //DataGraphTypeImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java deleted file mode 100644 index 0dc673907c..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.DataObject; -import org.apache.tuscany.sdo.model.ModelFactory; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Data Object</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public abstract class DataObjectImpl extends DataObjectBase implements DataObject -{ - - public final static int SDO_PROPERTY_COUNT = 0; - - public final static int EXTENDED_PROPERTY_COUNT = 0; - - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 0; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DataObjectImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getDataObject(); - } - -} //DataObjectImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java deleted file mode 100644 index 761efb4217..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java +++ /dev/null @@ -1,2401 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.helper.DataHelper; -import commonj.sdo.helper.HelperContext; - -import org.apache.tuscany.sdo.SDOFactory; -import org.apache.tuscany.sdo.helper.TypeHelperImpl; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.DataObject; - -import java.math.BigDecimal; -import java.math.BigInteger; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.TimeZone; - -import org.apache.tuscany.sdo.impl.FactoryBase; - -import org.apache.tuscany.sdo.model.*; -import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; -import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil; - -/** - * <!-- begin-user-doc --> - * An implementation of the commonj.sdo model factory. - * This model is generated from sdoModel.xsd, in the sdo-api project. - * Until the SDO code generator supports name conflicts and regen/merge, follow the following steps to regenerate this model: - * 1. Regenerate the model into a temporary directory: - * XSD2JavaGenerator -generateBuiltIn commonj.sdo -targetDirectory <temp-dir> -javaPackage org.apache.tuscany.sdo.model <sdo-api-dir>/src/main/resources/xml/sdoModel.xsd - * 2. Rename the following methods in the generated Property/PropertyImpl interface and implementation class: - * getDefault() to getDefault_(); - * setDefault() to setDefault_(); - * getOpposite() to getOpposite_(); - * setOpposite() to setOpposite_(); - * 3. Copy the following method from the old to new generated Type/TypeImpl interface and implemention class (resolve any missing imports): - * String getInstanceClassName(); - * 4. Copy the following method from the old to new generated Types/TypesImpl interface and implemention class (resolve any missing imports): - * List getTypeList(); - * 5. Delete all the createXXXFromString() and convertXXXToString() methods in the newly generated ModelFactoryImpl and - * replace them with the ones from this file (resolve any missing imports). - * 6. Comment out the call to registerStaticTypes of ModelFactory.class in the init() method - * 7. Change org.apache.tuscany.sdo.model.DataObject.class to commonj.sdo.DataObject.class for the following method found in method initializeMetaData(); - * initializeType(dataObjectType, commonj.sdo.DataObject.class, "DataObject", true); // generated as org.apache.tuscany.sdo.model.DataObject.class - * 8. Add the following case to the generated create() method: - * case DATA_OBJECT: return SDOFactory.eINSTANCE.createAnyTypeDataObject(); - * 9. Make sure the top of each generated file contains the ASF License. - * 10. Move this JavaDoc comment into the newly generated ModelFactoryImpl class. - * <!-- end-user-doc --> - * @generated - */ -public class ModelFactoryImpl extends FactoryBase implements ModelFactory -{ - - /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String NAMESPACE_URI = "commonj.sdo"; - - /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String NAMESPACE_PREFIX = "sdo"; - - /** - * 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 BASE_DATA_GRAPH_TYPE = 1; - public static final int DATA_GRAPH_TYPE = 2; - public static final int DATA_OBJECT = 3; - public static final int MODELS_TYPE = 4; - public static final int PROPERTY = 5; - public static final int TEXT_TYPE = 6; - public static final int TYPE = 7; - public static final int TYPES = 8; - public static final int XSD_TYPE = 9; - public static final int BOOLEAN = 10; - public static final int BOOLEAN_OBJECT = 11; - public static final int BYTE = 12; - public static final int BYTE_OBJECT = 13; - public static final int BYTES = 14; - public static final int CHANGE_SUMMARY_TYPE = 15; - public static final int CHARACTER = 16; - public static final int CHARACTER_OBJECT = 17; - public static final int DATE = 18; - public static final int DATE_TIME = 19; - public static final int DAY = 20; - public static final int DECIMAL = 21; - public static final int DOUBLE = 22; - public static final int DOUBLE_OBJECT = 23; - public static final int DURATION = 24; - public static final int FLOAT = 25; - public static final int FLOAT_OBJECT = 26; - public static final int INT = 27; - public static final int INTEGER = 28; - public static final int INT_OBJECT = 29; - public static final int LONG = 30; - public static final int LONG_OBJECT = 31; - public static final int MONTH = 32; - public static final int MONTH_DAY = 33; - public static final int OBJECT = 34; - public static final int SHORT = 35; - public static final int SHORT_OBJECT = 36; - public static final int STRING = 37; - public static final int STRINGS = 38; - public static final int TIME = 39; - public static final int URI = 40; - public static final int YEAR = 41; - public static final int YEAR_MONTH = 42; - public static final int YEAR_MONTH_DAY = 43; - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ModelFactoryImpl() - { - super(NAMESPACE_URI, NAMESPACE_PREFIX, "org.apache.tuscany.sdo.model"); - } - - /** - * 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"); - } - - //Register dependent packages with provided scope - - // Initialize this package - TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper(); - th.getExtendedMetaData().putPackage(NAMESPACE_URI, this); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public DataObject create(int typeNumber) - { - switch (typeNumber) - { - case DATA_GRAPH_TYPE: return (DataObject)createDataGraphType(); - case MODELS_TYPE: return (DataObject)createModelsType(); - case PROPERTY: return (DataObject)createProperty(); - case TYPE: return (DataObject)createType(); - case TYPES: return (DataObject)createTypes(); - case XSD_TYPE: return (DataObject)createXSDType(); - case DATA_OBJECT: return SDOFactory.eINSTANCE.createAnyTypeDataObject(); - default: - return super.create(typeNumber); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object createFromString(int typeNumber, String initialValue) - { - switch (typeNumber) - { - case BOOLEAN: - return createBooleanFromString(initialValue); - case BOOLEAN_OBJECT: - return createBooleanObjectFromString(initialValue); - case BYTE: - return createByteFromString(initialValue); - case BYTE_OBJECT: - return createByteObjectFromString(initialValue); - case BYTES: - return createBytesFromString(initialValue); - case CHANGE_SUMMARY_TYPE: - return createChangeSummaryTypeFromString(initialValue); - case CHARACTER: - return createCharacterFromString(initialValue); - case CHARACTER_OBJECT: - return createCharacterObjectFromString(initialValue); - case DATE: - return createDateFromString(initialValue); - case DATE_TIME: - return createDateTimeFromString(initialValue); - case DAY: - return createDayFromString(initialValue); - case DECIMAL: - return createDecimalFromString(initialValue); - case DOUBLE: - return createDoubleFromString(initialValue); - case DOUBLE_OBJECT: - return createDoubleObjectFromString(initialValue); - case DURATION: - return createDurationFromString(initialValue); - case FLOAT: - return createFloatFromString(initialValue); - case FLOAT_OBJECT: - return createFloatObjectFromString(initialValue); - case INT: - return createIntFromString(initialValue); - case INTEGER: - return createIntegerFromString(initialValue); - case INT_OBJECT: - return createIntObjectFromString(initialValue); - case LONG: - return createLongFromString(initialValue); - case LONG_OBJECT: - return createLongObjectFromString(initialValue); - case MONTH: - return createMonthFromString(initialValue); - case MONTH_DAY: - return createMonthDayFromString(initialValue); - case OBJECT: - return createObjectFromString(initialValue); - case SHORT: - return createShortFromString(initialValue); - case SHORT_OBJECT: - return createShortObjectFromString(initialValue); - case STRING: - return createStringFromString(initialValue); - case STRINGS: - return createStringsFromString(initialValue); - case TIME: - return createTimeFromString(initialValue); - case URI: - return createURIFromString(initialValue); - case YEAR: - return createYearFromString(initialValue); - case YEAR_MONTH: - return createYearMonthFromString(initialValue); - case YEAR_MONTH_DAY: - return createYearMonthDayFromString(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 BOOLEAN: - return convertBooleanToString(instanceValue); - case BOOLEAN_OBJECT: - return convertBooleanObjectToString(instanceValue); - case BYTE: - return convertByteToString(instanceValue); - case BYTE_OBJECT: - return convertByteObjectToString(instanceValue); - case BYTES: - return convertBytesToString(instanceValue); - case CHANGE_SUMMARY_TYPE: - return convertChangeSummaryTypeToString(instanceValue); - case CHARACTER: - return convertCharacterToString(instanceValue); - case CHARACTER_OBJECT: - return convertCharacterObjectToString(instanceValue); - case DATE: - return convertDateToString(instanceValue); - case DATE_TIME: - return convertDateTimeToString(instanceValue); - case DAY: - return convertDayToString(instanceValue); - case DECIMAL: - return convertDecimalToString(instanceValue); - case DOUBLE: - return convertDoubleToString(instanceValue); - case DOUBLE_OBJECT: - return convertDoubleObjectToString(instanceValue); - case DURATION: - return convertDurationToString(instanceValue); - case FLOAT: - return convertFloatToString(instanceValue); - case FLOAT_OBJECT: - return convertFloatObjectToString(instanceValue); - case INT: - return convertIntToString(instanceValue); - case INTEGER: - return convertIntegerToString(instanceValue); - case INT_OBJECT: - return convertIntObjectToString(instanceValue); - case LONG: - return convertLongToString(instanceValue); - case LONG_OBJECT: - return convertLongObjectToString(instanceValue); - case MONTH: - return convertMonthToString(instanceValue); - case MONTH_DAY: - return convertMonthDayToString(instanceValue); - case OBJECT: - return convertObjectToString(instanceValue); - case SHORT: - return convertShortToString(instanceValue); - case SHORT_OBJECT: - return convertShortObjectToString(instanceValue); - case STRING: - return convertStringToString(instanceValue); - case STRINGS: - return convertStringsToString(instanceValue); - case TIME: - return convertTimeToString(instanceValue); - case URI: - return convertURIToString(instanceValue); - case YEAR: - return convertYearToString(instanceValue); - case YEAR_MONTH: - return convertYearMonthToString(instanceValue); - case YEAR_MONTH_DAY: - return convertYearMonthDayToString(instanceValue); - default: - throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype"); - } - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DataGraphType createDataGraphType() - { - DataGraphTypeImpl dataGraphType = new DataGraphTypeImpl(); - return dataGraphType; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ModelsType createModelsType() - { - ModelsTypeImpl modelsType = new ModelsTypeImpl(); - return modelsType; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Property createProperty() - { - PropertyImpl property = new PropertyImpl(); - return property; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type createType() - { - TypeImpl type = new TypeImpl(); - return type; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Types createTypes() - { - TypesImpl types = new TypesImpl(); - return types; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public XSDType createXSDType() - { - XSDTypeImpl xsdType = new XSDTypeImpl(); - return xsdType; - } - - // Following creates and initializes SDO metadata for the supported types. - protected commonj.sdo.Type baseDataGraphTypeType = null; - - public commonj.sdo.Type getBaseDataGraphType() - { - return baseDataGraphTypeType; - } - - protected commonj.sdo.Type dataGraphTypeType = null; - - public commonj.sdo.Type getDataGraphType() - { - return dataGraphTypeType; - } - - protected commonj.sdo.Type dataObjectType = null; - - public commonj.sdo.Type getDataObject() - { - return dataObjectType; - } - - protected commonj.sdo.Type modelsTypeType = null; - - public commonj.sdo.Type getModelsType() - { - return modelsTypeType; - } - - protected commonj.sdo.Type propertyType = null; - - public commonj.sdo.Type getProperty() - { - return propertyType; - } - - protected commonj.sdo.Type textTypeType = null; - - public commonj.sdo.Type getTextType() - { - return textTypeType; - } - - protected commonj.sdo.Type typeType = null; - - public commonj.sdo.Type getType() - { - return typeType; - } - - protected commonj.sdo.Type typesType = null; - - public commonj.sdo.Type getTypes() - { - return typesType; - } - - protected commonj.sdo.Type xsdTypeType = null; - - public commonj.sdo.Type getXSDType() - { - return xsdTypeType; - } - - protected commonj.sdo.Type boolean_Type = null; - - public commonj.sdo.Type getBoolean() - { - return boolean_Type; - } - - protected commonj.sdo.Type booleanObjectType = null; - - public commonj.sdo.Type getBooleanObject() - { - return booleanObjectType; - } - - protected commonj.sdo.Type byte_Type = null; - - public commonj.sdo.Type getByte() - { - return byte_Type; - } - - protected commonj.sdo.Type byteObjectType = null; - - public commonj.sdo.Type getByteObject() - { - return byteObjectType; - } - - protected commonj.sdo.Type bytesType = null; - - public commonj.sdo.Type getBytes() - { - return bytesType; - } - - protected commonj.sdo.Type changeSummaryTypeType = null; - - public commonj.sdo.Type getChangeSummaryType() - { - return changeSummaryTypeType; - } - - protected commonj.sdo.Type characterType = null; - - public commonj.sdo.Type getCharacter() - { - return characterType; - } - - protected commonj.sdo.Type characterObjectType = null; - - public commonj.sdo.Type getCharacterObject() - { - return characterObjectType; - } - - protected commonj.sdo.Type dateType = null; - - public commonj.sdo.Type getDate() - { - return dateType; - } - - protected commonj.sdo.Type dateTimeType = null; - - public commonj.sdo.Type getDateTime() - { - return dateTimeType; - } - - protected commonj.sdo.Type dayType = null; - - public commonj.sdo.Type getDay() - { - return dayType; - } - - protected commonj.sdo.Type decimalType = null; - - public commonj.sdo.Type getDecimal() - { - return decimalType; - } - - protected commonj.sdo.Type double_Type = null; - - public commonj.sdo.Type getDouble() - { - return double_Type; - } - - protected commonj.sdo.Type doubleObjectType = null; - - public commonj.sdo.Type getDoubleObject() - { - return doubleObjectType; - } - - protected commonj.sdo.Type durationType = null; - - public commonj.sdo.Type getDuration() - { - return durationType; - } - - protected commonj.sdo.Type float_Type = null; - - public commonj.sdo.Type getFloat() - { - return float_Type; - } - - protected commonj.sdo.Type floatObjectType = null; - - public commonj.sdo.Type getFloatObject() - { - return floatObjectType; - } - - protected commonj.sdo.Type int_Type = null; - - public commonj.sdo.Type getInt() - { - return int_Type; - } - - protected commonj.sdo.Type integerType = null; - - public commonj.sdo.Type getInteger() - { - return integerType; - } - - protected commonj.sdo.Type intObjectType = null; - - public commonj.sdo.Type getIntObject() - { - return intObjectType; - } - - protected commonj.sdo.Type long_Type = null; - - public commonj.sdo.Type getLong() - { - return long_Type; - } - - protected commonj.sdo.Type longObjectType = null; - - public commonj.sdo.Type getLongObject() - { - return longObjectType; - } - - protected commonj.sdo.Type monthType = null; - - public commonj.sdo.Type getMonth() - { - return monthType; - } - - protected commonj.sdo.Type monthDayType = null; - - public commonj.sdo.Type getMonthDay() - { - return monthDayType; - } - - protected commonj.sdo.Type objectType = null; - - public commonj.sdo.Type getObject() - { - return objectType; - } - - protected commonj.sdo.Type short_Type = null; - - public commonj.sdo.Type getShort() - { - return short_Type; - } - - protected commonj.sdo.Type shortObjectType = null; - - public commonj.sdo.Type getShortObject() - { - return shortObjectType; - } - - protected commonj.sdo.Type stringType = null; - - public commonj.sdo.Type getString() - { - return stringType; - } - - protected commonj.sdo.Type stringsType = null; - - public commonj.sdo.Type getStrings() - { - return stringsType; - } - - protected commonj.sdo.Type timeType = null; - - public commonj.sdo.Type getTime() - { - return timeType; - } - - protected commonj.sdo.Type uriType = null; - - public commonj.sdo.Type getURI() - { - return uriType; - } - - protected commonj.sdo.Type yearType = null; - - public commonj.sdo.Type getYear() - { - return yearType; - } - - protected commonj.sdo.Type yearMonthType = null; - - public commonj.sdo.Type getYearMonth() - { - return yearMonthType; - } - - protected commonj.sdo.Type yearMonthDayType = null; - - public commonj.sdo.Type getYearMonthDay() - { - return yearMonthDayType; - } - - - private static ModelFactoryImpl instance = null; - public static ModelFactoryImpl init() - { - if (instance != null ) return instance; - instance = new ModelFactoryImpl(); - - // Initialize dependent packages - - // Create package meta-data objects - instance.createMetaData(); - - // Initialize created meta-data - instance.initializeMetaData(); - - // Mark meta-data to indicate it can't be changed - //theModelFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ???? - - return instance; - } - - private boolean isCreated = false; - - public void createMetaData() - { - if (isCreated) return; - isCreated = true; - - // Create types and their properties - baseDataGraphTypeType = createType(false, BASE_DATA_GRAPH_TYPE); - createProperty(false, baseDataGraphTypeType,BaseDataGraphTypeImpl.INTERNAL_MODELS); - createProperty(false, baseDataGraphTypeType,BaseDataGraphTypeImpl.INTERNAL_XSD); - createProperty(true, baseDataGraphTypeType,BaseDataGraphTypeImpl.INTERNAL_CHANGE_SUMMARY); - createProperty(true, baseDataGraphTypeType,BaseDataGraphTypeImpl.INTERNAL_ANY_ATTRIBUTE); - dataGraphTypeType = createType(false, DATA_GRAPH_TYPE); - createProperty(true, dataGraphTypeType,DataGraphTypeImpl.INTERNAL_ANY); - dataObjectType = createType(false, DATA_OBJECT); - modelsTypeType = createType(false, MODELS_TYPE); - createProperty(true, modelsTypeType,ModelsTypeImpl.INTERNAL_ANY); - propertyType = createType(false, PROPERTY); - createProperty(true, propertyType,PropertyImpl.INTERNAL_ALIAS_NAME); - createProperty(true, propertyType,PropertyImpl.INTERNAL_ANY); - createProperty(true, propertyType,PropertyImpl.INTERNAL_NAME); - createProperty(true, propertyType,PropertyImpl.INTERNAL_MANY); - createProperty(true, propertyType,PropertyImpl.INTERNAL_CONTAINMENT); - createProperty(true, propertyType,PropertyImpl.INTERNAL_DEFAULT); - createProperty(true, propertyType,PropertyImpl.INTERNAL_READ_ONLY); - createProperty(false, propertyType,PropertyImpl.INTERNAL_TYPE); - createProperty(false, propertyType,PropertyImpl.INTERNAL_OPPOSITE); - createProperty(true, propertyType,PropertyImpl.INTERNAL_NULLABLE); - createProperty(true, propertyType,PropertyImpl.INTERNAL_ANY_ATTRIBUTE); - textTypeType = createType(false, TEXT_TYPE); - createProperty(true, textTypeType,TextTypeImpl.INTERNAL_TEXT); - typeType = createType(false, TYPE); - createProperty(false, typeType,TypeImpl.INTERNAL_BASE_TYPE); - createProperty(false, typeType,TypeImpl.INTERNAL_PROPERTY); - createProperty(true, typeType,TypeImpl.INTERNAL_ALIAS_NAME); - createProperty(true, typeType,TypeImpl.INTERNAL_ANY); - createProperty(true, typeType,TypeImpl.INTERNAL_NAME); - createProperty(true, typeType,TypeImpl.INTERNAL_URI); - createProperty(true, typeType,TypeImpl.INTERNAL_DATA_TYPE); - createProperty(true, typeType,TypeImpl.INTERNAL_OPEN); - createProperty(true, typeType,TypeImpl.INTERNAL_SEQUENCED); - createProperty(true, typeType,TypeImpl.INTERNAL_ABSTRACT); - createProperty(true, typeType,TypeImpl.INTERNAL_ANY_ATTRIBUTE); - typesType = createType(false, TYPES); - createProperty(false, typesType,TypesImpl.INTERNAL_TYPE); - xsdTypeType = createType(false, XSD_TYPE); - createProperty(true, xsdTypeType,XSDTypeImpl.INTERNAL_ANY); - - // Create data types - boolean_Type = createType(true, BOOLEAN ); - booleanObjectType = createType(true, BOOLEAN_OBJECT ); - byte_Type = createType(true, BYTE ); - byteObjectType = createType(true, BYTE_OBJECT ); - bytesType = createType(true, BYTES ); - changeSummaryTypeType = createType(true, CHANGE_SUMMARY_TYPE ); - characterType = createType(true, CHARACTER ); - characterObjectType = createType(true, CHARACTER_OBJECT ); - dateType = createType(true, DATE ); - dateTimeType = createType(true, DATE_TIME ); - dayType = createType(true, DAY ); - decimalType = createType(true, DECIMAL ); - double_Type = createType(true, DOUBLE ); - doubleObjectType = createType(true, DOUBLE_OBJECT ); - durationType = createType(true, DURATION ); - float_Type = createType(true, FLOAT ); - floatObjectType = createType(true, FLOAT_OBJECT ); - int_Type = createType(true, INT ); - integerType = createType(true, INTEGER ); - intObjectType = createType(true, INT_OBJECT ); - long_Type = createType(true, LONG ); - longObjectType = createType(true, LONG_OBJECT ); - monthType = createType(true, MONTH ); - monthDayType = createType(true, MONTH_DAY ); - objectType = createType(true, OBJECT ); - short_Type = createType(true, SHORT ); - shortObjectType = createType(true, SHORT_OBJECT ); - stringType = createType(true, STRING ); - stringsType = createType(true, STRINGS ); - timeType = createType(true, TIME ); - uriType = createType(true, URI ); - yearType = createType(true, YEAR ); - yearMonthType = createType(true, YEAR_MONTH ); - yearMonthDayType = createType(true, YEAR_MONTH_DAY ); - } - - private boolean isInitialized = false; - - public void initializeMetaData() - { - if (isInitialized) return; - isInitialized = true; - commonj.sdo.Property property = null; - - // Add supertypes to types - addSuperType(dataGraphTypeType, this.getBaseDataGraphType()); - - // Initialize types and properties - initializeType(baseDataGraphTypeType, BaseDataGraphType.class, "BaseDataGraphType", true); - property = getLocalProperty(baseDataGraphTypeType, 0); - initializeProperty(property, this.getModelsType(), "models", null, 0, 1, BaseDataGraphType.class, false, true, false, true , null); - - property = getLocalProperty(baseDataGraphTypeType, 1); - initializeProperty(property, this.getXSDType(), "xsd", null, 0, 1, BaseDataGraphType.class, false, true, false, true , null); - - property = getLocalProperty(baseDataGraphTypeType, 2); - initializeProperty(property, this.getChangeSummaryType(), "changeSummary", null, 0, 1, BaseDataGraphType.class, false, true, false); - - property = getLocalProperty(baseDataGraphTypeType, 3); - initializeProperty(property, getSequence(), "anyAttribute", null, 0, -1, BaseDataGraphType.class, false, false, false); - - initializeType(dataGraphTypeType, DataGraphType.class, "DataGraphType", false); - property = getLocalProperty(dataGraphTypeType, 0); - initializeProperty(property, getSequence(), "any", null, 0, 1, DataGraphType.class, false, false, false); - - initializeType(dataObjectType, commonj.sdo.DataObject.class, "DataObject", true); // generated as org.apache.tuscany.sdo.model.DataObject.class - initializeType(modelsTypeType, ModelsType.class, "ModelsType", false); - property = getLocalProperty(modelsTypeType, 0); - initializeProperty(property, getSequence(), "any", null, 0, -1, ModelsType.class, false, false, false); - - initializeType(propertyType, Property.class, "Property", false); - property = getLocalProperty(propertyType, 0); - initializeProperty(property, this.getString(), "aliasName", null, 0, -1, Property.class, false, false, false); - - property = getLocalProperty(propertyType, 1); - initializeProperty(property, getSequence(), "any", null, 0, -1, Property.class, false, false, false); - - property = getLocalProperty(propertyType, 2); - initializeProperty(property, this.getString(), "name", null, 0, 1, Property.class, false, true, false); - - property = getLocalProperty(propertyType, 3); - initializeProperty(property, this.getBoolean(), "many", null, 0, 1, Property.class, false, true, false); - - property = getLocalProperty(propertyType, 4); - initializeProperty(property, this.getBoolean(), "containment", null, 0, 1, Property.class, false, true, false); - - property = getLocalProperty(propertyType, 5); - initializeProperty(property, this.getString(), "default", null, 0, 1, Property.class, false, true, false); - - property = getLocalProperty(propertyType, 6); - initializeProperty(property, this.getBoolean(), "readOnly", null, 0, 1, Property.class, false, true, false); - - property = getLocalProperty(propertyType, 7); - initializeProperty(property, this.getType(), "type", null, 0, 1, Property.class, false, true, false, false , null); - setInstanceProperty (property, "commonj.sdo/xml", "propertyType", "sdo:Type"); - - property = getLocalProperty(propertyType, 8); - initializeProperty(property, this.getProperty(), "opposite", null, 0, 1, Property.class, false, true, false, false , null); - setInstanceProperty (property, "commonj.sdo/xml", "propertyType", "sdo:Property"); - - property = getLocalProperty(propertyType, 9); - initializeProperty(property, this.getBoolean(), "nullable", null, 0, 1, Property.class, false, true, false); - - property = getLocalProperty(propertyType, 10); - initializeProperty(property, getSequence(), "anyAttribute", null, 0, -1, Property.class, false, false, false); - - initializeType(textTypeType, TextType.class, "TextType", true); - property = getLocalProperty(textTypeType, 0); - initializeProperty(property, this.getString(), "text", null, 0, -1, TextType.class, false, false, false); - - initializeType(typeType, Type.class, "Type", false); - property = getLocalProperty(typeType, 0); - initializeProperty(property, this.getType(), "baseType", null, 0, -1, Type.class, false, false, false, false , null); - setInstanceProperty (property, "commonj.sdo/xml", "propertyType", "sdo:Type"); - - property = getLocalProperty(typeType, 1); - initializeProperty(property, this.getProperty(), "property", null, 0, -1, Type.class, false, false, false, true , null); - - property = getLocalProperty(typeType, 2); - initializeProperty(property, this.getString(), "aliasName", null, 0, -1, Type.class, false, false, false); - - property = getLocalProperty(typeType, 3); - initializeProperty(property, getSequence(), "any", null, 0, -1, Type.class, false, false, false); - - property = getLocalProperty(typeType, 4); - initializeProperty(property, this.getString(), "name", null, 0, 1, Type.class, false, true, false); - setInstanceProperty (property, "commonj.sdo/xml", "dataType", "sdo:String"); - - property = getLocalProperty(typeType, 5); - initializeProperty(property, this.getURI(), "uri", null, 0, 1, Type.class, false, true, false); - - property = getLocalProperty(typeType, 6); - initializeProperty(property, this.getBoolean(), "dataType", null, 0, 1, Type.class, false, true, false); - - property = getLocalProperty(typeType, 7); - initializeProperty(property, this.getBoolean(), "open", null, 0, 1, Type.class, false, true, false); - - property = getLocalProperty(typeType, 8); - initializeProperty(property, this.getBoolean(), "sequenced", null, 0, 1, Type.class, false, true, false); - - property = getLocalProperty(typeType, 9); - initializeProperty(property, this.getBoolean(), "abstract", null, 0, 1, Type.class, false, true, false); - - property = getLocalProperty(typeType, 10); - initializeProperty(property, getSequence(), "anyAttribute", null, 0, -1, Type.class, false, false, false); - - initializeType(typesType, Types.class, "Types", false); - property = getLocalProperty(typesType, 0); - initializeProperty(property, this.getType(), "type", null, 0, -1, Types.class, false, false, false, true , null); - - initializeType(xsdTypeType, XSDType.class, "XSDType", false); - property = getLocalProperty(xsdTypeType, 0); - initializeProperty(property, getSequence(), "any", null, 0, -1, XSDType.class, false, false, false); - - // Initialize data types - initializeType(boolean_Type, boolean.class, "Boolean", true, false); - setInstanceProperty (boolean_Type, "commonj.sdo/java", "instanceClass", "boolean"); - - initializeType(booleanObjectType, Boolean.class, "BooleanObject", true, false); - - initializeType(byte_Type, byte.class, "Byte", true, false); - setInstanceProperty (byte_Type, "commonj.sdo/java", "instanceClass", "byte"); - - initializeType(byteObjectType, Byte.class, "ByteObject", true, false); - - initializeType(bytesType, byte[].class, "Bytes", true, false); - setInstanceProperty (bytesType, "commonj.sdo/java", "instanceClass", "byte[]"); - - initializeType(changeSummaryTypeType, ChangeSummary.class, "ChangeSummaryType", true, false); - setInstanceProperty (changeSummaryTypeType, "commonj.sdo/java", "instanceClass", "commonj.sdo.ChangeSummary"); - - initializeType(characterType, char.class, "Character", true, false); - setInstanceProperty (characterType, "commonj.sdo/java", "instanceClass", "char"); - - initializeType(characterObjectType, Character.class, "CharacterObject", true, false); - - initializeType(dateType, Date.class, "Date", true, false); - setInstanceProperty (dateType, "commonj.sdo/java", "instanceClass", "java.util.Date"); - - initializeType(dateTimeType, String.class, "DateTime", true, false); - setInstanceProperty (dateTimeType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(dayType, String.class, "Day", true, false); - setInstanceProperty (dayType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(decimalType, BigDecimal.class, "Decimal", true, false); - setInstanceProperty (decimalType, "commonj.sdo/java", "instanceClass", "java.math.BigDecimal"); - - initializeType(double_Type, double.class, "Double", true, false); - setInstanceProperty (double_Type, "commonj.sdo/java", "instanceClass", "double"); - - initializeType(doubleObjectType, Double.class, "DoubleObject", true, false); - - initializeType(durationType, String.class, "Duration", true, false); - setInstanceProperty (durationType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(float_Type, float.class, "Float", true, false); - setInstanceProperty (float_Type, "commonj.sdo/java", "instanceClass", "float"); - - initializeType(floatObjectType, Float.class, "FloatObject", true, false); - - initializeType(int_Type, int.class, "Int", true, false); - setInstanceProperty (int_Type, "commonj.sdo/java", "instanceClass", "int"); - - initializeType(integerType, BigInteger.class, "Integer", true, false); - setInstanceProperty (integerType, "commonj.sdo/java", "instanceClass", "java.math.BigInteger"); - - initializeType(intObjectType, Integer.class, "IntObject", true, false); - - initializeType(long_Type, long.class, "Long", true, false); - setInstanceProperty (long_Type, "commonj.sdo/java", "instanceClass", "long"); - - initializeType(longObjectType, Long.class, "LongObject", true, false); - - initializeType(monthType, String.class, "Month", true, false); - setInstanceProperty (monthType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(monthDayType, String.class, "MonthDay", true, false); - setInstanceProperty (monthDayType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(objectType, Object.class, "Object", true, false); - setInstanceProperty (objectType, "commonj.sdo/java", "instanceClass", "java.lang.Object"); - - initializeType(short_Type, short.class, "Short", true, false); - setInstanceProperty (short_Type, "commonj.sdo/java", "instanceClass", "short"); - - initializeType(shortObjectType, Short.class, "ShortObject", true, false); - - initializeType(stringType, String.class, "String", true, false); - setInstanceProperty (stringType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(stringsType, List.class, "Strings", true, false); - setInstanceProperty (stringsType, "commonj.sdo/java", "instanceClass", "java.util.List"); - - initializeType(timeType, String.class, "Time", true, false); - setInstanceProperty (timeType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(uriType, String.class, "URI", true, false); - setInstanceProperty (uriType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(yearType, String.class, "Year", true, false); - setInstanceProperty (yearType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(yearMonthType, String.class, "YearMonth", true, false); - setInstanceProperty (yearMonthType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - initializeType(yearMonthDayType, String.class, "YearMonthDay", true, false); - setInstanceProperty (yearMonthDayType, "commonj.sdo/java", "instanceClass", "java.lang.String"); - - createXSDMetaData(); - } - - protected void createXSDMetaData() - { - super.initXSD(); - - commonj.sdo.Property property = null; - - - addXSDMapping - (baseDataGraphTypeType, - new String[] - { - "name", "BaseDataGraphType", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(baseDataGraphTypeType, BaseDataGraphTypeImpl.INTERNAL_MODELS), - new String[] - { - "kind", "element", - "name", "models" - }); - - addXSDMapping - (getProperty(baseDataGraphTypeType, BaseDataGraphTypeImpl.INTERNAL_XSD), - new String[] - { - "kind", "element", - "name", "xsd" - }); - - addXSDMapping - (getProperty(baseDataGraphTypeType, BaseDataGraphTypeImpl.INTERNAL_CHANGE_SUMMARY), - new String[] - { - "kind", "element", - "name", "changeSummary" - }); - - addXSDMapping - (getProperty(baseDataGraphTypeType, BaseDataGraphTypeImpl.INTERNAL_ANY_ATTRIBUTE), - new String[] - { - "kind", "attributeWildcard", - "wildcards", "##other", - "name", ":3", - "processing", "lax" - }); - - addXSDMapping - (dataGraphTypeType, - new String[] - { - "name", "DataGraphType", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(dataGraphTypeType, DataGraphTypeImpl.INTERNAL_ANY), - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":4", - "processing", "lax" - }); - - addXSDMapping - (dataObjectType, - new String[] - { - "name", "DataObject", - "kind", "empty" - }); - - property = createGlobalProperty - ("datagraph", - this.getDataGraphType(), - new String[] - { - "kind", "element", - "name", "datagraph", - "namespace", "##targetNamespace" - }); - - property = createGlobalProperty - ("dataObject", - this.getDataObject(), - new String[] - { - "kind", "element", - "name", "dataObject", - "namespace", "##targetNamespace" - }); - - property = createGlobalProperty - ("type", - this.getType(), - new String[] - { - "kind", "element", - "name", "type", - "namespace", "##targetNamespace" - }); - - property = createGlobalProperty - ("types", - this.getTypes(), - new String[] - { - "kind", "element", - "name", "types", - "namespace", "##targetNamespace" - }); - - property = createGlobalProperty - ("ref", - this.getString(), - new String[] - { - "kind", "attribute", - "name", "ref", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - property = createGlobalProperty - ("unset", - this.getString(), - new String[] - { - "kind", "attribute", - "name", "unset", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - addXSDMapping - (modelsTypeType, - new String[] - { - "name", "ModelsType", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(modelsTypeType, ModelsTypeImpl.INTERNAL_ANY), - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":0", - "processing", "lax" - }); - - addXSDMapping - (propertyType, - new String[] - { - "name", "Property", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_ALIAS_NAME), - new String[] - { - "kind", "element", - "name", "aliasName", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_ANY), - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":1", - "processing", "lax" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_NAME), - new String[] - { - "kind", "attribute", - "name", "name" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_MANY), - new String[] - { - "kind", "attribute", - "name", "many" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_CONTAINMENT), - new String[] - { - "kind", "attribute", - "name", "containment" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_DEFAULT), - new String[] - { - "kind", "attribute", - "name", "default" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_READ_ONLY), - new String[] - { - "kind", "attribute", - "name", "readOnly" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_TYPE), - new String[] - { - "kind", "attribute", - "name", "type" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_OPPOSITE), - new String[] - { - "kind", "attribute", - "name", "opposite" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_NULLABLE), - new String[] - { - "kind", "attribute", - "name", "nullable" - }); - - addXSDMapping - (getProperty(propertyType, PropertyImpl.INTERNAL_ANY_ATTRIBUTE), - new String[] - { - "kind", "attributeWildcard", - "wildcards", "##any", - "name", ":10", - "processing", "lax" - }); - - addXSDMapping - (textTypeType, - new String[] - { - "name", "TextType", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(textTypeType, TextTypeImpl.INTERNAL_TEXT), - new String[] - { - "kind", "element", - "name", "text", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (typeType, - new String[] - { - "name", "Type", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_BASE_TYPE), - new String[] - { - "kind", "element", - "name", "baseType", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_PROPERTY), - new String[] - { - "kind", "element", - "name", "property", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_ALIAS_NAME), - new String[] - { - "kind", "element", - "name", "aliasName", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_ANY), - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":3", - "processing", "lax" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_NAME), - new String[] - { - "kind", "attribute", - "name", "name" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_URI), - new String[] - { - "kind", "attribute", - "name", "uri" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_DATA_TYPE), - new String[] - { - "kind", "attribute", - "name", "dataType" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_OPEN), - new String[] - { - "kind", "attribute", - "name", "open" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_SEQUENCED), - new String[] - { - "kind", "attribute", - "name", "sequenced" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_ABSTRACT), - new String[] - { - "kind", "attribute", - "name", "abstract" - }); - - addXSDMapping - (getProperty(typeType, TypeImpl.INTERNAL_ANY_ATTRIBUTE), - new String[] - { - "kind", "attributeWildcard", - "wildcards", "##any", - "name", ":10", - "processing", "lax" - }); - - addXSDMapping - (typesType, - new String[] - { - "name", "Types", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(typesType, TypesImpl.INTERNAL_TYPE), - new String[] - { - "kind", "element", - "name", "type", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (xsdTypeType, - new String[] - { - "name", "XSDType", - "kind", "elementOnly" - }); - - addXSDMapping - (getProperty(xsdTypeType, XSDTypeImpl.INTERNAL_ANY), - new String[] - { - "kind", "elementWildcard", - "wildcards", "http://www.w3.org/2001/XMLSchema", - "name", ":0", - "processing", "lax" - }); - - addXSDMapping - (boolean_Type, - new String[] - { - "name", "Boolean" - }); - - addXSDMapping - (booleanObjectType, - new String[] - { - "name", "Boolean:Object", - "baseType", "Boolean" - }); - - addXSDMapping - (byte_Type, - new String[] - { - "name", "Byte" - }); - - addXSDMapping - (byteObjectType, - new String[] - { - "name", "Byte:Object", - "baseType", "Byte" - }); - - addXSDMapping - (bytesType, - new String[] - { - "name", "Bytes" - }); - - addXSDMapping - (changeSummaryTypeType, - new String[] - { - "name", "ChangeSummaryType" - }); - - addXSDMapping - (characterType, - new String[] - { - "name", "Character" - }); - - addXSDMapping - (characterObjectType, - new String[] - { - "name", "Character:Object", - "baseType", "Character" - }); - - addXSDMapping - (dateType, - new String[] - { - "name", "Date" - }); - - addXSDMapping - (dateTimeType, - new String[] - { - "name", "DateTime" - }); - - addXSDMapping - (dayType, - new String[] - { - "name", "Day" - }); - - addXSDMapping - (decimalType, - new String[] - { - "name", "Decimal" - }); - - addXSDMapping - (double_Type, - new String[] - { - "name", "Double" - }); - - addXSDMapping - (doubleObjectType, - new String[] - { - "name", "Double:Object", - "baseType", "Double" - }); - - addXSDMapping - (durationType, - new String[] - { - "name", "Duration" - }); - - addXSDMapping - (float_Type, - new String[] - { - "name", "Float" - }); - - addXSDMapping - (floatObjectType, - new String[] - { - "name", "Float:Object", - "baseType", "Float" - }); - - addXSDMapping - (int_Type, - new String[] - { - "name", "Int" - }); - - addXSDMapping - (integerType, - new String[] - { - "name", "Integer" - }); - - addXSDMapping - (intObjectType, - new String[] - { - "name", "Int:Object", - "baseType", "Int" - }); - - addXSDMapping - (long_Type, - new String[] - { - "name", "Long" - }); - - addXSDMapping - (longObjectType, - new String[] - { - "name", "Long:Object", - "baseType", "Long" - }); - - addXSDMapping - (monthType, - new String[] - { - "name", "Month" - }); - - addXSDMapping - (monthDayType, - new String[] - { - "name", "MonthDay" - }); - - addXSDMapping - (objectType, - new String[] - { - "name", "Object" - }); - - addXSDMapping - (short_Type, - new String[] - { - "name", "Short" - }); - - addXSDMapping - (shortObjectType, - new String[] - { - "name", "Short:Object", - "baseType", "Short" - }); - - addXSDMapping - (stringType, - new String[] - { - "name", "String" - }); - - addXSDMapping - (stringsType, - new String[] - { - "name", "Strings" - }); - - addXSDMapping - (timeType, - new String[] - { - "name", "Time" - }); - - addXSDMapping - (uriType, - new String[] - { - "name", "URI" - }); - - addXSDMapping - (yearType, - new String[] - { - "name", "Year" - }); - - addXSDMapping - (yearMonthType, - new String[] - { - "name", "YearMonth" - }); - - addXSDMapping - (yearMonthDayType, - new String[] - { - "name", "YearMonthDay" - }); - - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Boolean createBooleanFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createBooleanObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertBooleanToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertBooleanObject((Boolean)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Boolean createBooleanObjectFromString(String initialValue) - { - return (Boolean)createBooleanFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertBooleanObjectToString(Object instanceValue) - { - return convertBooleanToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Byte createByteFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createByteObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertByteToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertByteObject((Byte)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Byte createByteObjectFromString(String initialValue) - { - return (Byte)createByteFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertByteObjectToString(Object instanceValue) - { - return convertByteToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public byte[] createBytesFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createHexBinary(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertBytesToString(Object instanceValue) - { - if (instanceValue instanceof byte[]) { - return XMLTypeFactory.eINSTANCE.convertHexBinary((byte[])instanceValue); - } else { - return XMLTypeFactory.eINSTANCE.convertHexBinary(instanceValue.toString().getBytes()); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public ChangeSummary createChangeSummaryTypeFromString(String initialValue) - { - return null; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertChangeSummaryTypeToString(Object instanceValue) - { - return "change summary serialization goes here ..."; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Character createCharacterFromString(String initialValue) - { - return (initialValue == null && initialValue.length() > 0) - ? null : (new Character(XMLTypeUtil.normalize(initialValue, true).charAt(0))); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertCharacterToString(Object instanceValue) - { - return String.valueOf(((Character)instanceValue).charValue()); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Character createCharacterObjectFromString(String initialValue) - { - return (Character)createCharacterFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertCharacterObjectToString(Object instanceValue) - { - return convertCharacterToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Date createDateFromString(String initialValue) - { - // XMLCalendar cal = (XMLCalendar) XMLTypeFactory.eINSTANCE.createDate(initialValue); - // return (cal != null) ? cal.getDate() : null; - return DataHelper.INSTANCE.toDate(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDateToString(Object instanceValue) - { - if (instanceValue == null) - { - return null; - } - - SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'"); - f.setTimeZone(TimeZone.getTimeZone("GMT")); - - return f.format((Date)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createDateTimeFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDateTimeToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createDayFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDayToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public BigDecimal createDecimalFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createDecimal(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDecimalToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertDecimal((BigDecimal)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Double createDoubleFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createDoubleObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDoubleToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertDoubleObject((Double)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Double createDoubleObjectFromString(String initialValue) - { - return (Double)createDoubleFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDoubleObjectToString(Object instanceValue) - { - return convertDoubleToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createDurationFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDurationToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Float createFloatFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createFloatObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertFloatToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertFloatObject((Float)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Float createFloatObjectFromString(String initialValue) - { - return (Float)createFloatFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertFloatObjectToString(Object instanceValue) - { - return convertFloatToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Integer createIntFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createIntObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertIntToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertIntObject((Integer)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public BigInteger createIntegerFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createInteger(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertIntegerToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertInteger((BigInteger)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Integer createIntObjectFromString(String initialValue) - { - return (Integer)createIntFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertIntObjectToString(Object instanceValue) - { - return convertIntToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Long createLongFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createLongObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertLongToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertLongObject((Long)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Long createLongObjectFromString(String initialValue) - { - return (Long)createLongFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertLongObjectToString(Object instanceValue) - { - return convertLongToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createMonthFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertMonthToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createMonthDayFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertMonthDayToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Object createObjectFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertObjectToString(Object instanceValue) - { - return (instanceValue != null) ? instanceValue.toString() : null; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Short createShortFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createShortObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertShortToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertShortObject((Short)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Short createShortObjectFromString(String initialValue) - { - return (Short)createShortFromString(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertShortObjectToString(Object instanceValue) - { - return convertShortToString(instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createStringFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertStringToString(Object instanceValue) - { - return (instanceValue != null) ? instanceValue.toString() : null; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public List createStringsFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createENTITIES(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertStringsToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertENTITIES((List)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createTimeFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertTimeToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createURIFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertURIToString(Object instanceValue) - { - return (instanceValue != null) ? instanceValue.toString() : null; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createYearFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertYearToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createYearMonthFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertYearMonthToString(Object instanceValue) - { - return (String)instanceValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String createYearMonthDayFromString(String initialValue) - { - return initialValue; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertYearMonthDayToString(Object instanceValue) - { - return (String)instanceValue; - } - - - -} //ModelFactoryImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java deleted file mode 100644 index df043a0d10..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.ModelsType; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Models Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.ModelsTypeImpl#getAny <em>Any</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class ModelsTypeImpl extends DataObjectBase implements ModelsType -{ - - public final static int ANY = -1; - - public final static int SDO_PROPERTY_COUNT = 0; - - public final static int EXTENDED_PROPERTY_COUNT = -1; - - - /** - * The internal feature id for the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = 0; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 1; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_ANY: return ANY; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ModelsTypeImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getModelsType(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = createSequence(INTERNAL_ANY); - } - return any; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case ANY: - return removeFromSequence(getAny(), 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 ANY: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getAny(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case ANY: - setSequence(getAny(), newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case ANY: - unsetSequence(getAny()); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case ANY: - return any != null && !isSequenceEmpty(getAny()); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (any: "); - result.append(any); - result.append(')'); - return result.toString(); - } - -} //ModelsTypeImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java deleted file mode 100644 index c8348ded2d..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java +++ /dev/null @@ -1,1170 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Sequence; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.Property; -import org.apache.tuscany.sdo.model.Type; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Property</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getAliasName <em>Alias Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getAny <em>Any</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getName <em>Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isMany <em>Many</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isContainment <em>Containment</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getDefault <em>Default</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isReadOnly <em>Read Only</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getType_ <em>Type</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getOpposite <em>Opposite</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isNullable <em>Nullable</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getAnyAttribute <em>Any Attribute</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class PropertyImpl extends DataObjectBase implements Property -{ - - public final static int ALIAS_NAME = 0; - - public final static int ANY = -1; - - public final static int NAME = 1; - - public final static int MANY = 2; - - public final static int CONTAINMENT = 3; - - public final static int DEFAULT = 4; - - public final static int READ_ONLY = 5; - - public final static int TYPE = 6; - - public final static int OPPOSITE = 7; - - public final static int NULLABLE = 8; - - public final static int ANY_ATTRIBUTE = -2; - - public final static int SDO_PROPERTY_COUNT = 9; - - public final static int EXTENDED_PROPERTY_COUNT = -2; - - - /** - * The internal feature id for the '<em><b>Alias Name</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ALIAS_NAME = 0; - - /** - * The internal feature id for the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = 1; - - /** - * The internal feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_NAME = 2; - - /** - * The internal feature id for the '<em><b>Many</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_MANY = 3; - - /** - * The internal feature id for the '<em><b>Containment</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_CONTAINMENT = 4; - - /** - * The internal feature id for the '<em><b>Default</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_DEFAULT = 5; - - /** - * The internal feature id for the '<em><b>Read Only</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_READ_ONLY = 6; - - /** - * The internal feature id for the '<em><b>Type</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_TYPE = 7; - - /** - * The internal feature id for the '<em><b>Opposite</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_OPPOSITE = 8; - - /** - * The internal feature id for the '<em><b>Nullable</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_NULLABLE = 9; - - /** - * The internal feature id for the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY_ATTRIBUTE = 10; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 11; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_ALIAS_NAME: return ALIAS_NAME; - case INTERNAL_ANY: return ANY; - case INTERNAL_NAME: return NAME; - case INTERNAL_MANY: return MANY; - case INTERNAL_CONTAINMENT: return CONTAINMENT; - case INTERNAL_DEFAULT: return DEFAULT; - case INTERNAL_READ_ONLY: return READ_ONLY; - case INTERNAL_TYPE: return TYPE; - case INTERNAL_OPPOSITE: return OPPOSITE; - case INTERNAL_NULLABLE: return NULLABLE; - case INTERNAL_ANY_ATTRIBUTE: return ANY_ATTRIBUTE; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getAliasName() <em>Alias Name</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAliasName() - * @generated - * @ordered - */ - - protected List aliasName = null; - - /** - * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_DEFAULT_; - - /** - * This is true if the Name attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean name_set_ = false; - - /** - * The default value of the '{@link #isMany() <em>Many</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMany() - * @generated - * @ordered - */ - protected static final boolean MANY_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isMany() <em>Many</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isMany() - * @generated - * @ordered - */ - protected boolean many = MANY_DEFAULT_; - - /** - * This is true if the Many attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean many_set_ = false; - - /** - * The default value of the '{@link #isContainment() <em>Containment</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isContainment() - * @generated - * @ordered - */ - protected static final boolean CONTAINMENT_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isContainment() <em>Containment</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isContainment() - * @generated - * @ordered - */ - protected boolean containment = CONTAINMENT_DEFAULT_; - - /** - * This is true if the Containment attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean containment_set_ = false; - - /** - * The default value of the '{@link #getDefault_() <em>Default</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getDefault_() - * @generated - * @ordered - */ - protected static final String DEFAULT_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getDefault_() <em>Default</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getDefault_() - * @generated - * @ordered - */ - protected String default_ = DEFAULT_DEFAULT_; - - /** - * This is true if the Default attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean default_set_ = false; - - /** - * The default value of the '{@link #isReadOnly() <em>Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isReadOnly() - * @generated - * @ordered - */ - protected static final boolean READ_ONLY_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isReadOnly() <em>Read Only</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isReadOnly() - * @generated - * @ordered - */ - protected boolean readOnly = READ_ONLY_DEFAULT_; - - /** - * This is true if the Read Only attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean readOnly_set_ = false; - - /** - * The cached value of the '{@link #getType_() <em>Type</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getType_() - * @generated - * @ordered - */ - - protected Type type = null; - - /** - * This is true if the Type reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean type_set_ = false; - - /** - * The cached value of the '{@link #getOpposite_() <em>Opposite</em>}' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getOpposite_() - * @generated - * @ordered - */ - - protected Property opposite = null; - - /** - * This is true if the Opposite reference has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean opposite_set_ = false; - - /** - * The default value of the '{@link #isNullable() <em>Nullable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isNullable() - * @generated - * @ordered - */ - protected static final boolean NULLABLE_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isNullable() <em>Nullable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isNullable() - * @generated - * @ordered - */ - protected boolean nullable = NULLABLE_DEFAULT_; - - /** - * This is true if the Nullable attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean nullable_set_ = false; - - /** - * The cached value of the '{@link #getAnyAttribute() <em>Any Attribute</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAnyAttribute() - * @generated - * @ordered - */ - - protected Sequence anyAttribute = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public PropertyImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public commonj.sdo.Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getProperty(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getAliasName() - { - if (aliasName == null) - { - aliasName = createPropertyList(ListKind.DATATYPE, String.class, ALIAS_NAME, 0); - } - return aliasName; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = createSequence(INTERNAL_ANY); - } - return any; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getName() - { - return name; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - boolean oldName_set_ = name_set_; - name_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetName() - { - String oldName = name; - boolean oldName_set_ = name_set_; - name = NAME_DEFAULT_; - name_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetName() - { - return name_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isMany() - { - return many; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMany(boolean newMany) - { - boolean oldMany = many; - many = newMany; - boolean oldMany_set_ = many_set_; - many_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_MANY, oldMany, many, !oldMany_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetMany() - { - boolean oldMany = many; - boolean oldMany_set_ = many_set_; - many = MANY_DEFAULT_; - many_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_MANY, oldMany, MANY_DEFAULT_, oldMany_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetMany() - { - return many_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isContainment() - { - return containment; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setContainment(boolean newContainment) - { - boolean oldContainment = containment; - containment = newContainment; - boolean oldContainment_set_ = containment_set_; - containment_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_CONTAINMENT, oldContainment, containment, !oldContainment_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetContainment() - { - boolean oldContainment = containment; - boolean oldContainment_set_ = containment_set_; - containment = CONTAINMENT_DEFAULT_; - containment_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_CONTAINMENT, oldContainment, CONTAINMENT_DEFAULT_, oldContainment_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetContainment() - { - return containment_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getDefault_() - { - return default_; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setDefault_(String newDefault) - { - String oldDefault = default_; - default_ = newDefault; - boolean oldDefault_set_ = default_set_; - default_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_DEFAULT, oldDefault, default_, !oldDefault_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetDefault() - { - String oldDefault = default_; - boolean oldDefault_set_ = default_set_; - default_ = DEFAULT_DEFAULT_; - default_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_DEFAULT, oldDefault, DEFAULT_DEFAULT_, oldDefault_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetDefault() - { - return default_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isReadOnly() - { - return readOnly; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setReadOnly(boolean newReadOnly) - { - boolean oldReadOnly = readOnly; - readOnly = newReadOnly; - boolean oldReadOnly_set_ = readOnly_set_; - readOnly_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_READ_ONLY, oldReadOnly, readOnly, !oldReadOnly_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetReadOnly() - { - boolean oldReadOnly = readOnly; - boolean oldReadOnly_set_ = readOnly_set_; - readOnly = READ_ONLY_DEFAULT_; - readOnly_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_READ_ONLY, oldReadOnly, READ_ONLY_DEFAULT_, oldReadOnly_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetReadOnly() - { - return readOnly_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getType_() - { - if (type != null && isProxy(type)) - { - Object oldType = type; - type = (Type)resolveProxy(oldType); - if (type != oldType) - { - if (isNotifying()) - notify(ChangeKind.RESOLVE, INTERNAL_TYPE, oldType, type); - } - } - return type; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type basicGetType() - { - return type; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setType(Type newType) - { - Type oldType = type; - type = newType; - boolean oldType_set_ = type_set_; - type_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_TYPE, oldType, type, !oldType_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetType() - { - Type oldType = type; - boolean oldType_set_ = type_set_; - type = null; - type_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_TYPE, oldType, null, oldType_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetType() - { - return type_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Property getOpposite_() - { - if (opposite != null && isProxy(opposite)) - { - Object oldOpposite = opposite; - opposite = (Property)resolveProxy(oldOpposite); - if (opposite != oldOpposite) - { - if (isNotifying()) - notify(ChangeKind.RESOLVE, INTERNAL_OPPOSITE, oldOpposite, opposite); - } - } - return opposite; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Property basicGetOpposite() - { - return opposite; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setOpposite_(Property newOpposite) - { - Property oldOpposite = opposite; - opposite = newOpposite; - boolean oldOpposite_set_ = opposite_set_; - opposite_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_OPPOSITE, oldOpposite, opposite, !oldOpposite_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetOpposite() - { - Property oldOpposite = opposite; - boolean oldOpposite_set_ = opposite_set_; - opposite = null; - opposite_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_OPPOSITE, oldOpposite, null, oldOpposite_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetOpposite() - { - return opposite_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isNullable() - { - return nullable; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setNullable(boolean newNullable) - { - boolean oldNullable = nullable; - nullable = newNullable; - boolean oldNullable_set_ = nullable_set_; - nullable_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_NULLABLE, oldNullable, nullable, !oldNullable_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetNullable() - { - boolean oldNullable = nullable; - boolean oldNullable_set_ = nullable_set_; - nullable = NULLABLE_DEFAULT_; - nullable_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_NULLABLE, oldNullable, NULLABLE_DEFAULT_, oldNullable_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetNullable() - { - return nullable_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAnyAttribute() - { - if (anyAttribute == null) - { - anyAttribute = createSequence(INTERNAL_ANY_ATTRIBUTE); - } - return anyAttribute; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case ANY: - return removeFromSequence(getAny(), otherEnd, changeContext); - case ANY_ATTRIBUTE: - return removeFromSequence(getAnyAttribute(), 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 ALIAS_NAME: - return getAliasName(); - case ANY: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getAny(); - case NAME: - return getName(); - case MANY: - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case CONTAINMENT: - return isContainment() ? Boolean.TRUE : Boolean.FALSE; - case DEFAULT: - return getDefault_(); - case READ_ONLY: - return isReadOnly() ? Boolean.TRUE : Boolean.FALSE; - case TYPE: - if (resolve) return getType_(); - return basicGetType(); - case OPPOSITE: - if (resolve) return getOpposite_(); - return basicGetOpposite(); - case NULLABLE: - return isNullable() ? Boolean.TRUE : Boolean.FALSE; - case ANY_ATTRIBUTE: - // 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 getAnyAttribute(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case ALIAS_NAME: - getAliasName().clear(); - getAliasName().addAll((Collection)newValue); - return; - case ANY: - setSequence(getAny(), newValue); - return; - case NAME: - setName((String)newValue); - return; - case MANY: - setMany(((Boolean)newValue).booleanValue()); - return; - case CONTAINMENT: - setContainment(((Boolean)newValue).booleanValue()); - return; - case DEFAULT: - setDefault_((String)newValue); - return; - case READ_ONLY: - setReadOnly(((Boolean)newValue).booleanValue()); - return; - case TYPE: - setType((Type)newValue); - return; - case OPPOSITE: - setOpposite_((Property)newValue); - return; - case NULLABLE: - setNullable(((Boolean)newValue).booleanValue()); - return; - case ANY_ATTRIBUTE: - setSequence(getAnyAttribute(), newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case ALIAS_NAME: - getAliasName().clear(); - return; - case ANY: - unsetSequence(getAny()); - return; - case NAME: - unsetName(); - return; - case MANY: - unsetMany(); - return; - case CONTAINMENT: - unsetContainment(); - return; - case DEFAULT: - unsetDefault(); - return; - case READ_ONLY: - unsetReadOnly(); - return; - case TYPE: - unsetType(); - return; - case OPPOSITE: - unsetOpposite(); - return; - case NULLABLE: - unsetNullable(); - return; - case ANY_ATTRIBUTE: - unsetSequence(getAnyAttribute()); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case ALIAS_NAME: - return aliasName != null && !aliasName.isEmpty(); - case ANY: - return any != null && !isSequenceEmpty(getAny()); - case NAME: - return isSetName(); - case MANY: - return isSetMany(); - case CONTAINMENT: - return isSetContainment(); - case DEFAULT: - return isSetDefault(); - case READ_ONLY: - return isSetReadOnly(); - case TYPE: - return isSetType(); - case OPPOSITE: - return isSetOpposite(); - case NULLABLE: - return isSetNullable(); - case ANY_ATTRIBUTE: - return anyAttribute != null && !isSequenceEmpty(getAnyAttribute()); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (aliasName: "); - result.append(aliasName); - result.append(", any: "); - result.append(any); - result.append(", name: "); - if (name_set_) result.append(name); else result.append("<unset>"); - result.append(", many: "); - if (many_set_) result.append(many); else result.append("<unset>"); - result.append(", containment: "); - if (containment_set_) result.append(containment); else result.append("<unset>"); - result.append(", default: "); - if (default_set_) result.append(default_); else result.append("<unset>"); - result.append(", readOnly: "); - if (readOnly_set_) result.append(readOnly); else result.append("<unset>"); - result.append(", nullable: "); - if (nullable_set_) result.append(nullable); else result.append("<unset>"); - result.append(", anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - -} //PropertyImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java deleted file mode 100644 index 48a310b142..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Type; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.TextType; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Text Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.TextTypeImpl#getText <em>Text</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public abstract class TextTypeImpl extends DataObjectBase implements TextType -{ - - public final static int TEXT = 0; - - public final static int SDO_PROPERTY_COUNT = 1; - - public final static int EXTENDED_PROPERTY_COUNT = 0; - - - /** - * The internal feature id for the '<em><b>Text</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_TEXT = 0; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 1; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_TEXT: return TEXT; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getText() <em>Text</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getText() - * @generated - * @ordered - */ - - protected List text = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TextTypeImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getTextType(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getText() - { - if (text == null) - { - text = createPropertyList(ListKind.DATATYPE, String.class, TEXT, 0); - } - return text; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case TEXT: - return getText(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case TEXT: - getText().clear(); - getText().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case TEXT: - getText().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case TEXT: - return text != null && !text.isEmpty(); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (text: "); - result.append(text); - result.append(')'); - return result.toString(); - } - -} //TextTypeImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java deleted file mode 100644 index aee2ecaaab..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java +++ /dev/null @@ -1,1068 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Sequence; -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.model.ModelFactory; -import org.apache.tuscany.sdo.model.Property; -import org.apache.tuscany.sdo.model.Type; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.util.BasicExtendedMetaData; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getBaseType <em>Base Type</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getProperty <em>Property</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getAliasName <em>Alias Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getAny <em>Any</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getName <em>Name</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getUri <em>Uri</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#isDataType <em>Data Type</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#isOpen <em>Open</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#isSequenced <em>Sequenced</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#isAbstract <em>Abstract</em>}</li> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypeImpl#getAnyAttribute <em>Any Attribute</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class TypeImpl extends DataObjectBase implements Type -{ - - public final static int BASE_TYPE = 0; - - public final static int PROPERTY = 1; - - public final static int ALIAS_NAME = 2; - - public final static int ANY = -1; - - public final static int NAME = 3; - - public final static int URI = 4; - - public final static int DATA_TYPE = 5; - - public final static int OPEN = 6; - - public final static int SEQUENCED = 7; - - public final static int ABSTRACT = 8; - - public final static int ANY_ATTRIBUTE = -2; - - public final static int SDO_PROPERTY_COUNT = 9; - - public final static int EXTENDED_PROPERTY_COUNT = -2; - - - /** - * The internal feature id for the '<em><b>Base Type</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_BASE_TYPE = 0; - - /** - * The internal feature id for the '<em><b>Property</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY = 1; - - /** - * The internal feature id for the '<em><b>Alias Name</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ALIAS_NAME = 2; - - /** - * The internal feature id for the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = 3; - - /** - * The internal feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_NAME = 4; - - /** - * The internal feature id for the '<em><b>Uri</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_URI = 5; - - /** - * The internal feature id for the '<em><b>Data Type</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_DATA_TYPE = 6; - - /** - * The internal feature id for the '<em><b>Open</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_OPEN = 7; - - /** - * The internal feature id for the '<em><b>Sequenced</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_SEQUENCED = 8; - - /** - * The internal feature id for the '<em><b>Abstract</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ABSTRACT = 9; - - /** - * The internal feature id for the '<em><b>Any Attribute</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY_ATTRIBUTE = 10; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 11; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_BASE_TYPE: return BASE_TYPE; - case INTERNAL_PROPERTY: return PROPERTY; - case INTERNAL_ALIAS_NAME: return ALIAS_NAME; - case INTERNAL_ANY: return ANY; - case INTERNAL_NAME: return NAME; - case INTERNAL_URI: return URI; - case INTERNAL_DATA_TYPE: return DATA_TYPE; - case INTERNAL_OPEN: return OPEN; - case INTERNAL_SEQUENCED: return SEQUENCED; - case INTERNAL_ABSTRACT: return ABSTRACT; - case INTERNAL_ANY_ATTRIBUTE: return ANY_ATTRIBUTE; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getBaseType() <em>Base Type</em>}' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getBaseType() - * @generated - * @ordered - */ - - protected List baseType = null; - - /** - * The cached value of the '{@link #getProperty() <em>Property</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getProperty() - * @generated - * @ordered - */ - - protected List property = null; - - /** - * The cached value of the '{@link #getAliasName() <em>Alias Name</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAliasName() - * @generated - * @ordered - */ - - protected List aliasName = null; - - /** - * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_DEFAULT_; - - /** - * This is true if the Name attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean name_set_ = false; - - /** - * The default value of the '{@link #getUri() <em>Uri</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getUri() - * @generated - * @ordered - */ - protected static final String URI_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getUri() - * @generated - * @ordered - */ - protected String uri = URI_DEFAULT_; - - /** - * This is true if the Uri attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean uri_set_ = false; - - /** - * The default value of the '{@link #isDataType() <em>Data Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isDataType() - * @generated - * @ordered - */ - protected static final boolean DATA_TYPE_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isDataType() <em>Data Type</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isDataType() - * @generated - * @ordered - */ - protected boolean dataType = DATA_TYPE_DEFAULT_; - - /** - * This is true if the Data Type attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean dataType_set_ = false; - - /** - * The default value of the '{@link #isOpen() <em>Open</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isOpen() - * @generated - * @ordered - */ - protected static final boolean OPEN_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isOpen() <em>Open</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isOpen() - * @generated - * @ordered - */ - protected boolean open = OPEN_DEFAULT_; - - /** - * This is true if the Open attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean open_set_ = false; - - /** - * The default value of the '{@link #isSequenced() <em>Sequenced</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSequenced() - * @generated - * @ordered - */ - protected static final boolean SEQUENCED_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isSequenced() <em>Sequenced</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSequenced() - * @generated - * @ordered - */ - protected boolean sequenced = SEQUENCED_DEFAULT_; - - /** - * This is true if the Sequenced attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean sequenced_set_ = false; - - /** - * The default value of the '{@link #isAbstract() <em>Abstract</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isAbstract() - * @generated - * @ordered - */ - protected static final boolean ABSTRACT_DEFAULT_ = false; - - /** - * The cached value of the '{@link #isAbstract() <em>Abstract</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isAbstract() - * @generated - * @ordered - */ - protected boolean abstract_ = ABSTRACT_DEFAULT_; - - /** - * This is true if the Abstract attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean abstract_set_ = false; - - /** - * The cached value of the '{@link #getAnyAttribute() <em>Any Attribute</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAnyAttribute() - * @generated - * @ordered - */ - - protected Sequence anyAttribute = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TypeImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public commonj.sdo.Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getType(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getBaseType() - { - if (baseType == null) - { - baseType = createPropertyList(ListKind.NONCONTAINMENT_RESOLVING, Type.class, BASE_TYPE, 0); - } - return baseType; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getProperty() - { - if (property == null) - { - property = createPropertyList(ListKind.CONTAINMENT, Property.class, PROPERTY, 0); - } - return property; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getAliasName() - { - if (aliasName == null) - { - aliasName = createPropertyList(ListKind.DATATYPE, String.class, ALIAS_NAME, 0); - } - return aliasName; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = createSequence(INTERNAL_ANY); - } - return any; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getName() - { - return name; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - boolean oldName_set_ = name_set_; - name_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetName() - { - String oldName = name; - boolean oldName_set_ = name_set_; - name = NAME_DEFAULT_; - name_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetName() - { - return name_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getUri() - { - return uri; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setUri(String newUri) - { - String oldUri = uri; - uri = newUri; - boolean oldUri_set_ = uri_set_; - uri_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_URI, oldUri, uri, !oldUri_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetUri() - { - String oldUri = uri; - boolean oldUri_set_ = uri_set_; - uri = URI_DEFAULT_; - uri_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_URI, oldUri, URI_DEFAULT_, oldUri_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetUri() - { - return uri_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isDataType() - { - return dataType; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setDataType(boolean newDataType) - { - boolean oldDataType = dataType; - dataType = newDataType; - boolean oldDataType_set_ = dataType_set_; - dataType_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_DATA_TYPE, oldDataType, dataType, !oldDataType_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetDataType() - { - boolean oldDataType = dataType; - boolean oldDataType_set_ = dataType_set_; - dataType = DATA_TYPE_DEFAULT_; - dataType_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_DATA_TYPE, oldDataType, DATA_TYPE_DEFAULT_, oldDataType_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetDataType() - { - return dataType_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isOpen() - { - return open; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setOpen(boolean newOpen) - { - boolean oldOpen = open; - open = newOpen; - boolean oldOpen_set_ = open_set_; - open_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_OPEN, oldOpen, open, !oldOpen_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetOpen() - { - boolean oldOpen = open; - boolean oldOpen_set_ = open_set_; - open = OPEN_DEFAULT_; - open_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_OPEN, oldOpen, OPEN_DEFAULT_, oldOpen_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetOpen() - { - return open_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSequenced() - { - return sequenced; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setSequenced(boolean newSequenced) - { - boolean oldSequenced = sequenced; - sequenced = newSequenced; - boolean oldSequenced_set_ = sequenced_set_; - sequenced_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_SEQUENCED, oldSequenced, sequenced, !oldSequenced_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetSequenced() - { - boolean oldSequenced = sequenced; - boolean oldSequenced_set_ = sequenced_set_; - sequenced = SEQUENCED_DEFAULT_; - sequenced_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_SEQUENCED, oldSequenced, SEQUENCED_DEFAULT_, oldSequenced_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetSequenced() - { - return sequenced_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isAbstract() - { - return abstract_; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setAbstract(boolean newAbstract) - { - boolean oldAbstract = abstract_; - abstract_ = newAbstract; - boolean oldAbstract_set_ = abstract_set_; - abstract_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_ABSTRACT, oldAbstract, abstract_, !oldAbstract_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetAbstract() - { - boolean oldAbstract = abstract_; - boolean oldAbstract_set_ = abstract_set_; - abstract_ = ABSTRACT_DEFAULT_; - abstract_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_ABSTRACT, oldAbstract, ABSTRACT_DEFAULT_, oldAbstract_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetAbstract() - { - return abstract_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAnyAttribute() - { - if (anyAttribute == null) - { - anyAttribute = createSequence(INTERNAL_ANY_ATTRIBUTE); - } - return anyAttribute; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case PROPERTY: - return removeFromList(getProperty(), otherEnd, changeContext); - case ANY: - return removeFromSequence(getAny(), otherEnd, changeContext); - case ANY_ATTRIBUTE: - return removeFromSequence(getAnyAttribute(), 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 BASE_TYPE: - return getBaseType(); - case PROPERTY: - return getProperty(); - case ALIAS_NAME: - return getAliasName(); - case ANY: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getAny(); - case NAME: - return getName(); - case URI: - return getUri(); - case DATA_TYPE: - return isDataType() ? Boolean.TRUE : Boolean.FALSE; - case OPEN: - return isOpen() ? Boolean.TRUE : Boolean.FALSE; - case SEQUENCED: - return isSequenced() ? Boolean.TRUE : Boolean.FALSE; - case ABSTRACT: - return isAbstract() ? Boolean.TRUE : Boolean.FALSE; - case ANY_ATTRIBUTE: - // 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 getAnyAttribute(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case BASE_TYPE: - getBaseType().clear(); - getBaseType().addAll((Collection)newValue); - return; - case PROPERTY: - getProperty().clear(); - getProperty().addAll((Collection)newValue); - return; - case ALIAS_NAME: - getAliasName().clear(); - getAliasName().addAll((Collection)newValue); - return; - case ANY: - setSequence(getAny(), newValue); - return; - case NAME: - setName((String)newValue); - return; - case URI: - setUri((String)newValue); - return; - case DATA_TYPE: - setDataType(((Boolean)newValue).booleanValue()); - return; - case OPEN: - setOpen(((Boolean)newValue).booleanValue()); - return; - case SEQUENCED: - setSequenced(((Boolean)newValue).booleanValue()); - return; - case ABSTRACT: - setAbstract(((Boolean)newValue).booleanValue()); - return; - case ANY_ATTRIBUTE: - setSequence(getAnyAttribute(), newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case BASE_TYPE: - getBaseType().clear(); - return; - case PROPERTY: - getProperty().clear(); - return; - case ALIAS_NAME: - getAliasName().clear(); - return; - case ANY: - unsetSequence(getAny()); - return; - case NAME: - unsetName(); - return; - case URI: - unsetUri(); - return; - case DATA_TYPE: - unsetDataType(); - return; - case OPEN: - unsetOpen(); - return; - case SEQUENCED: - unsetSequenced(); - return; - case ABSTRACT: - unsetAbstract(); - return; - case ANY_ATTRIBUTE: - unsetSequence(getAnyAttribute()); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case BASE_TYPE: - return baseType != null && !baseType.isEmpty(); - case PROPERTY: - return property != null && !property.isEmpty(); - case ALIAS_NAME: - return aliasName != null && !aliasName.isEmpty(); - case ANY: - return any != null && !isSequenceEmpty(getAny()); - case NAME: - return isSetName(); - case URI: - return isSetUri(); - case DATA_TYPE: - return isSetDataType(); - case OPEN: - return isSetOpen(); - case SEQUENCED: - return isSetSequenced(); - case ABSTRACT: - return isSetAbstract(); - case ANY_ATTRIBUTE: - return anyAttribute != null && !isSequenceEmpty(getAnyAttribute()); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (aliasName: "); - result.append(aliasName); - result.append(", any: "); - result.append(any); - result.append(", name: "); - if (name_set_) result.append(name); else result.append("<unset>"); - result.append(", uri: "); - if (uri_set_) result.append(uri); else result.append("<unset>"); - result.append(", dataType: "); - if (dataType_set_) result.append(dataType); else result.append("<unset>"); - result.append(", open: "); - if (open_set_) result.append(open); else result.append("<unset>"); - result.append(", sequenced: "); - if (sequenced_set_) result.append(sequenced); else result.append("<unset>"); - result.append(", abstract: "); - if (abstract_set_) result.append(abstract_); else result.append("<unset>"); - result.append(", anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - -EStructuralFeature javaClassFeature = null; - -public String getInstanceClassName() - { - if (javaClassFeature == null) - { - //FB TODO figure out what helper to use - javaClassFeature = (EStructuralFeature)TypeHelper.INSTANCE.getOpenContentProperty("commonj.sdo/java", "javaClass"); - } - - Sequence anyAttribute = getAnyAttribute(); - int count = anyAttribute.size(); - for (int i = 0; i < count; i++) - { - EStructuralFeature eFeature = (EStructuralFeature)anyAttribute.getProperty(i); - if (eFeature == javaClassFeature) - { - return (String)anyAttribute.getValue(i); - } - } - return null; - } - -} //TypeImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java deleted file mode 100644 index 80945b289a..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Type; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.Types; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Types</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.TypesImpl#getType_ <em>Type</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class TypesImpl extends DataObjectBase implements Types -{ - - public final static int TYPE = 0; - - public final static int SDO_PROPERTY_COUNT = 1; - - public final static int EXTENDED_PROPERTY_COUNT = 0; - - - /** - * The internal feature id for the '<em><b>Type</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_TYPE = 0; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 1; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_TYPE: return TYPE; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getType_() <em>Type</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getType_() - * @generated - * @ordered - */ - - protected List type = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TypesImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getTypes(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getType_() - { - if (type == null) - { - type = createPropertyList(ListKind.CONTAINMENT, org.apache.tuscany.sdo.model.Type.class, TYPE, 0); - } - return type; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case TYPE: - return removeFromList(getType_(), 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 TYPE: - return getType_(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case TYPE: - getType_().clear(); - getType_().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case TYPE: - getType_().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case TYPE: - return type != null && !type.isEmpty(); - } - return super.isSet(propertyIndex); - } - - public List getTypeList() - { - return getType_(); - } - -} //TypesImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java deleted file mode 100644 index 5d0777dd1c..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.impl; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.XSDType; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>XSD Type</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.impl.XSDTypeImpl#getAny <em>Any</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class XSDTypeImpl extends DataObjectBase implements XSDType -{ - - public final static int ANY = -1; - - public final static int SDO_PROPERTY_COUNT = 0; - - public final static int EXTENDED_PROPERTY_COUNT = -1; - - - /** - * The internal feature id for the '<em><b>Any</b></em>' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_ANY = 0; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 1; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_ANY: return ANY; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getAny() - * @generated - * @ordered - */ - - protected Sequence any = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public XSDTypeImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((ModelFactoryImpl)ModelFactory.INSTANCE).getXSDType(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = createSequence(INTERNAL_ANY); - } - return any; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case ANY: - return removeFromSequence(getAny(), 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 ANY: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getAny(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case ANY: - setSequence(getAny(), newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case ANY: - unsetSequence(getAny()); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case ANY: - return any != null && !isSequenceEmpty(getAny()); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (any: "); - result.append(any); - result.append(')'); - return result.toString(); - } - -} //XSDTypeImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.java deleted file mode 100644 index 4776cb958f..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.java +++ /dev/null @@ -1,52 +0,0 @@ -/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sdo.model.internal;
-
-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 InternalFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- InternalFactory INSTANCE = org.apache.tuscany.sdo.model.internal.impl.InternalFactoryImpl.init();
-
- /**
- * 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);
-
-} //InternalFactory
diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.java deleted file mode 100644 index 4517f4a2a9..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.java +++ /dev/null @@ -1,296 +0,0 @@ -/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sdo.model.internal.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.FactoryBase;
-
-import org.apache.tuscany.sdo.model.internal.*;
-import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the commonj.sdo.internal model factory.
- * This model is generated from sdoInternal.xsd, in the tuscany-sdo-impl project.
- * Until the SDO code generator supports regen/merge, follow the following steps to regenerate this model:
- * 1. Regenerate the model into a temporary directory:
- * XSD2JavaGenerator -generateBuiltIn http://www.apache.org/tuscany/commonj.sdo.internal -targetDirectory <temp-dir> -javaPackage org.apache.tuscany.sdo.model.internal <tuscany-sdo-impl-dir>/src/main/resources/xml/sdoInternal.xsd
- * 2. Delete all the createXXXFromString() and convertXXXToString() methods in the newly generated InternalFactoryImpl and
- * replace them with the ones from this file (resolve any missing imports).
- * 3. Comment out all simple depedencies (SDOUtil.registerStaticTypes calls) in the init() method.
- * 4. Make sure the top of each generated file contains the ASF License.
- * 5. Move this JavaDoc comment into the newly generated ModelFactoryImpl class.
- * <!-- end-user-doc -->
- * @generated
- */
-public class InternalFactoryImpl extends FactoryBase implements InternalFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.apache.org/tuscany/commonj.sdo.internal";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "internal";
-
- /**
- * 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 BASE64_BYTES = 1;
- public static final int QNAME = 2;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public InternalFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "org.apache.tuscany.sdo.model.internal");
- }
-
- /**
- * 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");
- }
-
- //Register dependent packages with provided scope
-
- // Initialize this package
- 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)
- {
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object createFromString(int typeNumber, String initialValue)
- {
- switch (typeNumber)
- {
- case BASE64_BYTES:
- return createBase64BytesFromString(initialValue);
- case QNAME:
- return createQNameFromString(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 BASE64_BYTES:
- return convertBase64BytesToString(instanceValue);
- case QNAME:
- return convertQNameToString(instanceValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type base64BytesType = null;
-
- public Type getBase64Bytes()
- {
- return base64BytesType;
- }
-
- protected Type qNameType = null;
-
- public Type getQName()
- {
- return qNameType;
- }
-
-
- private static InternalFactoryImpl instance = null;
- public static InternalFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new InternalFactoryImpl();
-
- // Initialize dependent packages
-
- // Create package meta-data objects
- instance.createMetaData();
-
- // Initialize created meta-data
- instance.initializeMetaData();
-
- // Mark meta-data to indicate it can't be changed
- //theInternalFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
-
- return instance;
- }
-
- private boolean isCreated = false;
-
- public void createMetaData()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create data types
- base64BytesType = createType(true, BASE64_BYTES );
- qNameType = createType(true, QNAME );
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
- Property property = null;
-
- // Add supertypes to types
-
- // Initialize types and properties
- // Initialize data types
- initializeType(base64BytesType, byte[].class, "Base64Bytes", true, false);
- setInstanceProperty (base64BytesType, "commonj.sdo/java", "instanceClass", "byte[]");
-
- initializeType(qNameType, String.class, "QName", true, false);
- setInstanceProperty (qNameType, "commonj.sdo/java", "instanceClass", "java.lang.String");
-
- createXSDMetaData();
- }
-
- protected void createXSDMetaData()
- {
- super.initXSD();
-
- Property property = null;
-
-
- addXSDMapping
- (base64BytesType,
- new String[]
- {
- "name", "Base64Bytes"
- });
-
- addXSDMapping
- (qNameType,
- new String[]
- {
- "name", "QName"
- });
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public byte[] createBase64BytesFromString(String initialValue)
- {
- return XMLTypeFactory.eINSTANCE.createBase64Binary(initialValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String convertBase64BytesToString(Object instanceValue)
- {
- if (instanceValue instanceof byte[]) {
- return XMLTypeFactory.eINSTANCE.convertBase64Binary((byte[])instanceValue);
- } else {
- return XMLTypeFactory.eINSTANCE.convertBase64Binary(instanceValue.toString().getBytes());
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String createQNameFromString(String initialValue)
- {
- return (String)super.createFromString(QNAME, initialValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertQNameToString(Object instanceValue)
- {
- return super.convertToString(QNAME, instanceValue);
- }
-
-} //InternalFactoryImpl
diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java deleted file mode 100644 index 50be023db5..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.java; - -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 JavaFactory -{ - - /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - JavaFactory INSTANCE = org.apache.tuscany.sdo.model.java.impl.JavaFactoryImpl.init(); - - /** - * Returns a new object of class '<em>Info</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Info</em>'. - * @generated - */ - JavaInfo createJavaInfo(); - - /** - * 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); - -} //JavaFactory diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java deleted file mode 100644 index b5eabb0f4a..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.java; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Info</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass <em>Java Class</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface JavaInfo extends Serializable -{ - /** - * Returns the value of the '<em><b>Java Class</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Java Class</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Java Class</em>' attribute. - * @see #isSetJavaClass() - * @see #unsetJavaClass() - * @see #setJavaClass(String) - * @generated - */ - String getJavaClass(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass <em>Java Class</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Java Class</em>' attribute. - * @see #isSetJavaClass() - * @see #unsetJavaClass() - * @see #getJavaClass() - * @generated - */ - void setJavaClass(String value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass <em>Java Class</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isSetJavaClass() - * @see #getJavaClass() - * @see #setJavaClass(String) - * @generated - */ - void unsetJavaClass(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass <em>Java Class</em>}' attribute is set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return whether the value of the '<em>Java Class</em>' attribute is set. - * @see #unsetJavaClass() - * @see #getJavaClass() - * @see #setJavaClass(String) - * @generated - */ - boolean isSetJavaClass(); - -} // JavaInfo diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java deleted file mode 100644 index 515311f7ff..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java +++ /dev/null @@ -1,659 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.java.impl; - -import commonj.sdo.helper.HelperContext; -import org.apache.tuscany.sdo.helper.TypeHelperImpl; - -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Type; - -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.java.*; -import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; -import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil; - -/** - * <!-- begin-user-doc --> - * An implementation of the commonj.sdo/java model factory. - * This model is generated from sdoJava.xsd, in the sdo-api project. - * Until the SDO code generator supports name conflicts and regen/merge, follow the following steps to regenerate this model: - * 1. Regenerate the model into a temporary directory: - * XSD2JavaGenerator -generateBuiltIn commonj.sdo/java -targetDirectory <temp-dir> -javaPackage org.apache.tuscany.sdo.model.java <sdo-api-dir>/src/main/resources/xml/sdoJava.xsd - * 2. Delete all the createXXXFromString() and convertXXXToString() methods in the newly generated JavaFactoryImpl and - * replace them with the ones from this file. - * 3. Make sure the top of each generated file contains the ASF License. - * 4. Move this JavaDoc comment into the newly generated JavaFactoryImpl class. - * <!-- end-user-doc --> - * @generated - */ - -public class JavaFactoryImpl extends FactoryBase implements JavaFactory -{ - - /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String NAMESPACE_URI = "commonj.sdo/java"; - - /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String NAMESPACE_PREFIX = "sdoJava"; - - /** - * 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 JAVA_INFO = 1; - public static final int BOOLEAN_OBJECT = 2; - public static final int BYTE_OBJECT = 3; - public static final int CHARACTER_OBJECT = 4; - public static final int DOUBLE_OBJECT = 5; - public static final int FLOAT_OBJECT = 6; - public static final int INT_OBJECT = 7; - public static final int LONG_OBJECT = 8; - public static final int SHORT_OBJECT = 9; - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaFactoryImpl() - { - super(NAMESPACE_URI, NAMESPACE_PREFIX, "org.apache.tuscany.sdo.model.java"); - } - - /** - * 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"); - } - - //Register dependent packages with provided scope - ModelFactory.INSTANCE.register(scope); - - // Initialize this package - 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 JAVA_INFO: return (DataObject)createJavaInfo(); - default: - return super.create(typeNumber); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object createFromString(int typeNumber, String initialValue) - { - switch (typeNumber) - { - case BOOLEAN_OBJECT: - return createBooleanObjectFromString(initialValue); - case BYTE_OBJECT: - return createByteObjectFromString(initialValue); - case CHARACTER_OBJECT: - return createCharacterObjectFromString(initialValue); - case DOUBLE_OBJECT: - return createDoubleObjectFromString(initialValue); - case FLOAT_OBJECT: - return createFloatObjectFromString(initialValue); - case INT_OBJECT: - return createIntObjectFromString(initialValue); - case LONG_OBJECT: - return createLongObjectFromString(initialValue); - case SHORT_OBJECT: - return createShortObjectFromString(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 BOOLEAN_OBJECT: - return convertBooleanObjectToString(instanceValue); - case BYTE_OBJECT: - return convertByteObjectToString(instanceValue); - case CHARACTER_OBJECT: - return convertCharacterObjectToString(instanceValue); - case DOUBLE_OBJECT: - return convertDoubleObjectToString(instanceValue); - case FLOAT_OBJECT: - return convertFloatObjectToString(instanceValue); - case INT_OBJECT: - return convertIntObjectToString(instanceValue); - case LONG_OBJECT: - return convertLongObjectToString(instanceValue); - case SHORT_OBJECT: - return convertShortObjectToString(instanceValue); - default: - throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype"); - } - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaInfo createJavaInfo() - { - JavaInfoImpl javaInfo = new JavaInfoImpl(); - return javaInfo; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type javaInfoType = null; - - public Type getJavaInfo() - { - return javaInfoType; - } - - protected Type booleanObjectType = null; - - public Type getBooleanObject() - { - return booleanObjectType; - } - - protected Type byteObjectType = null; - - public Type getByteObject() - { - return byteObjectType; - } - - protected Type characterObjectType = null; - - public Type getCharacterObject() - { - return characterObjectType; - } - - protected Type doubleObjectType = null; - - public Type getDoubleObject() - { - return doubleObjectType; - } - - protected Type floatObjectType = null; - - public Type getFloatObject() - { - return floatObjectType; - } - - protected Type intObjectType = null; - - public Type getIntObject() - { - return intObjectType; - } - - protected Type longObjectType = null; - - public Type getLongObject() - { - return longObjectType; - } - - protected Type shortObjectType = null; - - public Type getShortObject() - { - return shortObjectType; - } - - - private static JavaFactoryImpl instance = null; - public static JavaFactoryImpl init() - { - if (instance != null ) return instance; - instance = new JavaFactoryImpl(); - - // Initialize dependent packages - ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE; - - // Create package meta-data objects - instance.createMetaData(); - - // Initialize created meta-data - instance.initializeMetaData(); - - // Mark meta-data to indicate it can't be changed - //theJavaFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ???? - - return instance; - } - - private boolean isCreated = false; - - public void createMetaData() - { - if (isCreated) return; - isCreated = true; - - // Create types and their properties - javaInfoType = createType(false, JAVA_INFO); - createProperty(true, javaInfoType,JavaInfoImpl.INTERNAL_JAVA_CLASS); - - // Create data types - booleanObjectType = createType(true, BOOLEAN_OBJECT ); - byteObjectType = createType(true, BYTE_OBJECT ); - characterObjectType = createType(true, CHARACTER_OBJECT ); - doubleObjectType = createType(true, DOUBLE_OBJECT ); - floatObjectType = createType(true, FLOAT_OBJECT ); - intObjectType = createType(true, INT_OBJECT ); - longObjectType = createType(true, LONG_OBJECT ); - shortObjectType = createType(true, SHORT_OBJECT ); - } - - private boolean isInitialized = false; - - public void initializeMetaData() - { - if (isInitialized) return; - isInitialized = true; - - // Obtain other dependent packages - ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE; - Property property = null; - - // Add supertypes to types - - // Initialize types and properties - initializeType(javaInfoType, JavaInfo.class, "JavaInfo", false); - property = getLocalProperty(javaInfoType, 0); - initializeProperty(property, theModelPackageImpl.getString(), "javaClass", null, 0, 1, JavaInfo.class, false, true, false); - - // Initialize data types - initializeType(booleanObjectType, Boolean.class, "BooleanObject", true, false); - setInstanceProperty (booleanObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Boolean"); - - initializeType(byteObjectType, Byte.class, "ByteObject", true, false); - setInstanceProperty (byteObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Byte"); - - initializeType(characterObjectType, Character.class, "CharacterObject", true, false); - setInstanceProperty (characterObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Character"); - - initializeType(doubleObjectType, Double.class, "DoubleObject", true, false); - setInstanceProperty (doubleObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Double"); - - initializeType(floatObjectType, Float.class, "FloatObject", true, false); - setInstanceProperty (floatObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Float"); - - initializeType(intObjectType, Integer.class, "IntObject", true, false); - setInstanceProperty (intObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Integer"); - - initializeType(longObjectType, Long.class, "LongObject", true, false); - setInstanceProperty (longObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Long"); - - initializeType(shortObjectType, Short.class, "ShortObject", true, false); - setInstanceProperty (shortObjectType, "commonj.sdo/java", "instanceClass", "java.lang.Short"); - - createXSDMetaData(theModelPackageImpl); - } - - protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl) - { - super.initXSD(); - - Property property = null; - - - property = createGlobalProperty - ("extendedInstanceClass", - theModelPackageImpl.getString(), - new String[] - { - "kind", "attribute", - "name", "extendedInstanceClass", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - property = createGlobalProperty - ("instanceClass", - theModelPackageImpl.getString(), - new String[] - { - "kind", "attribute", - "name", "instanceClass", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - property = createGlobalProperty - ("javaClass", - theModelPackageImpl.getString(), - new String[] - { - "kind", "attribute", - "name", "javaClass", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - property = createGlobalProperty - ("nestedInterfaces", - theModelPackageImpl.getBoolean(), - new String[] - { - "kind", "attribute", - "name", "nestedInterfaces", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - property = createGlobalProperty - ("package", - theModelPackageImpl.getString(), - new String[] - { - "kind", "attribute", - "name", "package", - "namespace", "##targetNamespace" - }, - IS_ATTRIBUTE); - - addXSDMapping - (javaInfoType, - new String[] - { - "name", "JavaInfo", - "kind", "empty" - }); - - addXSDMapping - (getProperty(javaInfoType, JavaInfoImpl.INTERNAL_JAVA_CLASS), - new String[] - { - "kind", "attribute", - "name", "javaClass" - }); - - addXSDMapping - (booleanObjectType, - new String[] - { - "name", "BooleanObject" - }); - - addXSDMapping - (byteObjectType, - new String[] - { - "name", "ByteObject" - }); - - addXSDMapping - (characterObjectType, - new String[] - { - "name", "CharacterObject" - }); - - addXSDMapping - (doubleObjectType, - new String[] - { - "name", "DoubleObject" - }); - - addXSDMapping - (floatObjectType, - new String[] - { - "name", "FloatObject" - }); - - addXSDMapping - (intObjectType, - new String[] - { - "name", "IntObject" - }); - - addXSDMapping - (longObjectType, - new String[] - { - "name", "LongObject" - }); - - addXSDMapping - (shortObjectType, - new String[] - { - "name", "ShortObject" - }); - - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Boolean createBooleanObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createBooleanObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertBooleanObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertBooleanObject((Boolean)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Byte createByteObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createByteObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertByteObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertByteObject((Byte)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Character createCharacterObjectFromString(String initialValue) - { - return (initialValue == null && initialValue.length() > 0) - ? null : (new Character(XMLTypeUtil.normalize(initialValue, true).charAt(0))); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertCharacterObjectToString(Object instanceValue) - { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Double createDoubleObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createDoubleObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertDoubleObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertDoubleObject((Double)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Float createFloatObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createFloatObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertFloatObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertFloatObject((Float)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Integer createIntObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createIntObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertIntObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertIntObject((Integer)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Long createLongObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createLongObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertLongObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertLongObject((Long)instanceValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public Short createShortObjectFromString(String initialValue) - { - return XMLTypeFactory.eINSTANCE.createShortObject(initialValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated NOT - */ - public String convertShortObjectToString(Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertShortObject((Short)instanceValue); - } - -} //JavaFactoryImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java deleted file mode 100644 index de25db5d1e..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sdo.model.java.impl; - -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.model.java.JavaFactory; -import org.apache.tuscany.sdo.model.java.JavaInfo; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Info</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.model.java.impl.JavaInfoImpl#getJavaClass <em>Java Class</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class JavaInfoImpl extends DataObjectBase implements JavaInfo -{ - - public final static int JAVA_CLASS = 0; - - public final static int SDO_PROPERTY_COUNT = 1; - - public final static int EXTENDED_PROPERTY_COUNT = 0; - - - /** - * The internal feature id for the '<em><b>Java Class</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_JAVA_CLASS = 0; - - /** - * The number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int INTERNAL_PROPERTY_COUNT = 1; - - protected int internalConvertIndex(int internalIndex) - { - switch (internalIndex) - { - case INTERNAL_JAVA_CLASS: return JAVA_CLASS; - } - return super.internalConvertIndex(internalIndex); - } - - - /** - * The default value of the '{@link #getJavaClass() <em>Java Class</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJavaClass() - * @generated - * @ordered - */ - protected static final String JAVA_CLASS_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getJavaClass() <em>Java Class</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJavaClass() - * @generated - * @ordered - */ - protected String javaClass = JAVA_CLASS_DEFAULT_; - - /** - * This is true if the Java Class attribute has been set. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - protected boolean javaClass_set_ = false; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaInfoImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((JavaFactoryImpl)JavaFactory.INSTANCE).getJavaInfo(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getJavaClass() - { - return javaClass; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setJavaClass(String newJavaClass) - { - String oldJavaClass = javaClass; - javaClass = newJavaClass; - boolean oldJavaClass_set_ = javaClass_set_; - javaClass_set_ = true; - if (isNotifying()) - notify(ChangeKind.SET, INTERNAL_JAVA_CLASS, oldJavaClass, javaClass, !oldJavaClass_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unsetJavaClass() - { - String oldJavaClass = javaClass; - boolean oldJavaClass_set_ = javaClass_set_; - javaClass = JAVA_CLASS_DEFAULT_; - javaClass_set_ = false; - if (isNotifying()) - notify(ChangeKind.UNSET, INTERNAL_JAVA_CLASS, oldJavaClass, JAVA_CLASS_DEFAULT_, oldJavaClass_set_); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSetJavaClass() - { - return javaClass_set_; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case JAVA_CLASS: - return getJavaClass(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case JAVA_CLASS: - setJavaClass((String)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case JAVA_CLASS: - unsetJavaClass(); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case JAVA_CLASS: - return isSetJavaClass(); - } - return super.isSet(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String toString() - { - if (isProxy(this)) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (javaClass: "); - if (javaClass_set_) result.append(javaClass); else result.append("<unset>"); - result.append(')'); - return result.toString(); - } - -} //JavaInfoImpl diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLFactory.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLFactory.java deleted file mode 100644 index 84a60cf849..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sdo.model.xml;
-
-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 XMLFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- XMLFactory INSTANCE = org.apache.tuscany.sdo.model.xml.impl.XMLFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Info</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Info</em>'.
- * @generated
- */
- XMLInfo createXMLInfo();
-
- /**
- * 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);
-
-} //XMLFactory
diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLInfo.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLInfo.java deleted file mode 100644 index 85cad641c9..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLInfo.java +++ /dev/null @@ -1,92 +0,0 @@ -/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sdo.model.xml;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Info</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.apache.tuscany.sdo.model.xml.XMLInfo#isXmlElement <em>Xml Element</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface XMLInfo extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Xml Element</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Xml Element</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Xml Element</em>' attribute.
- * @see #isSetXmlElement()
- * @see #unsetXmlElement()
- * @see #setXmlElement(boolean)
- * @generated
- */
- boolean isXmlElement();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.xml.XMLInfo#isXmlElement <em>Xml Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Xml Element</em>' attribute.
- * @see #isSetXmlElement()
- * @see #unsetXmlElement()
- * @see #isXmlElement()
- * @generated
- */
- void setXmlElement(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.xml.XMLInfo#isXmlElement <em>Xml Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetXmlElement()
- * @see #isXmlElement()
- * @see #setXmlElement(boolean)
- * @generated
- */
- void unsetXmlElement();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.xml.XMLInfo#isXmlElement <em>Xml Element</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Xml Element</em>' attribute is set.
- * @see #unsetXmlElement()
- * @see #isXmlElement()
- * @see #setXmlElement(boolean)
- * @generated
- */
- boolean isSetXmlElement();
-
-} // XMLInfo
diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLFactoryImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLFactoryImpl.java deleted file mode 100644 index 293a7b0398..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLFactoryImpl.java +++ /dev/null @@ -1,341 +0,0 @@ -/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sdo.model.xml.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-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.model.internal.impl.InternalFactoryImpl;
-
-import org.apache.tuscany.sdo.model.xml.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the commonj.sdo/xml model factory.
- * This model is generated from sdoXML.xsd, in the sdo-api project.
- * Until the SDO code generator supports name conflicts and regen/merge, follow the following steps to regenerate this model:
- * 1. Regenerate the model into a temporary directory:
- * XSD2JavaGenerator -generateBuiltIn commonj.sdo/xml -prefix XML -targetDirectory <temp-dir> -javaPackage org.apache.tuscany.sdo.model.xml <sdo-api-dir>/src/main/resources/xml/sdoXML.xsd
- * 2. Make sure the top of each generated file contains the ASF License.
- * 3. Move this JavaDoc comment into the newly generated XMLFactoryImpl class.
- * <!-- end-user-doc -->
- * @generated
- */
-public class XMLFactoryImpl extends FactoryBase implements XMLFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "commonj.sdo/xml";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "sdoXML";
-
- /**
- * 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 XML_INFO = 1;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XMLFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "org.apache.tuscany.sdo.model.xml");
- }
-
- /**
- * 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");
- }
-
- //Register dependent packages with provided scope
- ModelFactory.INSTANCE.register(scope);
- InternalFactory.INSTANCE.register(scope);
-
- // Initialize this package
- 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 XML_INFO: return (DataObject)createXMLInfo();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XMLInfo createXMLInfo()
- {
- XMLInfoImpl xmlInfo = new XMLInfoImpl();
- return xmlInfo;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type xmlInfoType = null;
-
- public Type getXMLInfo()
- {
- return xmlInfoType;
- }
-
-
- private static XMLFactoryImpl instance = null;
- public static XMLFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new XMLFactoryImpl();
-
- // Initialize dependent packages
- ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
- InternalFactory InternalFactoryInstance = InternalFactory.INSTANCE;
-
- // Create package meta-data objects
- instance.createMetaData();
-
- // Initialize created meta-data
- instance.initializeMetaData();
-
- // Mark meta-data to indicate it can't be changed
- //theXMLFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
-
- return instance;
- }
-
- private boolean isCreated = false;
-
- public void createMetaData()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create types and their properties
- xmlInfoType = createType(false, XML_INFO);
- createProperty(true, xmlInfoType,XMLInfoImpl.INTERNAL_XML_ELEMENT);
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
- InternalFactoryImpl theInternalPackageImpl = (InternalFactoryImpl)InternalFactory.INSTANCE;
- Property property = null;
-
- // Add supertypes to types
-
- // Initialize types and properties
- initializeType(xmlInfoType, XMLInfo.class, "XMLInfo", false);
- property = getLocalProperty(xmlInfoType, 0);
- initializeProperty(property, theModelPackageImpl.getBoolean(), "xmlElement", null, 0, 1, XMLInfo.class, false, true, false);
-
- createXSDMetaData(theModelPackageImpl, theInternalPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl, InternalFactoryImpl theInternalPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- property = createGlobalProperty
- ("aliasName",
- theModelPackageImpl.getString(),
- new String[]
- {
- "kind", "attribute",
- "name", "aliasName",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("dataType",
- theInternalPackageImpl.getQName(),
- new String[]
- {
- "kind", "attribute",
- "name", "dataType",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("many",
- theModelPackageImpl.getBoolean(),
- new String[]
- {
- "kind", "attribute",
- "name", "many",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("name",
- theModelPackageImpl.getString(),
- new String[]
- {
- "kind", "attribute",
- "name", "name",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("oppositeProperty",
- theModelPackageImpl.getString(),
- new String[]
- {
- "kind", "attribute",
- "name", "oppositeProperty",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("propertyType",
- theInternalPackageImpl.getQName(),
- new String[]
- {
- "kind", "attribute",
- "name", "propertyType",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("readOnly",
- theModelPackageImpl.getBoolean(),
- new String[]
- {
- "kind", "attribute",
- "name", "readOnly",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("sequence",
- theModelPackageImpl.getBoolean(),
- new String[]
- {
- "kind", "attribute",
- "name", "sequence",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("string",
- theModelPackageImpl.getBoolean(),
- new String[]
- {
- "kind", "attribute",
- "name", "string",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- property = createGlobalProperty
- ("xmlElement",
- theModelPackageImpl.getBoolean(),
- new String[]
- {
- "kind", "attribute",
- "name", "xmlElement",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- addXSDMapping
- (xmlInfoType,
- new String[]
- {
- "name", "XMLInfo",
- "kind", "empty"
- });
-
- addXSDMapping
- (getProperty(xmlInfoType, XMLInfoImpl.INTERNAL_XML_ELEMENT),
- new String[]
- {
- "kind", "attribute",
- "name", "xmlElement"
- });
-
- }
-
-} //XMLFactoryImpl
diff --git a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLInfoImpl.java b/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLInfoImpl.java deleted file mode 100644 index a0906e32c1..0000000000 --- a/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLInfoImpl.java +++ /dev/null @@ -1,256 +0,0 @@ -/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tuscany.sdo.model.xml.impl;
-
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-import org.apache.tuscany.sdo.model.xml.XMLFactory;
-import org.apache.tuscany.sdo.model.xml.XMLInfo;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Info</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.apache.tuscany.sdo.model.xml.impl.XMLInfoImpl#isXmlElement <em>Xml Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class XMLInfoImpl extends DataObjectBase implements XMLInfo
-{
-
- public final static int XML_ELEMENT = 0;
-
- public final static int SDO_PROPERTY_COUNT = 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The internal feature id for the '<em><b>Xml Element</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_XML_ELEMENT = 0;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_XML_ELEMENT: return XML_ELEMENT;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #isXmlElement() <em>Xml Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isXmlElement()
- * @generated
- * @ordered
- */
- protected static final boolean XML_ELEMENT_DEFAULT_ = false;
-
- /**
- * The cached value of the '{@link #isXmlElement() <em>Xml Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isXmlElement()
- * @generated
- * @ordered
- */
- protected boolean xmlElement = XML_ELEMENT_DEFAULT_;
-
- /**
- * This is true if the Xml Element attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean xmlElement_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public XMLInfoImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((XMLFactoryImpl)XMLFactory.INSTANCE).getXMLInfo();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isXmlElement()
- {
- return xmlElement;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setXmlElement(boolean newXmlElement)
- {
- boolean oldXmlElement = xmlElement;
- xmlElement = newXmlElement;
- boolean oldXmlElement_set_ = xmlElement_set_;
- xmlElement_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_XML_ELEMENT, oldXmlElement, xmlElement, !oldXmlElement_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetXmlElement()
- {
- boolean oldXmlElement = xmlElement;
- boolean oldXmlElement_set_ = xmlElement_set_;
- xmlElement = XML_ELEMENT_DEFAULT_;
- xmlElement_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_XML_ELEMENT, oldXmlElement, XML_ELEMENT_DEFAULT_, oldXmlElement_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetXmlElement()
- {
- return xmlElement_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case XML_ELEMENT:
- return isXmlElement() ? Boolean.TRUE : Boolean.FALSE;
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case XML_ELEMENT:
- setXmlElement(((Boolean)newValue).booleanValue());
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case XML_ELEMENT:
- unsetXmlElement();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case XML_ELEMENT:
- return isSetXmlElement();
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString()
- {
- if (isProxy(this)) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (xmlElement: ");
- if (xmlElement_set_) result.append(xmlElement); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //XMLInfoImpl
|