Skip navigation links

Package fr.inria.atlanmod.neoemf.data.blueprints.option

Provides utility classes to define specific behaviors of Blueprints data persistence.

See: Description

Package fr.inria.atlanmod.neoemf.data.blueprints.option Description

Provides utility classes to define specific behaviors of Blueprints data persistence.

This package defines two APIs extending PersistentResourceOptions and PersistenceOptionsBuilder:

Options defined using the classes inside this package are usable for each Blueprints implementation. For backend-specific configuration refers to the corresponding package in the backend plugin (fr.inria.atlanmod.neoemf.data.blueprints.[backend]).

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 use a direct write approach (meaning that modifications are directly stored in the underlying database) and cache the accessed features to retrieve them efficiently. The direct write behavior is a Blueprints specific option, while the caching behavior is defined at the core level.


 // Create the option map
 Map<String, Object> options = BlueprintsOptionsBuilder.newBuilder()
     .directWrite()
     .cacheFeatures()
     .asMap();

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

 // Manipulate the resource with a direct write approach and feature cache enabled
 myResource.getContents() [...]
 
Skip navigation links

Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.