Skip navigation links

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

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

See: Description

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

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

This package defines two APIs extending BlueprintsResourceOptions and BlueprintsOptionsBuilder:

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 Neo4j backend with a database soft cache strategy and a generic cache storing accessed features to retrieve them efficiently. The database cache policy is a Neo4j specific option, while the feature caching behavior is defined at the core level. In addition, using BlueprintsNeo4jOptionsBuilder to create the option map automatically sets the graph backend type to "com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph".


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

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

 // Manipulate the resource with a Neo4j backend using an internal soft cache and a feature cache
 myResource.getContents() [...]
 
Skip navigation links

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