简体   繁体   English

在独立的Java应用程序中注册Ecore模型

[英]Registering an Ecore model in a standalone Java application

An Ecore model can be used outside the plugin-environment by manually registering the file extension and the ResourceFactory with the following command, in this case for XML: 通过使用以下命令手动注册文件扩展名和ResourceFactory,可以在插件环境之外使用Ecore模型,在本例中为XML:

Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xml", new XMLResourceFactoryImpl());   

My Ecore model only contains a Factory (extends EFactory ). 我的Ecore模型仅包含一个Factory(扩展了EFactory )。 Where can I get the necessary ResourceFactory? 在哪里可以获得必要的ResourceFactory?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM