oRootReference.setEType(oNodeClass);
oRootReference.setLowerBound(1);
oRootReference.setUpperBound(1);
// erstes Package, das node, arc und tcg enth�lt
EPackage graphPackage = ecoreFactory.createEPackage();
graphPackage.setName("graph");
graphPackage.setNsPrefix("graph");
graphPackage.setNsURI("http:///com.example.graph.ecore");
graphPackage.getEClassifiers().add(oNodeClass);
graphPackage.getEClassifiers().add(oArcClass);
graphPackage.getEClassifiers().add(oTCGClass);
m_oResourceEcoreOut.getContents().add(graphPackage);
try {
m_oResourceEcoreOut.save(m_oOptions);
}
catch(IOException e)
{}
/*
// zweites Package, das nur node enth�lt
EPackage graphPackage2 = ecoreFactory.createEPackage();
graphPackage2.setName("graph2");
graphPackage2.setNsPrefix("graph2");
graphPackage2.setNsURI("http:///com.example.graph2.ecore");
graphPackage2.getEClassifiers().add(oNodeClass);
m_oResourceEcoreOut2.getContents().add(graphPackage2);
try {
m_oResourceEcoreOut2.save(m_oOptions);
}
catch(IOException e)
{}
*/
// get company factory
EFactory graphFactory = graphPackage.getEFactoryInstance();
//EFactory graphFactory2 = graphPackage2.getEFactoryInstance();
// using the factory create instance of company class and
// set company name
//EObject company2 = graphFactory2.create(oNodeClass);