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 02:55:06 UTC
svn commit: r510342 [11/12] - 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/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=510342
==============================================================================
--- 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 17:54:52 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=510342
==============================================================================
--- 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 17:54:52 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
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeAdapterFactory.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/util/RecipeAdapterFactory.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeAdapterFactory.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeAdapterFactory.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,218 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.util;
+
+import java.util.Map;
+
+import org.apache.maven.model.emf.documentation.recipe.*;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.apache.maven.model.emf.documentation.recipe.RecipePackage
+ * @generated
+ */
+public class RecipeAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static RecipePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = RecipePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch the delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RecipeSwitch<Adapter> modelSwitch =
+ new RecipeSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseRecipes(Recipes object)
+ {
+ return createRecipesAdapter();
+ }
+ @Override
+ public Adapter caseDocumentRoot(DocumentRoot object)
+ {
+ return createDocumentRootAdapter();
+ }
+ @Override
+ public Adapter caseRecipe(Recipe object)
+ {
+ return createRecipeAdapter();
+ }
+ @Override
+ public Adapter caseRecipeMapEntry(Map.Entry<String, Recipe> object)
+ {
+ return createRecipeMapEntryAdapter();
+ }
+ @Override
+ public Adapter caseRecipeGroup(RecipeGroup object)
+ {
+ return createRecipeGroupAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.apache.maven.model.emf.documentation.recipe.Recipes <em>Recipes</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.apache.maven.model.emf.documentation.recipe.Recipes
+ * @generated
+ */
+ public Adapter createRecipesAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.apache.maven.model.emf.documentation.recipe.DocumentRoot <em>Document Root</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.apache.maven.model.emf.documentation.recipe.DocumentRoot
+ * @generated
+ */
+ public Adapter createDocumentRootAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.apache.maven.model.emf.documentation.recipe.Recipe <em>Recipe</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.apache.maven.model.emf.documentation.recipe.Recipe
+ * @generated
+ */
+ public Adapter createRecipeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>Map Entry</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see java.util.Map.Entry
+ * @generated
+ */
+ public Adapter createRecipeMapEntryAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.apache.maven.model.emf.documentation.recipe.RecipeGroup <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.apache.maven.model.emf.documentation.recipe.RecipeGroup
+ * @generated
+ */
+ public Adapter createRecipeGroupAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //RecipeAdapterFactory
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeResourceFactoryImpl.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/util/RecipeResourceFactoryImpl.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeResourceFactoryImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeResourceFactoryImpl.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,59 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.apache.maven.model.emf.documentation.recipe.util.RecipeResourceImpl
+ * @generated
+ */
+public class RecipeResourceFactoryImpl extends ResourceFactoryImpl
+{
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeResourceFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri)
+ {
+ XMLResource result = new RecipeResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} //RecipeResourceFactoryImpl
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeResourceImpl.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/util/RecipeResourceImpl.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeResourceImpl.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeResourceImpl.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,34 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.apache.maven.model.emf.documentation.recipe.util.RecipeResourceFactoryImpl
+ * @generated
+ */
+public class RecipeResourceImpl extends XMLResourceImpl
+{
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public RecipeResourceImpl(URI uri)
+ {
+ super(uri);
+ }
+
+} //RecipeResourceImpl
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeSwitch.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/util/RecipeSwitch.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeSwitch.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeSwitch.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,235 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.util;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.model.emf.documentation.recipe.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.apache.maven.model.emf.documentation.recipe.RecipePackage
+ * @generated
+ */
+public class RecipeSwitch<T>
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static RecipePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = RecipePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else
+ {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case RecipePackage.RECIPES:
+ {
+ Recipes recipes = (Recipes)theEObject;
+ T result = caseRecipes(recipes);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RecipePackage.DOCUMENT_ROOT:
+ {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ T result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RecipePackage.RECIPE:
+ {
+ Recipe recipe = (Recipe)theEObject;
+ T result = caseRecipe(recipe);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RecipePackage.RECIPE_MAP_ENTRY:
+ {
+ @SuppressWarnings("unchecked") Map.Entry<String, Recipe> recipeMapEntry = (Map.Entry<String, Recipe>)theEObject;
+ T result = caseRecipeMapEntry(recipeMapEntry);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RecipePackage.RECIPE_GROUP:
+ {
+ RecipeGroup recipeGroup = (RecipeGroup)theEObject;
+ T result = caseRecipeGroup(recipeGroup);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Recipes</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Recipes</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRecipes(Recipes object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Document Root</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Document Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDocumentRoot(DocumentRoot object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Recipe</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Recipe</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRecipe(Recipe object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Map Entry</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Map Entry</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRecipeMapEntry(Map.Entry<String, Recipe> object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Group</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Group</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRecipeGroup(RecipeGroup object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //RecipeSwitch
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeXMLProcessor.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/util/RecipeXMLProcessor.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeXMLProcessor.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/util/RecipeXMLProcessor.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,57 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.util;
+
+import java.util.Map;
+
+import org.apache.maven.model.emf.documentation.recipe.RecipePackage;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RecipeXMLProcessor extends XMLProcessor
+{
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RecipeXMLProcessor()
+ {
+ super((EPackage.Registry.INSTANCE));
+ RecipePackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the RecipeResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations()
+ {
+ if (registrations == null)
+ {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new RecipeResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new RecipeResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //RecipeXMLProcessor
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/DocumentRootValidator.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/validation/DocumentRootValidator.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/DocumentRootValidator.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/DocumentRootValidator.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,29 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.validation;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipes;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+/**
+ * A sample validator interface for {@link org.apache.maven.model.emf.documentation.recipe.DocumentRoot}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface DocumentRootValidator
+{
+ boolean validate();
+
+ boolean validateMixed(FeatureMap value);
+ boolean validateXMLNSPrefixMap(EMap<String, String> value);
+ boolean validateXSISchemaLocation(EMap<String, String> value);
+ boolean validateRecipes(Recipes value);
+}
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeGroupValidator.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/validation/RecipeGroupValidator.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeGroupValidator.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeGroupValidator.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.validation;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.apache.maven.model.emf.documentation.recipe.RecipeGroup}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface RecipeGroupValidator
+{
+ boolean validate();
+
+ boolean validateId(Integer value);
+
+ boolean validateId(String value);
+ boolean validateLabel(String value);
+ boolean validateRecipes(EList<Recipe> value);
+}
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeMapEntryValidator.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/validation/RecipeMapEntryValidator.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeMapEntryValidator.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeMapEntryValidator.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,25 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.validation;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+
+/**
+ * A sample validator interface for {@link java.util.Map.Entry}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface RecipeMapEntryValidator
+{
+ boolean validate();
+
+ boolean validateTypedKey(String value);
+
+ boolean validateTypedKey(Integer value);
+ boolean validateTypedValue(Recipe value);
+}
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeValidator.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/validation/RecipeValidator.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeValidator.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipeValidator.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.validation;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.apache.maven.model.emf.documentation.recipe.Recipe}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface RecipeValidator
+{
+ boolean validate();
+
+ boolean validateId(String value);
+
+ boolean validateId(Integer value);
+ boolean validateChallenge(String value);
+ boolean validateSolution(String value);
+ boolean validateDiscussion(String value);
+ boolean validateRelatedRecipeIDs(EList<Integer> value);
+}
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipesValidator.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/validation/RecipesValidator.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipesValidator.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/main/java/org/apache/maven/model/emf/documentation/recipe/validation/RecipesValidator.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,31 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.maven.model.emf.documentation.recipe.validation;
+
+import org.apache.maven.model.emf.documentation.recipe.Recipe;
+
+import org.apache.maven.model.emf.documentation.recipe.RecipeGroup;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+
+/**
+ * A sample validator interface for {@link org.apache.maven.model.emf.documentation.recipe.Recipes}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface RecipesValidator
+{
+ boolean validate();
+
+ boolean validateRecipeGroups(EList<RecipeGroup> value);
+
+ boolean validateRecipes(EList<Recipe> value);
+ boolean validateRecipeMap(EMap<Integer, Recipe> value);
+
+ boolean validateRecipeMapInitialized(boolean value);
+}
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/ModelTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/ModelTest.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/ModelTest.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/ModelTest.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,63 @@
+package org.apache.maven;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.model.emf.documentation.recipe.DocumentRoot;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import junit.framework.TestCase;
+
+
+public class ModelTest extends TestCase {
+
+ /*
+ *
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testModelLoad() throws IOException
+ {
+ ResourceSet resourceSet = TestHelper.createResourceSet();
+
+ File recipesFile = new File("src/test/resources/recipes.xml");
+ URI recipeURI = URI.createFileURI(recipesFile.getAbsolutePath());
+
+ Resource resource = resourceSet.createResource( recipeURI );
+/*
+ DocumentRoot documentRoot = TestHelper.createDocumentRoot();
+ resource.getContents().add(documentRoot);
+ resource.save(null);
+
+ assertTrue(true);
+
+ DocumentRoot d = ( DocumentRoot ) resource.getContents().get(0);
+ */
+ TestHelper.loadResource( recipesFile.toString(), resourceSet );
+ }
+ /*
+ public void testModelIndexing() throws IOException
+ {
+ ResourceSet resourceSet = TestHelper.createResourceSet();
+
+ File recipeFile = new File("src/test/resources/recipe.xml");
+ URI recipeURI = URI.createFileURI(recipeFile.getAbsolutePath());
+
+ Resource resource = resourceSet.createResource( recipeURI );
+ DocumentRoot documentRoot = TestHelper.createDocumentRoot();
+ resource.getContents().add(documentRoot);
+ resource.save(null);
+
+ assertTrue(true);
+ }
+*/
+}
+
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/TestHelper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/TestHelper.java?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/TestHelper.java (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/java/org/apache/maven/TestHelper.java Wed Feb 21 17:54:52 2007
@@ -0,0 +1,83 @@
+
+package org.apache.maven;
+
+
+import java.io.File;
+
+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.RecipePackage;
+import org.apache.maven.model.emf.documentation.recipe.Recipes;
+import org.apache.maven.model.emf.documentation.recipe.RecipeGroup;
+import org.apache.maven.model.emf.documentation.recipe.util.RecipeResourceFactoryImpl;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+public class TestHelper
+{
+ private static RecipeFactory recipeFactory = RecipeFactory.eINSTANCE;
+ private static RecipePackage recipePackage = RecipePackage.eINSTANCE;
+
+
+ public static ResourceSet createResourceSet()
+ {
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ resourceSet = new ResourceSetImpl();
+
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
+ ("xml",
+ new RecipeResourceFactoryImpl());
+
+ resourceSet.getPackageRegistry().put
+ (
+ RecipePackage.eNS_URI,
+ recipePackage
+ );
+ return resourceSet;
+ }
+
+ public static DocumentRoot createDocumentRoot()
+ {
+ EStringToStringMapEntryImpl e = ( EStringToStringMapEntryImpl ) EcoreFactory.eINSTANCE.create( EcorePackage.eINSTANCE.getEStringToStringMapEntry());
+ e.setKey("");
+ e.setValue( "http://maven.apache.org/documentation/recipes/1.0.0" );
+
+ DocumentRoot documentRoot = recipeFactory.createDocumentRoot();
+ documentRoot.getXMLNSPrefixMap().add( e );
+
+ Recipes recipes = recipeFactory.createRecipes();
+ RecipeGroup recipeGroup = recipeFactory.createRecipeGroup();
+ recipeGroup.setId( "1" );
+ recipeGroup.setLabel("TestLabel");
+
+ Recipe recipe = recipeFactory.createRecipe();
+ recipe.setId("11");
+ recipe.setChallenge("![CDATA[Importing the Apache Format Template.]]");
+ recipe.setSolution("![CDATA[Window > Preferences > Java > Code Style > Formatter > Import]]");
+ recipe.setDiscussion( "![CDATA[<p>Here is a link to the formatting.xml file <a href=\"resources/formatting.xml\">formatting.xml</a></p>]]" );
+
+ recipe.getRelatedRecipeIDs().add( "11" );
+ recipe.getRelatedRecipeIDs().add( "12" );
+
+ recipeGroup.getRecipes().add(recipe);
+ recipes.getRecipeGroups().add( recipeGroup );
+ documentRoot.setRecipes(recipes);
+
+ return documentRoot;
+ }
+
+ public static Resource loadResource(String resourcePath, ResourceSet resourceSet)
+ {
+ File file = new File(resourcePath);
+ URI checklistURI = URI.createFileURI(file.getAbsolutePath());
+ Resource resource = resourceSet.getResource(checklistURI, true);
+ return resource;
+ }
+}
\ No newline at end of file
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes.xml?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes.xml (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes.xml Wed Feb 21 17:54:52 2007
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ASCII"?>
+<recipes xmlns="http://maven.apache.org/documentation/recipes/1.0.0">
+ <recipeGroup id="1" label="TestLabel">
+ <recipe id="11">
+ <challenge>![CDATA[Importing the Apache Format Template.]]</challenge>
+ <solution>![CDATA[Window > Preferences > Java > Code Style > Formatter > Import]]</solution>
+ <discussion>![CDATA[<p>Here is a link to the formatting.xml file <a href="resources/formatting.xml">formatting.xml</a></p>]]</discussion>
+ <relatedRecipeID>11</relatedRecipeID>
+ <relatedRecipeID>12</relatedRecipeID>
+ </recipe>
+ </recipeGroup>
+</recipes>
\ No newline at end of file
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes2.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes2.xml?view=auto&rev=510342
==============================================================================
--- directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes2.xml (added)
+++ directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/src/test/resources/recipes2.xml Wed Feb 21 17:54:52 2007
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ASCII"?>
+<recipes xmlns="http://maven.apache.org/documentation/recipes/1.0.0">
+ <recipeGroup id="1" label="TestLabel">
+ <recipe id="11">
+ <challenge>![CDATA[Importing the Apache Format Template.]]</challenge>
+ <solution>![CDATA[Window > Preferences > Java > Code Style > Formatter > Import]]</solution>
+ <discussion>![CDATA[<p>Here is a link to the formatting.xml file <a href="resources/formatting.xml">formatting.xml</a></p>]]</discussion>
+ <relatedRecipeID>11</relatedRecipeID>
+ <relatedRecipeID>12</relatedRecipeID>
+ </recipe>
+ </recipeGroup>
+</recipes>
\ No newline at end of file
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/DocumentRoot.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/DocumentRoot.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/DocumentRoot.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/Recipe.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/Recipe.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/Recipe.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipeFactory.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipeFactory.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipeFactory.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipeGroup.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipeGroup.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipeGroup.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipePackage$Literals.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipePackage%24Literals.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipePackage$Literals.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipePackage.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipePackage.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/RecipePackage.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/Recipes.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/Recipes.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/Recipes.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/DocumentRootImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeFactoryImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeGroupImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipeMapEntryImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipePackageImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipesImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/documentation.checklist.parent/documentation.recipe.model.v100/target/classes/org/apache/maven/model/emf/documentation/recipe/impl/RecipesImpl.class?view=auto&rev=510342
==============================================================================
Binary file - no diff available.