You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by oe...@apache.org on 2007/02/22 00:05:34 UTC
svn commit: r510296 [12/14] - in
/directory/sandbox/oersoy/documentation.checklist.parent: ./
documentation.checklist.archetype/ documentation.checklist.archetype/src/
documentation.checklist.archetype/src/main/
documentation.checklist.archetype/src/ma...
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,309 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import org.apache.maven.model.emf.documentation.recipe.DocumentRoot;
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+import org.apache.maven.model.emf.documentation.recipe.Recipes;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
+
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Document Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.DocumentRootImpl#getRecipes <em>Recipes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DocumentRootImpl extends EObjectImpl implements DocumentRoot
+{
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+ protected FeatureMap mixed = null;
+
+ /**
+ * The cached value of the '{@link #getXMLNSPrefixMap() <em>XMLNS Prefix Map</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXMLNSPrefixMap()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> xMLNSPrefixMap = null;
+
+ /**
+ * The cached value of the '{@link #getXSISchemaLocation() <em>XSI Schema Location</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXSISchemaLocation()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> xSISchemaLocation = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return RecipePackage.Literals.DOCUMENT_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getMixed()
+ {
+ if (mixed == null)
+ {
+ mixed = new BasicFeatureMap(this, RecipePackage.DOCUMENT_ROOT__MIXED);
+ }
+ return mixed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getXMLNSPrefixMap()
+ {
+ if (xMLNSPrefixMap == null)
+ {
+ xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, RecipePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ }
+ return xMLNSPrefixMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getXSISchemaLocation()
+ {
+ if (xSISchemaLocation == null)
+ {
+ xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, RecipePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ }
+ return xSISchemaLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Recipes getRecipes()
+ {
+ return (Recipes)getMixed().get(RecipePackage.Literals.DOCUMENT_ROOT__RECIPES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRecipes(Recipes newRecipes, NotificationChain msgs)
+ {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(RecipePackage.Literals.DOCUMENT_ROOT__RECIPES, newRecipes, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRecipes(Recipes newRecipes)
+ {
+ ((FeatureMap.Internal)getMixed()).set(RecipePackage.Literals.DOCUMENT_ROOT__RECIPES, newRecipes);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.DOCUMENT_ROOT__MIXED:
+ return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
+ case RecipePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
+ case RecipePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
+ case RecipePackage.DOCUMENT_ROOT__RECIPES:
+ return basicSetRecipes(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.DOCUMENT_ROOT__MIXED:
+ if (coreType) return getMixed();
+ return ((FeatureMap.Internal)getMixed()).getWrapper();
+ case RecipePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ if (coreType) return getXMLNSPrefixMap();
+ else return getXMLNSPrefixMap().map();
+ case RecipePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ if (coreType) return getXSISchemaLocation();
+ else return getXSISchemaLocation().map();
+ case RecipePackage.DOCUMENT_ROOT__RECIPES:
+ return getRecipes();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.DOCUMENT_ROOT__MIXED:
+ ((FeatureMap.Internal)getMixed()).set(newValue);
+ return;
+ case RecipePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
+ return;
+ case RecipePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
+ return;
+ case RecipePackage.DOCUMENT_ROOT__RECIPES:
+ setRecipes((Recipes)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.DOCUMENT_ROOT__MIXED:
+ getMixed().clear();
+ return;
+ case RecipePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ getXMLNSPrefixMap().clear();
+ return;
+ case RecipePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ getXSISchemaLocation().clear();
+ return;
+ case RecipePackage.DOCUMENT_ROOT__RECIPES:
+ setRecipes((Recipes)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.DOCUMENT_ROOT__MIXED:
+ return mixed != null && !mixed.isEmpty();
+ case RecipePackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+ case RecipePackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+ case RecipePackage.DOCUMENT_ROOT__RECIPES:
+ return getRecipes() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DocumentRootImpl
\ No newline at end of file
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,217 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import java.util.Map;
+
+import org.apache.maven.model.emf.documentation.recipe.*;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RecipeFactoryImpl extends EFactoryImpl implements RecipeFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static RecipeFactory init()
+ {
+ try
+ {
+ RecipeFactory theRecipeFactory = (RecipeFactory)EPackage.Registry.INSTANCE.getEFactory("http://maven.apache.org/documentation/recipes/1.0.0");
+ if (theRecipeFactory != null)
+ {
+ return theRecipeFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new RecipeFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case RecipePackage.RECIPES: return createRecipes();
+ case RecipePackage.DOCUMENT_ROOT: return createDocumentRoot();
+ case RecipePackage.RECIPE: return createRecipe();
+ case RecipePackage.RECIPE_MAP_ENTRY: return (EObject)createRecipeMapEntry();
+ case RecipePackage.RECIPE_GROUP: return createRecipeGroup();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case RecipePackage.EMAP:
+ return createEMapFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case RecipePackage.EMAP:
+ return convertEMapToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Recipes createRecipes()
+ {
+ RecipesImpl recipes = new RecipesImpl();
+ return recipes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DocumentRoot createDocumentRoot()
+ {
+ DocumentRootImpl documentRoot = new DocumentRootImpl();
+ return documentRoot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Recipe createRecipe()
+ {
+ RecipeImpl recipe = new RecipeImpl();
+ return recipe;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Map.Entry<String, Recipe> createRecipeMapEntry()
+ {
+ RecipeMapEntryImpl recipeMapEntry = new RecipeMapEntryImpl();
+ return recipeMapEntry;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeGroup createRecipeGroup()
+ {
+ RecipeGroupImpl recipeGroup = new RecipeGroupImpl();
+ return recipeGroup;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap createEMapFromString(EDataType eDataType, String initialValue)
+ {
+ return (EMap)super.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertEMapToString(EDataType eDataType, Object instanceValue)
+ {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipePackage getRecipePackage()
+ {
+ return (RecipePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static RecipePackage getPackage()
+ {
+ return RecipePackage.eINSTANCE;
+ }
+
+} //RecipeFactoryImpl
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,301 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import java.util.Collection;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+import org.apache.maven.model.emf.documentation.recipe.RecipeGroup;
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Group</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeGroupImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeGroupImpl#getLabel <em>Label</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeGroupImpl#getRecipes <em>Recipes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RecipeGroupImpl extends EObjectImpl implements RecipeGroup
+{
+ /**
+ * The default value of the '{@link #getId() <em>Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected static final String ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected String id = ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected static final String LABEL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected String label = LABEL_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getRecipes() <em>Recipes</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRecipes()
+ * @generated
+ * @ordered
+ */
+ protected EList<Recipe> recipes = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RecipeGroupImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return RecipePackage.Literals.RECIPE_GROUP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setId(String newId)
+ {
+ String oldId = id;
+ id = newId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE_GROUP__ID, oldId, id));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLabel()
+ {
+ return label;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLabel(String newLabel)
+ {
+ String oldLabel = label;
+ label = newLabel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE_GROUP__LABEL, oldLabel, label));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Recipe> getRecipes()
+ {
+ if (recipes == null)
+ {
+ recipes = new EObjectContainmentEList<Recipe>(Recipe.class, this, RecipePackage.RECIPE_GROUP__RECIPES);
+ }
+ return recipes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_GROUP__RECIPES:
+ return ((InternalEList<?>)getRecipes()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_GROUP__ID:
+ return getId();
+ case RecipePackage.RECIPE_GROUP__LABEL:
+ return getLabel();
+ case RecipePackage.RECIPE_GROUP__RECIPES:
+ return getRecipes();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_GROUP__ID:
+ setId((String)newValue);
+ return;
+ case RecipePackage.RECIPE_GROUP__LABEL:
+ setLabel((String)newValue);
+ return;
+ case RecipePackage.RECIPE_GROUP__RECIPES:
+ getRecipes().clear();
+ getRecipes().addAll((Collection<? extends Recipe>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_GROUP__ID:
+ setId(ID_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE_GROUP__LABEL:
+ setLabel(LABEL_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE_GROUP__RECIPES:
+ getRecipes().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_GROUP__ID:
+ return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ case RecipePackage.RECIPE_GROUP__LABEL:
+ return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
+ case RecipePackage.RECIPE_GROUP__RECIPES:
+ return recipes != null && !recipes.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (id: ");
+ result.append(id);
+ result.append(", label: ");
+ result.append(label);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RecipeGroupImpl
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,404 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import java.util.Collection;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Recipe</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeImpl#getChallenge <em>Challenge</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeImpl#getSolution <em>Solution</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeImpl#getDiscussion <em>Discussion</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeImpl#getRelatedRecipeIDs <em>Related Recipe IDs</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RecipeImpl extends EObjectImpl implements Recipe
+{
+ /**
+ * The default value of the '{@link #getId() <em>Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected static final String ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected String id = ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getChallenge() <em>Challenge</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChallenge()
+ * @generated
+ * @ordered
+ */
+ protected static final String CHALLENGE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getChallenge() <em>Challenge</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChallenge()
+ * @generated
+ * @ordered
+ */
+ protected String challenge = CHALLENGE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSolution() <em>Solution</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSolution()
+ * @generated
+ * @ordered
+ */
+ protected static final String SOLUTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSolution() <em>Solution</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSolution()
+ * @generated
+ * @ordered
+ */
+ protected String solution = SOLUTION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDiscussion() <em>Discussion</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDiscussion()
+ * @generated
+ * @ordered
+ */
+ protected static final String DISCUSSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDiscussion() <em>Discussion</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDiscussion()
+ * @generated
+ * @ordered
+ */
+ protected String discussion = DISCUSSION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getRelatedRecipeIDs() <em>Related Recipe IDs</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRelatedRecipeIDs()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> relatedRecipeIDs = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RecipeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return RecipePackage.Literals.RECIPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setId(String newId)
+ {
+ String oldId = id;
+ id = newId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE__ID, oldId, id));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getChallenge()
+ {
+ return challenge;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setChallenge(String newChallenge)
+ {
+ String oldChallenge = challenge;
+ challenge = newChallenge;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE__CHALLENGE, oldChallenge, challenge));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSolution()
+ {
+ return solution;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSolution(String newSolution)
+ {
+ String oldSolution = solution;
+ solution = newSolution;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE__SOLUTION, oldSolution, solution));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDiscussion()
+ {
+ return discussion;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDiscussion(String newDiscussion)
+ {
+ String oldDiscussion = discussion;
+ discussion = newDiscussion;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE__DISCUSSION, oldDiscussion, discussion));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getRelatedRecipeIDs()
+ {
+ if (relatedRecipeIDs == null)
+ {
+ relatedRecipeIDs = new EDataTypeUniqueEList<String>(String.class, this, RecipePackage.RECIPE__RELATED_RECIPE_IDS);
+ }
+ return relatedRecipeIDs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getFileName()
+ {
+ return "recipe" + this.getId() + ".html";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE__ID:
+ return getId();
+ case RecipePackage.RECIPE__CHALLENGE:
+ return getChallenge();
+ case RecipePackage.RECIPE__SOLUTION:
+ return getSolution();
+ case RecipePackage.RECIPE__DISCUSSION:
+ return getDiscussion();
+ case RecipePackage.RECIPE__RELATED_RECIPE_IDS:
+ return getRelatedRecipeIDs();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE__ID:
+ setId((String)newValue);
+ return;
+ case RecipePackage.RECIPE__CHALLENGE:
+ setChallenge((String)newValue);
+ return;
+ case RecipePackage.RECIPE__SOLUTION:
+ setSolution((String)newValue);
+ return;
+ case RecipePackage.RECIPE__DISCUSSION:
+ setDiscussion((String)newValue);
+ return;
+ case RecipePackage.RECIPE__RELATED_RECIPE_IDS:
+ getRelatedRecipeIDs().clear();
+ getRelatedRecipeIDs().addAll((Collection<? extends String>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE__ID:
+ setId(ID_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE__CHALLENGE:
+ setChallenge(CHALLENGE_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE__SOLUTION:
+ setSolution(SOLUTION_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE__DISCUSSION:
+ setDiscussion(DISCUSSION_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE__RELATED_RECIPE_IDS:
+ getRelatedRecipeIDs().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE__ID:
+ return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ case RecipePackage.RECIPE__CHALLENGE:
+ return CHALLENGE_EDEFAULT == null ? challenge != null : !CHALLENGE_EDEFAULT.equals(challenge);
+ case RecipePackage.RECIPE__SOLUTION:
+ return SOLUTION_EDEFAULT == null ? solution != null : !SOLUTION_EDEFAULT.equals(solution);
+ case RecipePackage.RECIPE__DISCUSSION:
+ return DISCUSSION_EDEFAULT == null ? discussion != null : !DISCUSSION_EDEFAULT.equals(discussion);
+ case RecipePackage.RECIPE__RELATED_RECIPE_IDS:
+ return relatedRecipeIDs != null && !relatedRecipeIDs.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (id: ");
+ result.append(id);
+ result.append(", challenge: ");
+ result.append(challenge);
+ result.append(", solution: ");
+ result.append(solution);
+ result.append(", discussion: ");
+ result.append(discussion);
+ result.append(", relatedRecipeIDs: ");
+ result.append(relatedRecipeIDs);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RecipeImpl
\ No newline at end of file
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,315 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Map Entry</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeMapEntryImpl#getTypedKey <em>Key</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipeMapEntryImpl#getTypedValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RecipeMapEntryImpl extends EObjectImpl implements BasicEMap.Entry<String,Recipe>
+{
+ /**
+ * The default value of the '{@link #getTypedKey() <em>Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected static final String KEY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypedKey() <em>Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected String key = KEY_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTypedValue() <em>Value</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected Recipe value = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RecipeMapEntryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return RecipePackage.Literals.RECIPE_MAP_ENTRY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTypedKey()
+ {
+ return key;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedKey(String newKey)
+ {
+ String oldKey = key;
+ key = newKey;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE_MAP_ENTRY__KEY, oldKey, key));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Recipe getTypedValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedValue(Recipe newValue)
+ {
+ Recipe oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPE_MAP_ENTRY__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_MAP_ENTRY__KEY:
+ return getTypedKey();
+ case RecipePackage.RECIPE_MAP_ENTRY__VALUE:
+ return getTypedValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_MAP_ENTRY__KEY:
+ setTypedKey((String)newValue);
+ return;
+ case RecipePackage.RECIPE_MAP_ENTRY__VALUE:
+ setTypedValue((Recipe)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_MAP_ENTRY__KEY:
+ setTypedKey(KEY_EDEFAULT);
+ return;
+ case RecipePackage.RECIPE_MAP_ENTRY__VALUE:
+ setTypedValue((Recipe)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPE_MAP_ENTRY__KEY:
+ return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
+ case RecipePackage.RECIPE_MAP_ENTRY__VALUE:
+ return value != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (key: ");
+ result.append(key);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getHash()
+ {
+ if (hash == -1)
+ {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHash(int hash)
+ {
+ this.hash = hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getKey()
+ {
+ return getTypedKey();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setKey(String key)
+ {
+ setTypedKey(key);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Recipe getValue()
+ {
+ return getTypedValue();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Recipe setValue(Recipe value)
+ {
+ Recipe oldValue = getValue();
+ setTypedValue(value);
+ return oldValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap<String, Recipe> getEMap()
+ {
+ EObject container = eContainer();
+ return container == null ? null : (EMap<String, Recipe>)container.eGet(eContainmentFeature());
+ }
+
+} //RecipeMapEntryImpl
\ No newline at end of file
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,685 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import java.util.Map;
+
+import org.apache.maven.model.emf.documentation.recipe.DocumentRoot;
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+import org.apache.maven.model.emf.documentation.recipe.RecipeFactory;
+import org.apache.maven.model.emf.documentation.recipe.RecipeGroup;
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+import org.apache.maven.model.emf.documentation.recipe.Recipes;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RecipePackageImpl extends EPackageImpl implements RecipePackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass recipesEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass recipeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass recipeMapEntryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass recipeGroupEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType eMapEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.apache.maven.model.emf.documentation.recipe.RecipePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private RecipePackageImpl()
+ {
+ super(eNS_URI, RecipeFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static RecipePackage init()
+ {
+ if (isInited) return (RecipePackage)EPackage.Registry.INSTANCE.getEPackage(RecipePackage.eNS_URI);
+
+ // Obtain or create and register package
+ RecipePackageImpl theRecipePackage = (RecipePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof RecipePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new RecipePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theRecipePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theRecipePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theRecipePackage.freeze();
+
+ return theRecipePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRecipes()
+ {
+ return recipesEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRecipes_RecipeGroups()
+ {
+ return (EReference)recipesEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRecipes_RecipeMap()
+ {
+ return (EReference)recipesEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipes_RecipeMapInitialized()
+ {
+ return (EAttribute)recipesEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDocumentRoot()
+ {
+ return documentRootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDocumentRoot_Mixed()
+ {
+ return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_XMLNSPrefixMap()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_XSISchemaLocation()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_Recipes()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRecipe()
+ {
+ return recipeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipe_Id()
+ {
+ return (EAttribute)recipeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipe_Challenge()
+ {
+ return (EAttribute)recipeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipe_Solution()
+ {
+ return (EAttribute)recipeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipe_Discussion()
+ {
+ return (EAttribute)recipeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipe_RelatedRecipeIDs()
+ {
+ return (EAttribute)recipeEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRecipeMapEntry()
+ {
+ return recipeMapEntryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipeMapEntry_Key()
+ {
+ return (EAttribute)recipeMapEntryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRecipeMapEntry_Value()
+ {
+ return (EReference)recipeMapEntryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRecipeGroup()
+ {
+ return recipeGroupEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipeGroup_Id()
+ {
+ return (EAttribute)recipeGroupEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRecipeGroup_Label()
+ {
+ return (EAttribute)recipeGroupEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRecipeGroup_Recipes()
+ {
+ return (EReference)recipeGroupEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getEMap()
+ {
+ return eMapEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeFactory getRecipeFactory()
+ {
+ return (RecipeFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ recipesEClass = createEClass(RECIPES);
+ createEReference(recipesEClass, RECIPES__RECIPE_GROUPS);
+ createEReference(recipesEClass, RECIPES__RECIPE_MAP);
+ createEAttribute(recipesEClass, RECIPES__RECIPE_MAP_INITIALIZED);
+
+ documentRootEClass = createEClass(DOCUMENT_ROOT);
+ createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__RECIPES);
+
+ recipeEClass = createEClass(RECIPE);
+ createEAttribute(recipeEClass, RECIPE__ID);
+ createEAttribute(recipeEClass, RECIPE__CHALLENGE);
+ createEAttribute(recipeEClass, RECIPE__SOLUTION);
+ createEAttribute(recipeEClass, RECIPE__DISCUSSION);
+ createEAttribute(recipeEClass, RECIPE__RELATED_RECIPE_IDS);
+
+ recipeMapEntryEClass = createEClass(RECIPE_MAP_ENTRY);
+ createEAttribute(recipeMapEntryEClass, RECIPE_MAP_ENTRY__KEY);
+ createEReference(recipeMapEntryEClass, RECIPE_MAP_ENTRY__VALUE);
+
+ recipeGroupEClass = createEClass(RECIPE_GROUP);
+ createEAttribute(recipeGroupEClass, RECIPE_GROUP__ID);
+ createEAttribute(recipeGroupEClass, RECIPE_GROUP__LABEL);
+ createEReference(recipeGroupEClass, RECIPE_GROUP__RECIPES);
+
+ // Create data types
+ eMapEDataType = createEDataType(EMAP);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(recipesEClass, Recipes.class, "Recipes", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRecipes_RecipeGroups(), this.getRecipeGroup(), null, "recipeGroups", null, 1, -1, Recipes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRecipes_RecipeMap(), this.getRecipeMapEntry(), null, "recipeMap", null, 1, -1, Recipes.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getRecipes_RecipeMapInitialized(), theXMLTypePackage.getBoolean(), "recipeMapInitialized", "false", 0, 1, Recipes.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = addEOperation(recipesEClass, this.getEMap(), "getInitializedRecipeMap", 0, 1);
+
+ initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_Recipes(), this.getRecipes(), null, "recipes", null, 0, 1, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(recipeEClass, Recipe.class, "Recipe", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getRecipe_Id(), ecorePackage.getEString(), "id", null, 1, 1, Recipe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getRecipe_Challenge(), theXMLTypePackage.getString(), "challenge", null, 1, 1, Recipe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getRecipe_Solution(), theXMLTypePackage.getString(), "solution", null, 1, 1, Recipe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getRecipe_Discussion(), theXMLTypePackage.getString(), "discussion", null, 1, 1, Recipe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getRecipe_RelatedRecipeIDs(), ecorePackage.getEString(), "relatedRecipeIDs", null, 1, -1, Recipe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = addEOperation(recipeEClass, ecorePackage.getEString(), "getFileName", 0, 1);
+
+ initEClass(recipeMapEntryEClass, Map.Entry.class, "RecipeMapEntry", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getRecipeMapEntry_Key(), ecorePackage.getEString(), "key", null, 1, 1, Map.Entry.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRecipeMapEntry_Value(), this.getRecipe(), null, "value", null, 1, 1, Map.Entry.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(recipeGroupEClass, RecipeGroup.class, "RecipeGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getRecipeGroup_Id(), ecorePackage.getEString(), "id", null, 0, 1, RecipeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getRecipeGroup_Label(), ecorePackage.getEString(), "label", null, 0, 1, RecipeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRecipeGroup_Recipes(), this.getRecipe(), null, "recipes", null, 0, -1, RecipeGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(eMapEDataType, EMap.class, "EMap", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ // http://www.eclipse.org/emf/2002/GenModel
+ createGenModelAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations()
+ {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (recipesEClass,
+ source,
+ new String[]
+ {
+ "name", "Recipes",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getRecipes_RecipeGroups(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "recipeGroup",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (documentRootEClass,
+ source,
+ new String[]
+ {
+ "name", "",
+ "kind", "mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_Mixed(),
+ source,
+ new String[]
+ {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_XMLNSPrefixMap(),
+ source,
+ new String[]
+ {
+ "kind", "attribute",
+ "name", "xmlns:prefix"
+ });
+ addAnnotation
+ (getDocumentRoot_XSISchemaLocation(),
+ source,
+ new String[]
+ {
+ "kind", "attribute",
+ "name", "xsi:schemaLocation"
+ });
+ addAnnotation
+ (getDocumentRoot_Recipes(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "recipes",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (recipeEClass,
+ source,
+ new String[]
+ {
+ "name", "Recipe",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getRecipe_Challenge(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "challenge",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getRecipe_Solution(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "solution",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getRecipe_Discussion(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "discussion",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getRecipe_RelatedRecipeIDs(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "relatedRecipeID",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (recipeGroupEClass,
+ source,
+ new String[]
+ {
+ "name", "RecipeGroup",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getRecipeGroup_Recipes(),
+ source,
+ new String[]
+ {
+ "name", "recipe",
+ "kind", "element",
+ "namespace", "##targetNamespace"
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/GenModel</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createGenModelAnnotations()
+ {
+ String source = "http://www.eclipse.org/emf/2002/GenModel";
+ addAnnotation
+ (recipesEClass,
+ source,
+ new String[]
+ {
+ "documentation", "1.0.0\n\n The <code>&lt;recipes&gt;</code>\n element is the root of the descriptor. The following table\n lists all of the possible child elements.\n "
+ });
+ addAnnotation
+ (recipesEClass.getEOperations().get(0),
+ source,
+ new String[]
+ {
+ "body", " this.recipeMap = getRecipeMap();\n if (!isRecipeMapInitialized())\n {\n Iterator<RecipeGroup> recipeGroupIterator = getRecipeGroups().iterator();\n while(recipeGroupIterator.hasNext())\n {\n Iterator<Recipe> recipeIterator = recipeGroupIterator.next().getRecipes().iterator();\n while(recipeIterator.hasNext())\n {\n Recipe recipe = recipeIterator.next();\n this.recipeMap.put(recipe.getId(), recipe);\n }\n }\n setRecipeMapInitialized(true);\n }\n return this.recipeMap;\n"
+ });
+ addAnnotation
+ (recipeEClass.getEOperations().get(0),
+ source,
+ new String[]
+ {
+ "body", "return \"recipe\" + this.getId() + \".html\";"
+ });
+ }
+
+} //RecipePackageImpl
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipesImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipesImpl.java?view=auto&rev=510296
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipesImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/impl/RecipesImpl.java Wed Feb 21 15:05:11 2007
@@ -0,0 +1,313 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.impl;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+import org.apache.maven.model.emf.documentation.recipe.RecipeGroup;
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+import org.apache.maven.model.emf.documentation.recipe.Recipes;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Recipes</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipesImpl#getRecipeGroups <em>Recipe Groups</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipesImpl#getRecipeMap <em>Recipe Map</em>}</li>
+ * <li>{@link org.apache.maven.model.emf.documentation.recipe.impl.RecipesImpl#isRecipeMapInitialized <em>Recipe Map Initialized</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RecipesImpl extends EObjectImpl implements Recipes
+{
+ /**
+ * The cached value of the '{@link #getRecipeGroups() <em>Recipe Groups</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRecipeGroups()
+ * @generated
+ * @ordered
+ */
+ protected EList<RecipeGroup> recipeGroups = null;
+
+ /**
+ * The cached value of the '{@link #getRecipeMap() <em>Recipe Map</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRecipeMap()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, Recipe> recipeMap = null;
+
+ /**
+ * The default value of the '{@link #isRecipeMapInitialized() <em>Recipe Map Initialized</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isRecipeMapInitialized()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean RECIPE_MAP_INITIALIZED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isRecipeMapInitialized() <em>Recipe Map Initialized</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isRecipeMapInitialized()
+ * @generated
+ * @ordered
+ */
+ protected boolean recipeMapInitialized = RECIPE_MAP_INITIALIZED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RecipesImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return RecipePackage.Literals.RECIPES;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<RecipeGroup> getRecipeGroups()
+ {
+ if (recipeGroups == null)
+ {
+ recipeGroups = new EObjectContainmentEList<RecipeGroup>(RecipeGroup.class, this, RecipePackage.RECIPES__RECIPE_GROUPS);
+ }
+ return recipeGroups;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, Recipe> getRecipeMap()
+ {
+ if (recipeMap == null)
+ {
+ recipeMap = new EcoreEMap<String,Recipe>(RecipePackage.Literals.RECIPE_MAP_ENTRY, RecipeMapEntryImpl.class, this, RecipePackage.RECIPES__RECIPE_MAP);
+ }
+ return recipeMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isRecipeMapInitialized()
+ {
+ return recipeMapInitialized;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRecipeMapInitialized(boolean newRecipeMapInitialized)
+ {
+ boolean oldRecipeMapInitialized = recipeMapInitialized;
+ recipeMapInitialized = newRecipeMapInitialized;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RecipePackage.RECIPES__RECIPE_MAP_INITIALIZED, oldRecipeMapInitialized, recipeMapInitialized));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap getInitializedRecipeMap()
+ {
+ this.recipeMap = getRecipeMap();
+ if (!isRecipeMapInitialized())
+ {
+ Iterator<RecipeGroup> recipeGroupIterator = getRecipeGroups().iterator();
+ while(recipeGroupIterator.hasNext())
+ {
+ Iterator<Recipe> recipeIterator = recipeGroupIterator.next().getRecipes().iterator();
+ while(recipeIterator.hasNext())
+ {
+ Recipe recipe = recipeIterator.next();
+ this.recipeMap.put(recipe.getId(), recipe);
+ }
+ }
+ setRecipeMapInitialized(true);
+ }
+ return this.recipeMap;
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPES__RECIPE_GROUPS:
+ return ((InternalEList<?>)getRecipeGroups()).basicRemove(otherEnd, msgs);
+ case RecipePackage.RECIPES__RECIPE_MAP:
+ return ((InternalEList<?>)getRecipeMap()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPES__RECIPE_GROUPS:
+ return getRecipeGroups();
+ case RecipePackage.RECIPES__RECIPE_MAP:
+ if (coreType) return getRecipeMap();
+ else return getRecipeMap().map();
+ case RecipePackage.RECIPES__RECIPE_MAP_INITIALIZED:
+ return isRecipeMapInitialized() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPES__RECIPE_GROUPS:
+ getRecipeGroups().clear();
+ getRecipeGroups().addAll((Collection<? extends RecipeGroup>)newValue);
+ return;
+ case RecipePackage.RECIPES__RECIPE_MAP:
+ ((EStructuralFeature.Setting)getRecipeMap()).set(newValue);
+ return;
+ case RecipePackage.RECIPES__RECIPE_MAP_INITIALIZED:
+ setRecipeMapInitialized(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPES__RECIPE_GROUPS:
+ getRecipeGroups().clear();
+ return;
+ case RecipePackage.RECIPES__RECIPE_MAP:
+ getRecipeMap().clear();
+ return;
+ case RecipePackage.RECIPES__RECIPE_MAP_INITIALIZED:
+ setRecipeMapInitialized(RECIPE_MAP_INITIALIZED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case RecipePackage.RECIPES__RECIPE_GROUPS:
+ return recipeGroups != null && !recipeGroups.isEmpty();
+ case RecipePackage.RECIPES__RECIPE_MAP:
+ return recipeMap != null && !recipeMap.isEmpty();
+ case RecipePackage.RECIPES__RECIPE_MAP_INITIALIZED:
+ return recipeMapInitialized != RECIPE_MAP_INITIALIZED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (recipeMapInitialized: ");
+ result.append(recipeMapInitialized);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RecipesImpl
\ No newline at end of file