Skip navigation links

Package fr.inria.atlanmod.neoemf.config

Provides utility classes to provide modeling and persistence-level configuration.

See: Description

Package fr.inria.atlanmod.neoemf.config Description

Provides utility classes to provide modeling and persistence-level configuration.

NeoEMF can be customized by using specific options that are provided to the Resource.save(java.util.Map) and Resource.load(java.util.Map) methods. This package defines the base for the configuration of all Backend: Config is a fluent API allowing to easily set NeoEMF configuration in client applications. Backend-specific builders are also provided to integrate backend-related configuration.

These classes are used to create option maps used in EMF save and load methods. For example, the following code creates a map that tells the framework to commit the pending transaction after 10000 operations, and cache the accessed features to retrieve them efficiently. MyConfig corresponds to a backend-specific implementation of Config.


 // Create the option map
 Map<String, Object> options = new MyConfig()
     .autocommit(10000)
     .cacheFeatures()
     .toMap();

 // Load the resource with the specified options
 myResource.load(options);

 // Manipulate the resource with autocommit and feature cache enabled
 myResource.getContents() [...]
 
Skip navigation links

Copyright © 2013–2019 Atlanmod. All rights reserved.