<commit_before>package owltools.gaf.lego.server.handler;

import java.util.Map;

import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;

import owltools.gaf.lego.MolecularModelManager;

/**
 * Define methods and paths for the REST api of the {@link MolecularModelManager}.
 */
@Path("/")
public interface M3Handler {

	static final String PARAM_HELP = "help";
	static final String PARAM_DB = "db";
	static final String PARAM_CLASSID = "classId";
	static final String PARAM_MODELID = "modelId";
	static final String PARAM_INDIVIDIALID = "individualId";
	static final String PARAM_PROPERTYID = "propertyId";
	static final String PARAM_FILLERID = "fillerId";
	static final String PARAM_FORMAT = "format";
	
	public static class M3Response {
		public static final String ERROR = "error";
		public static final String WARNING = "warning";
		public static final String SUCCESS = "success";
		public static final String INCONSISTENT = "inconsistent";
		public static final String MERGE = "merge";
		
		public final String message_type; // due to introspection, not camelCase here
		public String message = null;
		public Map<String, Object> commentary = null;
		public Object data;
		
		public M3Response(String messageType) {
			this.message_type = messageType;
		}
	}
	
	@Path("m3GenerateMolecularModel")
	@GET
	public M3Response m3GenerateMolecularModel(
			@QueryParam(PARAM_CLASSID) String classId,
			@QueryParam(PARAM_DB) String db,
			@DefaultValue("false") @QueryParam(PARAM_HELP) boolean help);

	@Path("m3preloadGaf")<commit_msg>message required<commit_after>package owltools.gaf.lego.server.handler;

import java.util.Map;

import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;

import owltools.gaf.lego.MolecularModelManager;

/**
 * Define methods and paths for the REST api of the {@link MolecularModelManager}.
 */
@Path("/")
public interface M3Handler {

	static final String PARAM_HELP = "help";
	static final String PARAM_DB = "db";
	static final String PARAM_CLASSID = "classId";
	static final String PARAM_MODELID = "modelId";
	static final String PARAM_INDIVIDIALID = "individualId";
	static final String PARAM_PROPERTYID = "propertyId";
	static final String PARAM_FILLERID = "fillerId";
	static final String PARAM_FORMAT = "format";
	
	public static class M3Response {
		public static final String ERROR = "error";
		public static final String WARNING = "warning";
		public static final String SUCCESS = "success";
		public static final String INCONSISTENT = "inconsistent";
		public static final String MERGE = "merge";
		
		public final String message_type; // due to introspection, not camelCase here
		public String message = null;
		public Map<String, Object> commentary = null;
		public Object data;
		
		public M3Response(String messageType) {
			this.message_type = messageType;
			this.message = messageType; // can't have a message type without a message
		}
		public M3Response(String messageType, String message) {
			this.message_type = messageType;
			this.message = message;
		}
	}
	
	@Path("m3GenerateMolecularModel")
	@GET
	public M3Response m3GenerateMolecularModel(
			@QueryParam(PARAM_CLASSID) String classId,
			@QueryParam(PARAM_DB) String db,
			@DefaultValue("false") @QueryParam(PARAM_HELP) boolean help);

	@Path("m3preloadGaf")
{'fraction_non_alphanumeric': 0.09415584415584416, 'fraction_numerical': 0.004427390791027155, 'mean_word_length': 4.8939130434782605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1894373', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1027, 'n_words': 313}