public static EPackage createTEPackage(String nsPrefix, String nsURI) {
// create the EPackage of the temporary metamodel if it does not exist already
if(!Package_Map.containsKey(nsURI)) {
EPackage tPackage = EcoreFactory.eINSTANCE.createEPackage();
tPackage.setNsPrefix(nsPrefix);
tPackage.setNsURI(nsURI);
// create the document root to which the temporary EReferences are added
EClass documentRoot = EcoreFactory.eINSTANCE.createEClass();
documentRoot.setName("DocumentRoot");
// add the document root to the created package and add the package to the global map
tPackage.getEClassifiers().add(documentRoot);
Package_Map.put(nsURI, tPackage);
return tPackage;
} else {
return Package_Map.get(nsURI);
}
}
ToscaUtil.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:caml2tosca
作者:
评论列表
文章目录