diff options
Diffstat (limited to 'branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata')
10 files changed, 0 insertions, 1710 deletions
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java deleted file mode 100644 index f24b166f77..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java +++ /dev/null @@ -1,90 +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.util.metadata; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Java Meta Data</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface <em>Factory Interface</em>}</li> - * <li>{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface <em>Type Interface</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface JavaMetaData extends Serializable -{ - /** - * Returns the value of the '<em><b>Factory Interface</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Factory Interface</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Factory Interface</em>' attribute. - * @see #setFactoryInterface(String) - * @generated - */ - String getFactoryInterface(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface <em>Factory Interface</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Factory Interface</em>' attribute. - * @see #getFactoryInterface() - * @generated - */ - void setFactoryInterface(String value); - - /** - * Returns the value of the '<em><b>Type Interface</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Interface</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Type Interface</em>' attribute. - * @see #setTypeInterface(String) - * @generated - */ - String getTypeInterface(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface <em>Type Interface</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Type Interface</em>' attribute. - * @see #getTypeInterface() - * @generated - */ - void setTypeInterface(String value); - -} // JavaMetaData diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java deleted file mode 100644 index 1f540afa2c..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java +++ /dev/null @@ -1,77 +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.util.metadata; - - -/** - * <!-- 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 MetadataFactory -{ - - /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - MetadataFactory INSTANCE = org.apache.tuscany.sdo.util.metadata.impl.MetadataFactoryImpl.init(); - - /** - * Returns a new object of class '<em>Java Meta Data</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Java Meta Data</em>'. - * @generated - */ - JavaMetaData createJavaMetaData(); - - /** - * Returns a new object of class '<em>SDO Meta Data Group</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>SDO Meta Data Group</em>'. - * @generated - */ - SDOMetaDataGroup createSDOMetaDataGroup(); - - /** - * Returns a new object of class '<em>Type Meta Data</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Type Meta Data</em>'. - * @generated - */ - TypeMetaData createTypeMetaData(); - - /** - * Returns a new object of class '<em>XSD Meta Data</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>XSD Meta Data</em>'. - * @generated - */ - XSDMetaData createXSDMetaData(); - -} //MetadataFactory diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java deleted file mode 100644 index 5657f26ca5..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java +++ /dev/null @@ -1,87 +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.util.metadata; - -import java.io.Serializable; - -import java.util.List; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>SDO Meta Data Group</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getJavaMetaData <em>Java Meta Data</em>}</li> - * <li>{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getXsdMetaData <em>Xsd Meta Data</em>}</li> - * <li>{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getTypeMetaData <em>Type Meta Data</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface SDOMetaDataGroup extends Serializable -{ - /** - * Returns the value of the '<em><b>Java Meta Data</b></em>' containment reference list. - * The list contents are of type {@link org.apache.tuscany.sdo.util.metadata.JavaMetaData}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Java Meta Data</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>Java Meta Data</em>' containment reference list. - * @generated - */ - List getJavaMetaData(); - - /** - * Returns the value of the '<em><b>Xsd Meta Data</b></em>' containment reference list. - * The list contents are of type {@link org.apache.tuscany.sdo.util.metadata.XSDMetaData}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Xsd Meta Data</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>Xsd Meta Data</em>' containment reference list. - * @generated - */ - List getXsdMetaData(); - - /** - * Returns the value of the '<em><b>Type Meta Data</b></em>' containment reference list. - * The list contents are of type {@link org.apache.tuscany.sdo.util.metadata.TypeMetaData}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Type Meta Data</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 Meta Data</em>' containment reference list. - * @generated - */ - List getTypeMetaData(); - -} // SDOMetaDataGroup diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java deleted file mode 100644 index c3d67a8318..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java +++ /dev/null @@ -1,65 +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.util.metadata; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Type Meta Data</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation <em>Location</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface TypeMetaData extends Serializable -{ - /** - * Returns the value of the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Location</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Location</em>' attribute. - * @see #setLocation(String) - * @generated - */ - String getLocation(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Location</em>' attribute. - * @see #getLocation() - * @generated - */ - void setLocation(String value); - -} // TypeMetaData diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java deleted file mode 100644 index 09bffece71..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java +++ /dev/null @@ -1,66 +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.util.metadata; - -import java.io.Serializable; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>XSD Meta Data</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation <em>Location</em>}</li> - * </ul> - * </p> - * - * @extends Serializable - * @generated - */ -public interface XSDMetaData extends Serializable -{ - /** - * Returns the value of the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Location</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Location</em>' attribute. - * @see #setLocation(String) - * @generated - */ - String getLocation(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Location</em>' attribute. - * @see #getLocation() - * @generated - */ - void setLocation(String value); - -} // XSDMetaData diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java deleted file mode 100644 index 8a6dce6161..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java +++ /dev/null @@ -1,267 +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.util.metadata.impl; - -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.metadata.JavaMetaData; -import org.apache.tuscany.sdo.util.metadata.MetadataFactory; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Java Meta Data</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl#getFactoryInterface <em>Factory Interface</em>}</li> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl#getTypeInterface <em>Type Interface</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class JavaMetaDataImpl extends DataObjectBase implements JavaMetaData -{ - /** - * The feature id for the '<em><b>Factory Interface</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int FACTORY_INTERFACE = 0; - - /** - * The feature id for the '<em><b>Type Interface</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int TYPE_INTERFACE = 1; - - /** - * This represents the number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - - public final static int SDO_PROPERTY_COUNT = 2; - - /** - * The default value of the '{@link #getFactoryInterface() <em>Factory Interface</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getFactoryInterface() - * @generated - * @ordered - */ - protected static final String FACTORY_INTERFACE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getFactoryInterface() <em>Factory Interface</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getFactoryInterface() - * @generated - * @ordered - */ - protected String factoryInterface = FACTORY_INTERFACE_DEFAULT_; - - /** - * The default value of the '{@link #getTypeInterface() <em>Type Interface</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeInterface() - * @generated - * @ordered - */ - protected static final String TYPE_INTERFACE_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getTypeInterface() <em>Type Interface</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeInterface() - * @generated - * @ordered - */ - protected String typeInterface = TYPE_INTERFACE_DEFAULT_; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected JavaMetaDataImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((MetadataFactoryImpl)MetadataFactory.INSTANCE).getJavaMetaData(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getFactoryInterface() - { - return factoryInterface; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setFactoryInterface(String newFactoryInterface) - { - String oldFactoryInterface = factoryInterface; - factoryInterface = newFactoryInterface; - if (isNotifying()) - notify(ChangeKind.SET, FACTORY_INTERFACE, oldFactoryInterface, factoryInterface); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getTypeInterface() - { - return typeInterface; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setTypeInterface(String newTypeInterface) - { - String oldTypeInterface = typeInterface; - typeInterface = newTypeInterface; - if (isNotifying()) - notify(ChangeKind.SET, TYPE_INTERFACE, oldTypeInterface, typeInterface); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case FACTORY_INTERFACE: - return getFactoryInterface(); - case TYPE_INTERFACE: - return getTypeInterface(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case FACTORY_INTERFACE: - setFactoryInterface((String)newValue); - return; - case TYPE_INTERFACE: - setTypeInterface((String)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case FACTORY_INTERFACE: - setFactoryInterface(FACTORY_INTERFACE_DEFAULT_); - return; - case TYPE_INTERFACE: - setTypeInterface(TYPE_INTERFACE_DEFAULT_); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case FACTORY_INTERFACE: - return FACTORY_INTERFACE_DEFAULT_ == null ? factoryInterface != null : !FACTORY_INTERFACE_DEFAULT_.equals(factoryInterface); - case TYPE_INTERFACE: - return TYPE_INTERFACE_DEFAULT_ == null ? typeInterface != null : !TYPE_INTERFACE_DEFAULT_.equals(typeInterface); - } - 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(" (factoryInterface: "); - result.append(factoryInterface); - result.append(", typeInterface: "); - result.append(typeInterface); - result.append(')'); - return result.toString(); - } - -} //JavaMetaDataImpl diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java deleted file mode 100644 index a4ea322549..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java +++ /dev/null @@ -1,367 +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.util.metadata.impl; - -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.SDOFactory; - -import org.apache.tuscany.sdo.impl.FactoryBase; - -import org.apache.tuscany.sdo.model.ModelFactory; - -import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl; - -import org.apache.tuscany.sdo.util.SDOUtil; - -import org.apache.tuscany.sdo.util.metadata.*; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Factory</b>. - * <!-- end-user-doc --> - * @generated - */ -public class MetadataFactoryImpl extends FactoryBase implements MetadataFactory -{ - - /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String NAMESPACE_URI = "org.apache.tuscany.sdo/metadata"; - - /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static final String NAMESPACE_PREFIX = "metadata"; - public static final int JAVA_META_DATA = 1; - public static final int SDO_META_DATA_GROUP = 2; - public static final int TYPE_META_DATA = 3; - public static final int XSD_META_DATA = 4; - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public MetadataFactoryImpl() - { - super(NAMESPACE_URI, NAMESPACE_PREFIX); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DataObject create(int typeNumber) - { - switch (typeNumber) - { - case JAVA_META_DATA: return (DataObject)createJavaMetaData(); - case SDO_META_DATA_GROUP: return (DataObject)createSDOMetaDataGroup(); - case TYPE_META_DATA: return (DataObject)createTypeMetaData(); - case XSD_META_DATA: return (DataObject)createXSDMetaData(); - default: - return super.create(typeNumber); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public JavaMetaData createJavaMetaData() - { - JavaMetaDataImpl javaMetaData = new JavaMetaDataImpl(); - return javaMetaData; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public SDOMetaDataGroup createSDOMetaDataGroup() - { - SDOMetaDataGroupImpl sdoMetaDataGroup = new SDOMetaDataGroupImpl(); - return sdoMetaDataGroup; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TypeMetaData createTypeMetaData() - { - TypeMetaDataImpl typeMetaData = new TypeMetaDataImpl(); - return typeMetaData; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public XSDMetaData createXSDMetaData() - { - XSDMetaDataImpl xsdMetaData = new XSDMetaDataImpl(); - return xsdMetaData; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type javaMetaDataType = null; - - public Type getJavaMetaData() - { - return javaMetaDataType; - } - - protected Type sdoMetaDataGroupType = null; - - public Type getSDOMetaDataGroup() - { - return sdoMetaDataGroupType; - } - - protected Type typeMetaDataType = null; - - public Type getTypeMetaData() - { - return typeMetaDataType; - } - - protected Type xsdMetaDataType = null; - - public Type getXSDMetaData() - { - return xsdMetaDataType; - } - - - private static boolean isInited = false; - - public static MetadataFactoryImpl init() - { - if (isInited) return (MetadataFactoryImpl)FactoryBase.getStaticFactory(MetadataFactoryImpl.NAMESPACE_URI); - MetadataFactoryImpl theMetadataFactoryImpl = new MetadataFactoryImpl(); - isInited = true; - - // Initialize simple dependencies - SDOUtil.registerStaticTypes(SDOFactory.class); - SDOUtil.registerStaticTypes(ModelFactory.class); - - // Create package meta-data objects - theMetadataFactoryImpl.createMetaData(); - - // Initialize created meta-data - theMetadataFactoryImpl.initializeMetaData(); - - // Mark meta-data to indicate it can't be changed - //theMetadataFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ???? - - return theMetadataFactoryImpl; - } - - private boolean isCreated = false; - - public void createMetaData() - { - if (isCreated) return; - isCreated = true; - - - javaMetaDataType = createType(false, JAVA_META_DATA); - createProperty(true, javaMetaDataType, JavaMetaDataImpl.FACTORY_INTERFACE); - createProperty(true, javaMetaDataType, JavaMetaDataImpl.TYPE_INTERFACE); - - sdoMetaDataGroupType = createType(false, SDO_META_DATA_GROUP); - createProperty(false, sdoMetaDataGroupType, SDOMetaDataGroupImpl.JAVA_META_DATA); - createProperty(false, sdoMetaDataGroupType, SDOMetaDataGroupImpl.XSD_META_DATA); - createProperty(false, sdoMetaDataGroupType, SDOMetaDataGroupImpl.TYPE_META_DATA); - - typeMetaDataType = createType(false, TYPE_META_DATA); - createProperty(true, typeMetaDataType, TypeMetaDataImpl.LOCATION); - - xsdMetaDataType = createType(false, XSD_META_DATA); - createProperty(true, xsdMetaDataType, XSDMetaDataImpl.LOCATION); - } - - private boolean isInitialized = false; - - public void initializeMetaData() - { - if (isInitialized) return; - isInitialized = true; - - // Obtain other dependent packages - ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI); - Property property = null; - - // Add supertypes to classes - - // Initialize classes and features; add operations and parameters - initializeType(javaMetaDataType, JavaMetaData.class, "JavaMetaData"); - - property = (Property)javaMetaDataType.getProperties().get(JavaMetaDataImpl.FACTORY_INTERFACE); - initializeProperty(property, theModelPackageImpl.getString(), "factoryInterface", null, 0, 1, JavaMetaData.class, false, false, false); - - property = (Property)javaMetaDataType.getProperties().get(JavaMetaDataImpl.TYPE_INTERFACE); - initializeProperty(property, theModelPackageImpl.getString(), "typeInterface", null, 0, 1, JavaMetaData.class, false, false, false); - - initializeType(sdoMetaDataGroupType, SDOMetaDataGroup.class, "SDOMetaDataGroup"); - - property = (Property)sdoMetaDataGroupType.getProperties().get(SDOMetaDataGroupImpl.JAVA_META_DATA); - initializeProperty(property, this.getJavaMetaData(), "javaMetaData", null, 0, -1, SDOMetaDataGroup.class, false, false, false, true , null); - - property = (Property)sdoMetaDataGroupType.getProperties().get(SDOMetaDataGroupImpl.XSD_META_DATA); - initializeProperty(property, this.getXSDMetaData(), "xsdMetaData", null, 0, -1, SDOMetaDataGroup.class, false, false, false, true , null); - - property = (Property)sdoMetaDataGroupType.getProperties().get(SDOMetaDataGroupImpl.TYPE_META_DATA); - initializeProperty(property, this.getTypeMetaData(), "typeMetaData", null, 0, -1, SDOMetaDataGroup.class, false, false, false, true , null); - - initializeType(typeMetaDataType, TypeMetaData.class, "TypeMetaData"); - - property = (Property)typeMetaDataType.getProperties().get(TypeMetaDataImpl.LOCATION); - initializeProperty(property, theModelPackageImpl.getString(), "location", null, 1, 1, TypeMetaData.class, false, false, false); - - initializeType(xsdMetaDataType, XSDMetaData.class, "XSDMetaData"); - - property = (Property)xsdMetaDataType.getProperties().get(XSDMetaDataImpl.LOCATION); - initializeProperty(property, theModelPackageImpl.getString(), "location", null, 1, 1, XSDMetaData.class, false, false, false); - - createXSDMetaData(theModelPackageImpl); - } - - protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl) - { - super.initXSD(); - - Property property = null; - - property = createGlobalProperty - ("sdoMetaDataGroup", - this.getSDOMetaDataGroup(), - new String[] - { - "kind", "element", - "name", "sdoMetaDataGroup", - "namespace", "##targetNamespace" - }); - - addXSDMapping - (javaMetaDataType, - new String[] - { - "name", "JavaMetaData", - "kind", "empty" - }); - - addXSDMapping - ((Property)javaMetaDataType.getProperties().get(JavaMetaDataImpl.FACTORY_INTERFACE), - new String[] - { - "kind", "attribute", - "name", "factoryInterface" - }); - - addXSDMapping - ((Property)javaMetaDataType.getProperties().get(JavaMetaDataImpl.TYPE_INTERFACE), - new String[] - { - "kind", "attribute", - "name", "typeInterface" - }); - - addXSDMapping - (sdoMetaDataGroupType, - new String[] - { - "name", "SDOMetaDataGroup", - "kind", "elementOnly" - }); - - addXSDMapping - ((Property)sdoMetaDataGroupType.getProperties().get(SDOMetaDataGroupImpl.JAVA_META_DATA), - new String[] - { - "kind", "element", - "name", "javaMetaData" - }); - - addXSDMapping - ((Property)sdoMetaDataGroupType.getProperties().get(SDOMetaDataGroupImpl.XSD_META_DATA), - new String[] - { - "kind", "element", - "name", "xsdMetaData" - }); - - addXSDMapping - ((Property)sdoMetaDataGroupType.getProperties().get(SDOMetaDataGroupImpl.TYPE_META_DATA), - new String[] - { - "kind", "element", - "name", "typeMetaData" - }); - - addXSDMapping - (typeMetaDataType, - new String[] - { - "name", "TypeMetaData", - "kind", "empty" - }); - - addXSDMapping - ((Property)typeMetaDataType.getProperties().get(TypeMetaDataImpl.LOCATION), - new String[] - { - "kind", "attribute", - "name", "location" - }); - - addXSDMapping - (xsdMetaDataType, - new String[] - { - "name", "XSDMetaData", - "kind", "empty" - }); - - addXSDMapping - ((Property)xsdMetaDataType.getProperties().get(XSDMetaDataImpl.LOCATION), - new String[] - { - "kind", "attribute", - "name", "location" - }); - - } - -} //MetadataFactoryImpl diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java deleted file mode 100644 index 43746399fc..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java +++ /dev/null @@ -1,285 +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.util.metadata.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.util.metadata.JavaMetaData; -import org.apache.tuscany.sdo.util.metadata.MetadataFactory; -import org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup; -import org.apache.tuscany.sdo.util.metadata.TypeMetaData; -import org.apache.tuscany.sdo.util.metadata.XSDMetaData; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>SDO Meta Data Group</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl#getJavaMetaData <em>Java Meta Data</em>}</li> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl#getXsdMetaData <em>Xsd Meta Data</em>}</li> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl#getTypeMetaData <em>Type Meta Data</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class SDOMetaDataGroupImpl extends DataObjectBase implements SDOMetaDataGroup -{ - /** - * The feature id for the '<em><b>Java Meta Data</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int JAVA_META_DATA = 0; - - /** - * The feature id for the '<em><b>Xsd Meta Data</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int XSD_META_DATA = 1; - - /** - * The feature id for the '<em><b>Type Meta Data</b></em>' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int TYPE_META_DATA = 2; - - /** - * This represents the number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - - public final static int SDO_PROPERTY_COUNT = 3; - - /** - * The cached value of the '{@link #getJavaMetaData() <em>Java Meta Data</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getJavaMetaData() - * @generated - * @ordered - */ - - protected List javaMetaData = null; - - /** - * The cached value of the '{@link #getXsdMetaData() <em>Xsd Meta Data</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getXsdMetaData() - * @generated - * @ordered - */ - - protected List xsdMetaData = null; - - /** - * The cached value of the '{@link #getTypeMetaData() <em>Type Meta Data</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTypeMetaData() - * @generated - * @ordered - */ - - protected List typeMetaData = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected SDOMetaDataGroupImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((MetadataFactoryImpl)MetadataFactory.INSTANCE).getSDOMetaDataGroup(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getJavaMetaData() - { - if (javaMetaData == null) - { - javaMetaData = createPropertyList(ListKind.CONTAINMENT, JavaMetaData.class, JAVA_META_DATA); - } - return javaMetaData; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getXsdMetaData() - { - if (xsdMetaData == null) - { - xsdMetaData = createPropertyList(ListKind.CONTAINMENT, XSDMetaData.class, XSD_META_DATA); - } - return xsdMetaData; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public List getTypeMetaData() - { - if (typeMetaData == null) - { - typeMetaData = createPropertyList(ListKind.CONTAINMENT, TypeMetaData.class, TYPE_META_DATA); - } - return typeMetaData; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case JAVA_META_DATA: - return removeFromList(getJavaMetaData(), otherEnd, changeContext); - case XSD_META_DATA: - return removeFromList(getXsdMetaData(), otherEnd, changeContext); - case TYPE_META_DATA: - return removeFromList(getTypeMetaData(), 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 JAVA_META_DATA: - return getJavaMetaData(); - case XSD_META_DATA: - return getXsdMetaData(); - case TYPE_META_DATA: - return getTypeMetaData(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case JAVA_META_DATA: - getJavaMetaData().clear(); - getJavaMetaData().addAll((Collection)newValue); - return; - case XSD_META_DATA: - getXsdMetaData().clear(); - getXsdMetaData().addAll((Collection)newValue); - return; - case TYPE_META_DATA: - getTypeMetaData().clear(); - getTypeMetaData().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case JAVA_META_DATA: - getJavaMetaData().clear(); - return; - case XSD_META_DATA: - getXsdMetaData().clear(); - return; - case TYPE_META_DATA: - getTypeMetaData().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case JAVA_META_DATA: - return javaMetaData != null && !javaMetaData.isEmpty(); - case XSD_META_DATA: - return xsdMetaData != null && !xsdMetaData.isEmpty(); - case TYPE_META_DATA: - return typeMetaData != null && !typeMetaData.isEmpty(); - } - return super.isSet(propertyIndex); - } - -} //SDOMetaDataGroupImpl diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java deleted file mode 100644 index 66d7f8625f..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java +++ /dev/null @@ -1,203 +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.util.metadata.impl; - -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.metadata.MetadataFactory; -import org.apache.tuscany.sdo.util.metadata.TypeMetaData; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Type Meta Data</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.TypeMetaDataImpl#getLocation <em>Location</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class TypeMetaDataImpl extends DataObjectBase implements TypeMetaData -{ - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int LOCATION = 0; - - /** - * This represents the number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - - public final static int SDO_PROPERTY_COUNT = 1; - - /** - * The default value of the '{@link #getLocation() <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLocation() - * @generated - * @ordered - */ - protected static final String LOCATION_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getLocation() <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLocation() - * @generated - * @ordered - */ - protected String location = LOCATION_DEFAULT_; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected TypeMetaDataImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((MetadataFactoryImpl)MetadataFactory.INSTANCE).getTypeMetaData(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getLocation() - { - return location; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setLocation(String newLocation) - { - String oldLocation = location; - location = newLocation; - if (isNotifying()) - notify(ChangeKind.SET, LOCATION, oldLocation, location); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case LOCATION: - return getLocation(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case LOCATION: - setLocation((String)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case LOCATION: - setLocation(LOCATION_DEFAULT_); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case LOCATION: - return LOCATION_DEFAULT_ == null ? location != null : !LOCATION_DEFAULT_.equals(location); - } - 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(" (location: "); - result.append(location); - result.append(')'); - return result.toString(); - } - -} //TypeMetaDataImpl diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java deleted file mode 100644 index 7a04d6b99c..0000000000 --- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java +++ /dev/null @@ -1,203 +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.util.metadata.impl; - -import commonj.sdo.Type; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.metadata.MetadataFactory; -import org.apache.tuscany.sdo.util.metadata.XSDMetaData; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>XSD Meta Data</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.apache.tuscany.sdo.util.metadata.impl.XSDMetaDataImpl#getLocation <em>Location</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class XSDMetaDataImpl extends DataObjectBase implements XSDMetaData -{ - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - public final static int LOCATION = 0; - - /** - * This represents the number of properties for this type. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - - public final static int SDO_PROPERTY_COUNT = 1; - - /** - * The default value of the '{@link #getLocation() <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLocation() - * @generated - * @ordered - */ - protected static final String LOCATION_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getLocation() <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLocation() - * @generated - * @ordered - */ - protected String location = LOCATION_DEFAULT_; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected XSDMetaDataImpl() - { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Type getStaticType() - { - return ((MetadataFactoryImpl)MetadataFactory.INSTANCE).getXSDMetaData(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getLocation() - { - return location; - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setLocation(String newLocation) - { - String oldLocation = location; - location = newLocation; - if (isNotifying()) - notify(ChangeKind.SET, LOCATION, oldLocation, location); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case LOCATION: - return getLocation(); - } - return super.get(propertyIndex, resolve); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case LOCATION: - setLocation((String)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case LOCATION: - setLocation(LOCATION_DEFAULT_); - return; - } - super.unset(propertyIndex); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case LOCATION: - return LOCATION_DEFAULT_ == null ? location != null : !LOCATION_DEFAULT_.equals(location); - } - 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(" (location: "); - result.append(location); - result.append(')'); - return result.toString(); - } - -} //XSDMetaDataImpl |