// Path: src/main/java/org/cytoscape/rest/internal/EdgeBundler.java
// public interface EdgeBundler {
// 	
// 	NetworkTaskFactory getBundlerTF();
// 
// }
// 
// Path: src/main/java/org/cytoscape/rest/internal/datamapper/MapperUtil.java
// public class MapperUtil {
// 
// 	public static final Class<?> getColumnClass(final String type) {
// 		if (type.equals(Double.class.getSimpleName())) {
// 			return Double.class;
// 		} else if (type.equals(Long.class.getSimpleName())) {
// 			return Long.class;
// 		} else if (type.equals(Integer.class.getSimpleName())) {
// 			return Integer.class;
// 		} else if (type.equals(Float.class.getSimpleName())) {
// 			return Float.class;
// 		} else if (type.equals(Boolean.class.getSimpleName())) {
// 			return Boolean.class;
// 		} else if (type.equals(String.class.getSimpleName())) {
// 			return String.class;
// 		} else if (type.equals(Number.class.getSimpleName())) {
// 			return Double.class;
// 		} else {
// 			return null;
// 		}
// 	}
// 	
// 	public static final Object getRawValue(final String queryString, Class<?> type) {
// 		Object raw = queryString;
// 
// 		if (type == Boolean.class) {
// 			raw = Boolean.parseBoolean(queryString);
// 		} else if (type == Double.class) {
// 			raw = Double.parseDouble(queryString);
// 		} else if (type == Integer.class) {
// 			raw = Integer.parseInt(queryString);
// 		} else if (type == Long.class) {
// 			raw = Long.parseLong(queryString);
// 		} else if (type == Float.class) {
// 			raw = Float.parseFloat(queryString);
// 		}
// 		return raw;
// 	}
// 	
// 	public static final Object getValue(final JsonNode value, final Class<?> type) {
// 		if (type == String.class) {
// 			return value.asText();
// 		} else if (type == Boolean.class || type.getSimpleName() == "boolean") {
// 			return value.asBoolean();
// 		} else if (type == Double.class || type.getSimpleName() == "double") {
// 			return value.asDouble();
// 		} else if (type == Integer.class || type.getSimpleName() == "int") {
// 			return value.asInt();
// 		} else if (type == Long.class || type.getSimpleName() == "long") {
// 			return value.asLong();
// 		} else if (type == Float.class || type.getSimpleName() == "float") {
// 			return value.asDouble();
// 		} else {
// 			return null;
// 		}
// 	}
// }


import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import javax.inject.Singleton;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.rest.internal.EdgeBundler;
import org.cytoscape.rest.internal.datamapper.MapperUtil;
import org.cytoscape.task.NetworkTaskFactory;
import org.cytoscape.view.layout.CyLayoutAlgorithm;
import org.cytoscape.view.layout.CyLayoutAlgorithmManager;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.view.vizmap.VisualStyle;
import org.cytoscape.work.TaskIterator;
import org.cytoscape.work.TaskMonitor;
import org.cytoscape.work.Tunable;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
package org.cytoscape.rest.internal.resource;





/**
 * 
 * Algorithmic resources.
 * Runs Cytoscape tasks, such as layouts or apply Style.
 * 
 */
@Singleton
@Path("/v1/apply")
public class AlgorithmicResource extends AbstractResource {

	@Context
	@NotNull
	private TaskMonitor headlessTaskMonitor;

	@Context
	@NotNull
	private CyLayoutAlgorithmManager layoutManager;

	@Context
	@NotNull
	private NetworkTaskFactory fitContent;

	@Context
	@NotNull
// Path: src/main/java/org/cytoscape/rest/internal/EdgeBundler.java
// public interface EdgeBundler {
// 	
// 	NetworkTaskFactory getBundlerTF();
// 
// }
// 
// Path: src/main/java/org/cytoscape/rest/internal/datamapper/MapperUtil.java
// public class MapperUtil {
// 
// 	public static final Class<?> getColumnClass(final String type) {
// 		if (type.equals(Double.class.getSimpleName())) {
// 			return Double.class;
// 		} else if (type.equals(Long.class.getSimpleName())) {
// 			return Long.class;
// 		} else if (type.equals(Integer.class.getSimpleName())) {
// 			return Integer.class;
// 		} else if (type.equals(Float.class.getSimpleName())) {
// 			return Float.class;
// 		} else if (type.equals(Boolean.class.getSimpleName())) {
// 			return Boolean.class;
// 		} else if (type.equals(String.class.getSimpleName())) {
// 			return String.class;
// 		} else if (type.equals(Number.class.getSimpleName())) {
// 			return Double.class;
// 		} else {
// 			return null;
// 		}
// 	}
// 	
// 	public static final Object getRawValue(final String queryString, Class<?> type) {
// 		Object raw = queryString;
// 
// 		if (type == Boolean.class) {
// 			raw = Boolean.parseBoolean(queryString);
// 		} else if (type == Double.class) {
// 			raw = Double.parseDouble(queryString);
// 		} else if (type == Integer.class) {
// 			raw = Integer.parseInt(queryString);
// 		} else if (type == Long.class) {
// 			raw = Long.parseLong(queryString);
// 		} else if (type == Float.class) {
// 			raw = Float.parseFloat(queryString);
// 		}
// 		return raw;
// 	}
// 	
// 	public static final Object getValue(final JsonNode value, final Class<?> type) {
// 		if (type == String.class) {
// 			return value.asText();
// 		} else if (type == Boolean.class || type.getSimpleName() == "boolean") {
// 			return value.asBoolean();
// 		} else if (type == Double.class || type.getSimpleName() == "double") {
// 			return value.asDouble();
// 		} else if (type == Integer.class || type.getSimpleName() == "int") {
// 			return value.asInt();
// 		} else if (type == Long.class || type.getSimpleName() == "long") {
// 			return value.asLong();
// 		} else if (type == Float.class || type.getSimpleName() == "float") {
// 			return value.asDouble();
// 		} else {
// 			return null;
// 		}
// 	}
// }


// Path: src/main/java/org/cytoscape/rest/internal/resource/AlgorithmicResource.java
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import javax.inject.Singleton;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.rest.internal.EdgeBundler;
import org.cytoscape.rest.internal.datamapper.MapperUtil;
import org.cytoscape.task.NetworkTaskFactory;
import org.cytoscape.view.layout.CyLayoutAlgorithm;
import org.cytoscape.view.layout.CyLayoutAlgorithmManager;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.view.vizmap.VisualStyle;
import org.cytoscape.work.TaskIterator;
import org.cytoscape.work.TaskMonitor;
import org.cytoscape.work.Tunable;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

package org.cytoscape.rest.internal.resource;





/**
 * 
 * Algorithmic resources.
 * Runs Cytoscape tasks, such as layouts or apply Style.
 * 
 */
@Singleton
@Path("/v1/apply")
public class AlgorithmicResource extends AbstractResource {

	@Context
	@NotNull
	private TaskMonitor headlessTaskMonitor;

	@Context
	@NotNull
	private CyLayoutAlgorithmManager layoutManager;

	@Context
	@NotNull
	private NetworkTaskFactory fitContent;

	@Context
	@NotNull
	private EdgeBundler edgeBundler;