Commit 85accc09 authored by Philippe Merle's avatar Philippe Merle
Browse files

* Removed all Java files generated from the EMF metamodel.

* Added header to file NuxeoMetamodelProvider.java + some cosmetic updates.
* Added a JUnit test case.
* Cosmetic updates of pom.xml.
* Added <srcs> to FraSCAti compiler MOJO in order to compile generated EMF code.
* Updated POM dependencies.
parent cbc22702
<?xml version="1.0"?>
<!--
* OW2 FraSCAti: Metamodel for Nuxeo binding
* OW2 FraSCAti: Metamodel for Nuxeo binding and implementation
*
* Copyright (c) 2012 Inria, University of Lille 1
*
......@@ -22,7 +22,7 @@
*
* Author: Christophe Munilla
*
* Contributor(s):
* Contributor(s): Philippe Merle
*
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -41,8 +41,8 @@
</parent>
<artifactId>frascati-metamodel-nuxeo</artifactId>
<name>OW2 FraSCAti Metamodel for Nuxeo binding</name>
<description>SCA metamodel extension for describing Nuxeo binding</description>
<name>OW2 FraSCAti Metamodel for Nuxeo binding and implementation</name>
<description>SCA metamodel for describing Nuxeo binding and implementation</description>
<!-- ===== -->
<!-- Build -->
......@@ -70,11 +70,16 @@
<genmodel>model/nuxeo.genmodel</genmodel>
</configuration>
</plugin>
<!-- Compile OW2 FraSCAti SCA composite. -->
<plugin>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>frascati-compiler-plugin</artifactId>
<configuration>
<composite>org/ow2/frascati/FraSCAti</composite>
<srcs>
<src>${project.basedir}/target/generated-sources/genmodel</src>
</srcs>
</configuration>
</plugin>
</plugins>
......@@ -85,21 +90,31 @@
<!-- ============ -->
<dependencies>
<!-- OW2 FraSCAti SCA Parser Module. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-sca-parser</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Eclipse STP SCA metamodel. -->
<dependency>
<groupId>org.ow2.frascati.model</groupId>
<artifactId>sca-model</artifactId>
<version>2.0.1.3</version>
</dependency>
<!-- OW2 FraSCAti Assembly Factory Module. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-assembly-factory</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Eclipse STP SCA metamodel. -->
<dependency>
<groupId>org.ow2.frascati.model</groupId>
<artifactId>sca-model</artifactId>
<version>${org.eclipse.stp.sca.version}</version>
</dependency>
<!-- ==== -->
<!-- Test -->
<!-- ==== -->
<!-- OW2 FraSCAti Assembly Factory Module. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-assembly-factory</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.ow2.frascati.nuxeo;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Document Root</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.ow2.frascati.nuxeo.DocumentRoot#getBindingNuxeo <em>Binding Nuxeo</em>}</li>
* <li>{@link org.ow2.frascati.nuxeo.DocumentRoot#getImplementationNuxeo <em>Implementation Nuxeo</em>}</li>
* </ul>
* </p>
*
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getDocumentRoot()
* @model extendedMetaData="name='' kind='mixed'"
* @generated
*/
public interface DocumentRoot extends org.eclipse.stp.sca.DocumentRoot
{
/**
* Returns the value of the '<em><b>Binding Nuxeo</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Binding Nuxeo</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Binding Nuxeo</em>' containment reference.
* @see #setBindingNuxeo(NuxeoBinding)
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getDocumentRoot_BindingNuxeo()
* @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
* extendedMetaData="kind='element' name='binding.nuxeo' namespace='##targetNamespace' affiliation='http://www.osoa.org/xmlns/sca/1.0#binding'"
* @generated
*/
NuxeoBinding getBindingNuxeo();
/**
* Sets the value of the '{@link org.ow2.frascati.nuxeo.DocumentRoot#getBindingNuxeo <em>Binding Nuxeo</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Binding Nuxeo</em>' containment reference.
* @see #getBindingNuxeo()
* @generated
*/
void setBindingNuxeo(NuxeoBinding value);
/**
* Returns the value of the '<em><b>Implementation Nuxeo</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Implementation Nuxeo</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Implementation Nuxeo</em>' containment reference.
* @see #setImplementationNuxeo(NuxeoImplementation)
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getDocumentRoot_ImplementationNuxeo()
* @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
* extendedMetaData="kind='element' name='implementation.nuxeo' namespace='##targetNamespace' affiliation='http://www.osoa.org/xmlns/sca/1.0#implementation'"
* @generated
*/
NuxeoImplementation getImplementationNuxeo();
/**
* Sets the value of the '{@link org.ow2.frascati.nuxeo.DocumentRoot#getImplementationNuxeo <em>Implementation Nuxeo</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Implementation Nuxeo</em>' containment reference.
* @see #getImplementationNuxeo()
* @generated
*/
void setImplementationNuxeo(NuxeoImplementation value);
} // DocumentRoot
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.ow2.frascati.nuxeo;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.stp.sca.Binding;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Binding</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.ow2.frascati.nuxeo.NuxeoBinding#getAnyAttribute <em>Any Attribute</em>}</li>
* <li>{@link org.ow2.frascati.nuxeo.NuxeoBinding#getGroup <em>Group</em>}</li>
* <li>{@link org.ow2.frascati.nuxeo.NuxeoBinding#getNxservice <em>Nxservice</em>}</li>
* </ul>
* </p>
*
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoBinding()
* @model extendedMetaData="name='NuxeoBinding' kind='elementOnly'"
* @generated
*/
public interface NuxeoBinding extends Binding
{
/**
* Returns the value of the '<em><b>Any Attribute</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Any Attribute</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Any Attribute</em>' attribute list.
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoBinding_AnyAttribute()
* @model dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
* extendedMetaData="kind='attributeWildcard' wildcards='##any' name=':3' processing='lax'"
* @generated
*/
FeatureMap getAnyAttribute();
/**
* Returns the value of the '<em><b>Group</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Group</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Group</em>' attribute list.
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoBinding_Group()
* @model dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
* extendedMetaData="kind='group' name='group:sca:nuxeobinding'"
* @generated
*/
FeatureMap getGroup();
/**
* Returns the value of the '<em><b>Nxservice</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Nxservice</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Nxservice</em>' attribute.
* @see #setNxservice(String)
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoBinding_Nxservice()
* @model dataType="org.eclipse.emf.ecore.xml.type.NCName"
* @generated
*/
String getNxservice();
/**
* Sets the value of the '{@link org.ow2.frascati.nuxeo.NuxeoBinding#getNxservice <em>Nxservice</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Nxservice</em>' attribute.
* @see #getNxservice()
* @generated
*/
void setNxservice(String value);
} // NuxeoBinding
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.ow2.frascati.nuxeo;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see org.ow2.frascati.nuxeo.NuxeoPackage
* @generated
*/
public interface NuxeoFactory extends EFactory
{
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
NuxeoFactory eINSTANCE = org.ow2.frascati.nuxeo.impl.NuxeoFactoryImpl.init();
/**
* Returns a new object of class '<em>Document Root</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Document Root</em>'.
* @generated
*/
DocumentRoot createDocumentRoot();
/**
* Returns a new object of class '<em>Binding</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Binding</em>'.
* @generated
*/
NuxeoBinding createNuxeoBinding();
/**
* Returns a new object of class '<em>Implementation</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Implementation</em>'.
* @generated
*/
NuxeoImplementation createNuxeoImplementation();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
NuxeoPackage getNuxeoPackage();
} //NuxeoFactory
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.ow2.frascati.nuxeo;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.stp.sca.Implementation;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Implementation</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.ow2.frascati.nuxeo.NuxeoImplementation#getAny <em>Any</em>}</li>
* <li>{@link org.ow2.frascati.nuxeo.NuxeoImplementation#getAnyAttribute <em>Any Attribute</em>}</li>
* <li>{@link org.ow2.frascati.nuxeo.NuxeoImplementation#getName <em>Name</em>}</li>
* </ul>
* </p>
*
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoImplementation()
* @model extendedMetaData="name='NuxeoImplementation' kind='elementOnly'"
* @generated
*/
public interface NuxeoImplementation extends Implementation
{
/**
* Returns the value of the '<em><b>Any</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Any</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Any</em>' attribute list.
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoImplementation_Any()
* @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
* extendedMetaData="kind='elementWildcard' wildcards='##other' name=':2' processing='lax'"
* @generated
*/
FeatureMap getAny();
/**
* Returns the value of the '<em><b>Any Attribute</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Any Attribute</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Any Attribute</em>' attribute list.
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoImplementation_AnyAttribute()
* @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
* extendedMetaData="kind='attributeWildcard' wildcards='##any' name=':3' processing='lax'"
* @generated
*/
FeatureMap getAnyAttribute();
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.ow2.frascati.nuxeo.NuxeoPackage#getNuxeoImplementation_Name()
* @model dataType="org.eclipse.emf.ecore.xml.type.NCName" required="true"
* extendedMetaData="name='name' kind='attribute'"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link org.ow2.frascati.nuxeo.NuxeoImplementation#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
} // NuxeoImplementation
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.ow2.frascati.nuxeo.impl;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.ow2.frascati.nuxeo.DocumentRoot;
import org.ow2.frascati.nuxeo.NuxeoBinding;
import org.ow2.frascati.nuxeo.NuxeoImplementation;
import org.ow2.frascati.nuxeo.NuxeoPackage;
/**
* <!-- 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.ow2.frascati.nuxeo.impl.DocumentRootImpl#getBindingNuxeo <em>Binding Nuxeo</em>}</li>
* <li>{@link org.ow2.frascati.nuxeo.impl.DocumentRootImpl#getImplementationNuxeo <em>Implementation Nuxeo</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class DocumentRootImpl extends org.eclipse.stp.sca.impl.DocumentRootImpl implements DocumentRoot
{
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DocumentRootImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass()
{
return NuxeoPackage.Literals.DOCUMENT_ROOT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NuxeoBinding getBindingNuxeo()
{
return (NuxeoBinding)getMixed().get(NuxeoPackage.Literals.DOCUMENT_ROOT__BINDING_NUXEO, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetBindingNuxeo(NuxeoBinding newBindingNuxeo, NotificationChain msgs)
{
return ((FeatureMap.Internal)getMixed()).basicAdd(NuxeoPackage.Literals.DOCUMENT_ROOT__BINDING_NUXEO, newBindingNuxeo, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBindingNuxeo(NuxeoBinding newBindingNuxeo)
{
((FeatureMap.Internal)getMixed()).set(NuxeoPackage.Literals.DOCUMENT_ROOT__BINDING_NUXEO, newBindingNuxeo);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NuxeoImplementation getImplementationNuxeo()
{
return (NuxeoImplementation)getMixed().get(NuxeoPackage.Literals.DOCUMENT_ROOT__IMPLEMENTATION_NUXEO, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetImplementationNuxeo(NuxeoImplementation newImplementationNuxeo, NotificationChain msgs)
{
return ((FeatureMap.Internal)getMixed()).basicAdd(NuxeoPackage.Literals.DOCUMENT_ROOT__IMPLEMENTATION_NUXEO, newImplementationNuxeo, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setImplementationNuxeo(NuxeoImplementation newImplementationNuxeo)
{
((FeatureMap.Internal)getMixed()).set(NuxeoPackage.Literals.DOCUMENT_ROOT__IMPLEMENTATION_NUXEO, newImplementationNuxeo);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case NuxeoPackage.DOCUMENT_ROOT__BINDING_NUXEO:
return basicSetBindingNuxeo(null, msgs);
case NuxeoPackage.DOCUMENT_ROOT__IMPLEMENTATION_NUXEO:
return basicSetImplementationNuxeo(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case NuxeoPackage.DOCUMENT_ROOT__BINDING_NUXEO:
return getBindingNuxeo();
case NuxeoPackage.DOCUMENT_ROOT__IMPLEMENTATION_NUXEO:
return getImplementationNuxeo();
}
return super.eGet(featureID, resolve, coreType);
}
/**