<commit_before>package org.neo4j.api.core;

import java.io.Serializable;
import java.rmi.RemoteException;
import java.util.Collections;
import java.util.Map;
import java.util.logging.Logger;
import org.neo4j.impl.core.NodeManager;
import org.neo4j.impl.shell.NeoShellServer;

/**
 * The main Neo factory, with functionality to start and shutdown Neo, create
 * and get nodes and define valid relationship types. This class is typically
 * used in the outer loop in a Neo-enabled application, for example as follows:
 * <pre><code>
 * NeoService neo = new EmbeddedNeo( MyRelationshipTypes.class, "var/neo" );
 * // ... use neo
 * neo.shutdown();
 * </code></pre>
 * Neo is started when this class is instantiated. It provides operations to
 * {@link #createNode() create notes}, {@link #getNodeById(long) get nodes
 * given an id}, get the {@link #getReferenceNode() reference node} and
 * ultimately {@link #shutdown() shutdown Neo}. Typically, once instantiated
 * the reference to EmbeddedNeo is stored away in a service registry or in
 * a singleton instance.
 * <p>
 * Please note that after startup (i.e. constructor invocation), all operations
 * that read or write to the node space must be invoked in a {@link Transaction
 * transactional context}.
 */
public final class EmbeddedNeo implements NeoService
{
	private static Logger log = Logger.getLogger( EmbeddedNeo.class.getName() );
	private NeoShellServer shellServer;
	
	public EmbeddedNeo( String storeDir )
	{
		// TODO: implement
	}
	
	/**
	 * Creates an embedded neo instance with a given set of relationship types.
	 * It will use the store specified by <code>storeDir</code>, which will 
	 * be created if it doesn't already exist.
	 * @param validRelationshipTypesEnum an enum class containing your
	 * relationship types<commit_msg>Implemented new constructor in EmbeddedNeo.<commit_after>package org.neo4j.api.core;

import java.io.Serializable;
import java.rmi.RemoteException;
import java.util.Collections;
import java.util.Map;
import java.util.logging.Logger;
import org.neo4j.impl.core.NodeManager;
import org.neo4j.impl.shell.NeoShellServer;

/**
 * The main Neo factory, with functionality to start and shutdown Neo, create
 * and get nodes and define valid relationship types. This class is typically
 * used in the outer loop in a Neo-enabled application, for example as follows:
 * <pre><code>
 * NeoService neo = new EmbeddedNeo( MyRelationshipTypes.class, "var/neo" );
 * // ... use neo
 * neo.shutdown();
 * </code></pre>
 * Neo is started when this class is instantiated. It provides operations to
 * {@link #createNode() create notes}, {@link #getNodeById(long) get nodes
 * given an id}, get the {@link #getReferenceNode() reference node} and
 * ultimately {@link #shutdown() shutdown Neo}. Typically, once instantiated
 * the reference to EmbeddedNeo is stored away in a service registry or in
 * a singleton instance.
 * <p>
 * Please note that after startup (i.e. constructor invocation), all operations
 * that read or write to the node space must be invoked in a {@link Transaction
 * transactional context}.
 */
public final class EmbeddedNeo implements NeoService
{
	private static Logger log = Logger.getLogger( EmbeddedNeo.class.getName() );
	private NeoShellServer shellServer;
	
	public EmbeddedNeo( String storeDir )
	{
		this.shellServer = null;
		NeoJvmInstance.start( null, storeDir, true );
	}
	
	/**
	 * Creates an embedded neo instance with a given set of relationship types.
	 * It will use the store specified by <code>storeDir</code>, which will 
	 * be created if it doesn't already exist.
	 * @param validRelationshipTypesEnum an enum class containing your
	 * relationship types
{'fraction_non_alphanumeric': 0.09241192411924119, 'fraction_numerical': 0.0016260162601626016, 'mean_word_length': 4.388321167883212, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3397516', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1003, 'n_words': 417}