// Path: src/main/java/co/indexia/antiquity/graph/identifierBehavior/GraphIdentifierBehavior.java
// public interface GraphIdentifierBehavior<V extends Comparable<V>> {
//     /**
//      * Get the latest(current) graph version.
//      * 
//      * <p>
//      * Graph latest version is stored in the root historic vertex.
//      * <p>
//      * 
//      * @see co.indexia.antiquity.graph.ActiveVersionedGraph#getRootVertex()
//      * 
//      * @return The latest graph version.
//      */
//     public V getLatestGraphVersion();
// 
//     /**
//      * Get the next graph version.
//      * 
//      * @param currentVersion The current version of the graph.
//      */
//     public V getNextGraphVersion(V currentVersion);
// 
//     /**
//      * Get the minimum possible graph version.
//      * 
//      * @return The minimum possible graph version.
//      */
//     public V getMinPossibleGraphVersion();
// 
//     /**
//      * Get the maximum possible graph version.
//      * 
//      * @return The maximum possible graph version
//      */
//     public V getMaxPossibleGraphVersion();
// 
//     /**
//      * Set the {@link co.indexia.antiquity.graph.VersionedGraphBase}
//      * instance associated with this behavior
//      */
//     public void setGraph(VersionedGraphBase<?, V> graph);
// }


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;
import com.tinkerpop.blueprints.TransactionalGraph;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.util.wrappers.id.IdGraph.IdFactory;
import co.indexia.antiquity.graph.identifierBehavior.GraphIdentifierBehavior;
    public void rollback() {
        boolean transactionFailure = false;
        try {
            getBaseGraph().rollback();
        } catch (RuntimeException re) {
            transactionFailure = true;
            throw re;
        } finally {
            if (!transactionFailure) {
                getEventableGraph().getTrigger().resetEventQueue();
                transactionData.get().clear();
            }
        }
    }

    /**
     * <p>
     * Put the specified property key/value in the specified map.
     * </p>
     * 
     * <p>
     * If map is null a new map will be created
     * </p>
     * 
     * @param map A map of properties to hold the specified key/value property
     * @param key The key of the property to store within the specified map
     * @param value The value of the property to store within the specified map
     * @return The specified map after it contains the specified key/value
     */
    private static <E extends Element> Map<String, Object> putEntryOnMap(Map<E, Map<String, Object>> elementMap,
// Path: src/main/java/co/indexia/antiquity/graph/identifierBehavior/GraphIdentifierBehavior.java
// public interface GraphIdentifierBehavior<V extends Comparable<V>> {
//     /**
//      * Get the latest(current) graph version.
//      * 
//      * <p>
//      * Graph latest version is stored in the root historic vertex.
//      * <p>
//      * 
//      * @see co.indexia.antiquity.graph.ActiveVersionedGraph#getRootVertex()
//      * 
//      * @return The latest graph version.
//      */
//     public V getLatestGraphVersion();
// 
//     /**
//      * Get the next graph version.
//      * 
//      * @param currentVersion The current version of the graph.
//      */
//     public V getNextGraphVersion(V currentVersion);
// 
//     /**
//      * Get the minimum possible graph version.
//      * 
//      * @return The minimum possible graph version.
//      */
//     public V getMinPossibleGraphVersion();
// 
//     /**
//      * Get the maximum possible graph version.
//      * 
//      * @return The maximum possible graph version
//      */
//     public V getMaxPossibleGraphVersion();
// 
//     /**
//      * Set the {@link co.indexia.antiquity.graph.VersionedGraphBase}
//      * instance associated with this behavior
//      */
//     public void setGraph(VersionedGraphBase<?, V> graph);
// }


// Path: src/main/java/co/indexia/antiquity/graph/TransactionalVersionedGraph.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.IndexableGraph;
import com.tinkerpop.blueprints.KeyIndexableGraph;
import com.tinkerpop.blueprints.TransactionalGraph;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.util.wrappers.id.IdGraph.IdFactory;
import co.indexia.antiquity.graph.identifierBehavior.GraphIdentifierBehavior;

    public void rollback() {
        boolean transactionFailure = false;
        try {
            getBaseGraph().rollback();
        } catch (RuntimeException re) {
            transactionFailure = true;
            throw re;
        } finally {
            if (!transactionFailure) {
                getEventableGraph().getTrigger().resetEventQueue();
                transactionData.get().clear();
            }
        }
    }

    /**
     * <p>
     * Put the specified property key/value in the specified map.
     * </p>
     * 
     * <p>
     * If map is null a new map will be created
     * </p>
     * 
     * @param map A map of properties to hold the specified key/value property
     * @param key The key of the property to store within the specified map
     * @param value The value of the property to store within the specified map
     * @return The specified map after it contains the specified key/value
     */
    private static <E extends Element> Map<String, Object> putEntryOnMap(Map<E, Map<String, Object>> elementMap,
            Map<String, Object> map, E element, String key, Object value) {