Skip navigation links

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

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

See: Description

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

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

Configuration defined using the classes inside this package are only usable with Neo4j as the concrete implementation of the Blueprints API. Neo4j specific configuration can be combined with Blueprints generic configuration.

This package defines the configuration by extending BlueprintsTinkerConfig: BlueprintsNeo4jConfig is a fluent API allowing to easily set Neo4j specific configuration in client applications. Since the configuration extends BlueprintsTinkerConfig it can be used to combine Neo4j, Blueprints, and generic 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 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 BlueprintsNeo4jConfig 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 = new BlueprintsNeo4jConfig()
     .softCache()
     .cacheFeatures()
     .toMap();

 // 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() [...]
 
See Also:
BlueprintsTinkerConfig
Skip navigation links

Copyright © 2013–2019 Atlanmod. All rights reserved.