{}*/
}
public void createMetamodel()
{
EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE;
EcorePackage ecorePackage = EcorePackage.eINSTANCE;
// create TCGNode
EClass oNodeClass = ecoreFactory.createEClass();
oNodeClass.setName("TCGNode");
// attribute name of TCGNode
EAttribute oNodeName = ecoreFactory.createEAttribute();
oNodeName.setName("name");
oNodeName.setEType(ecorePackage.getEString());
oNodeClass.getEStructuralFeatures().add(oNodeName);
// reference incoming arc of node
//EReference o
// create TCGArc
EClass oArcClass = ecoreFactory.createEClass();
oArcClass.setName("TCGArc");
// attribute name of TCGArc
EAttribute oArcName = ecoreFactory.createEAttribute();
oArcName.setName("name");
oArcName.setEType(ecorePackage.getEString());
oArcClass.getEStructuralFeatures().add(oArcName);
// reference source of TCGArc
EReference oArcSource = ecoreFactory.createEReference();
oArcSource.setName("source");
oArcSource.setEType(oNodeClass);
oArcSource.setLowerBound(1);
oArcSource.setUpperBound(1);
// reference target of TCGArc
EReference oArcTarget = ecoreFactory.createEReference();
oArcTarget.setName("target");
oArcTarget.setEType(oNodeClass);
oArcTarget.setLowerBound(1);
oArcTarget.setUpperBound(1);
// create TestCaseGraph
EClass oTCGClass = ecoreFactory.createEClass();
oTCGClass.setName("TestCaseGraph");
// a test case graph refrences the root node
EReference oRootReference = ecoreFactory.createEReference();
oRootReference.setName("root");
oRootReference.setEType(oNodeClass);
oRootReference.setLowerBound(1);
oRootReference.setUpperBound(1);
m_oResourceEcoreOut.getContents().add(oNodeClass);
m_oResourceEcoreOut.getContents().add(oArcClass);
m_oResourceEcoreOut.getContents().add(oTCGClass);
try {
m_oResourceEcoreOut.save(m_oOptions);
}
catch(IOException e)
{}
EPackage companyPackage = ecoreFactory.createEPackage();
companyPackage.setName("company");
companyPackage.setNsPrefix("company");
companyPackage.setNsURI("http:///com.example.company.ecore");
companyPackage.getEClassifiers().add(oNodeClass);
companyPackage.getEClassifiers().add(oArcClass);