<commit_before>package org.openntf.domino.graph2;

import java.util.Map;
import java.util.Set;

import org.openntf.domino.DateTime;
import org.openntf.domino.graph2.impl.DEdgeList;

import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Vertex;

@SuppressWarnings("rawtypes")
public interface DGraph extends com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.MetaGraph,
		com.tinkerpop.blueprints.TransactionalGraph {
	public static enum Utils {
		;

		public static String convertToFormula(final String key, final Object value) {
			String result = "";
			if (key == null)
				return "";
			if ("@".equals(key)) {
				return String.valueOf(value);
			}
			if (value instanceof Number) {
				result = key + "=" + value;
			} else if (value instanceof DateTime) {
				result = key + "=[" + ((DateTime) value).getLocalTime() + "]";
			} else {
				result = key + "=\"" + String.valueOf(value) + "\"";
			}
			return result;
		}

		public static String getFormulaForFrame(final Class<?> kind) {
			String classname = kind.getSimpleName();
			return "Form =\"" + classname + "\"";
		}

		public static String getVertexFormula(final String key, final Object value) {
			String filterFormula = convertToFormula(key, value);
			return DVertex.FORMULA_FILTER + (filterFormula.length() > 0 ? " & " + filterFormula : "");
		}

		public static String getEdgeFormula(final String key, final Object value) {
			String filterFormula = convertToFormula(key, value);
			return DEdge.FORMULA_FILTER + (filterFormula.length() > 0 ? " & " + filterFormula : "");
		}

		public static String getFramedVertexFormula(final Class<?> kind) {
			return getFormulaForFrame(kind) + " & " + DVertex.FORMULA_FILTER;
		}

		public static String getFramedEdgeFormula(final Class<?> kind) {
			return getFormulaForFrame(kind) + " & " + DEdge.FORMULA_FILTER;
		}

		public static String getFramedVertexFormula(final String key, final Object value, final Class<?> kind) {<commit_msg>Amendment to work with enums<commit_after>package org.openntf.domino.graph2;

import java.util.Map;
import java.util.Set;

import org.openntf.domino.DateTime;
import org.openntf.domino.graph2.impl.DEdgeList;

import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.Vertex;

@SuppressWarnings("rawtypes")
public interface DGraph extends com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.MetaGraph,
com.tinkerpop.blueprints.TransactionalGraph {
	public static enum Utils {
		;

		public static String convertToFormula(final String key, final Object value) {
			String result = "";
			if (key == null)
				return "";
			if ("@".equals(key)) {
				return String.valueOf(value);
			}
			if (value instanceof Number) {
				result = key + "=" + value;
			} else if (value instanceof DateTime) {
				result = key + "=[" + ((DateTime) value).getLocalTime() + "]";
			} else if (value instanceof Enum<?>) {
				result = key + "=\"" + ((Enum<?>) value).getDeclaringClass().getName() + " " + ((Enum<?>) value).name() + "\"";
			} else {
				result = key + "=\"" + String.valueOf(value) + "\"";
			}
			return result;
		}

		public static String getFormulaForFrame(final Class<?> kind) {
			String classname = kind.getSimpleName();
			return "Form =\"" + classname + "\"";
		}

		public static String getVertexFormula(final String key, final Object value) {
			String filterFormula = convertToFormula(key, value);
			return DVertex.FORMULA_FILTER + (filterFormula.length() > 0 ? " & " + filterFormula : "");
		}

		public static String getEdgeFormula(final String key, final Object value) {
			String filterFormula = convertToFormula(key, value);
			return DEdge.FORMULA_FILTER + (filterFormula.length() > 0 ? " & " + filterFormula : "");
		}

		public static String getFramedVertexFormula(final Class<?> kind) {
			return getFormulaForFrame(kind) + " & " + DVertex.FORMULA_FILTER;
		}

		public static String getFramedEdgeFormula(final Class<?> kind) {
			return getFormulaForFrame(kind) + " & " + DEdge.FORMULA_FILTER;
		}

		public static String getFramedVertexFormula(final String key, final Object value, final Class<?> kind) {
{'fraction_non_alphanumeric': 0.1341433778857837, 'fraction_numerical': 0.0019441069258809235, 'mean_word_length': 4.145, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, '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': '3744940', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1304, 'n_words': 305}