Tag Archive for ‘serialization’

Loading an Ecore model without initializing all necessary packages or schemas

Here’s a small snippet of code to load an Ecore resource without having to initialize all the necessary packages needed to read all elements. This is useful if we’re interested in only a subset of the schema elements that are present in the Ecore model.

public static EList open(File file) throws IOException {
ResourceSet resourceSet = new [...]