// Path: src/main/java/org/cytoscape/rest/internal/resource/JsonTags.java
// public class JsonTags {
// 
// 	
// 	// For JSON
// 	
// 	public static final String TITLE = "title";
// 	public static final String PUBLIC = "public";
// 	public static final String MUTABLE = "mutable";
// 	public static final String PRIMARY_KEY = "primaryKey";
// 	public static final String ROWS = "rows";
// 	
// 	public static final String COUNT = "count";
// 	
// 	public static final String COLUMN_NAME = "name";
// 	public static final String COLUMN_NAME_OLD = "oldName";
// 	public static final String COLUMN_NAME_NEW = "newName";
// 	public static final String COLUMN_TYPE = "type";
// 	public static final String COLUMN_VALUES = "values";
// 	public static final String COLUMN_IMMUTABLE = "immutable";
// 	public static final String COLUMN_IS_LIST = "list";
// 	public static final String COLUMN_IS_LOCAL = "local";
// 	
// 	public static final String TABLE_FORMAT = "format";
// 	
// 	public static final String SOURCE = "source";
// 	public static final String TARGET= "target";
// 	public static final String DIRECTED = "directed";
// 	
// 	public static final String NETWORK_SUID = "networkSUID";
// 	
// 	public static final String URL = "url";
// 	public static final String FORMAT_EDGELIST = "edgelist";
// 	
// 	
// 	
// }


import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import javax.ws.rs.NotFoundException;
import org.cytoscape.model.CyColumn;
import org.cytoscape.model.CyIdentifiable;
import org.cytoscape.model.CyRow;
import org.cytoscape.model.CyTable;
import org.cytoscape.rest.internal.resource.JsonTags;
import com.fasterxml.jackson.databind.JsonNode;
package org.cytoscape.rest.internal.datamapper;





/**
 * Create & Update table objects.
 * 
 *
 */
public class TableMapper {

	public void updateColumnName(final JsonNode rootNode, final CyTable table) {
		final JsonNode currentNameTag = rootNode.get(JsonTags.COLUMN_NAME_OLD);
		if(currentNameTag == null) {
			throw new IllegalArgumentException("Original column name is missing.");
		}
		
// Path: src/main/java/org/cytoscape/rest/internal/resource/JsonTags.java
// public class JsonTags {
// 
// 	
// 	// For JSON
// 	
// 	public static final String TITLE = "title";
// 	public static final String PUBLIC = "public";
// 	public static final String MUTABLE = "mutable";
// 	public static final String PRIMARY_KEY = "primaryKey";
// 	public static final String ROWS = "rows";
// 	
// 	public static final String COUNT = "count";
// 	
// 	public static final String COLUMN_NAME = "name";
// 	public static final String COLUMN_NAME_OLD = "oldName";
// 	public static final String COLUMN_NAME_NEW = "newName";
// 	public static final String COLUMN_TYPE = "type";
// 	public static final String COLUMN_VALUES = "values";
// 	public static final String COLUMN_IMMUTABLE = "immutable";
// 	public static final String COLUMN_IS_LIST = "list";
// 	public static final String COLUMN_IS_LOCAL = "local";
// 	
// 	public static final String TABLE_FORMAT = "format";
// 	
// 	public static final String SOURCE = "source";
// 	public static final String TARGET= "target";
// 	public static final String DIRECTED = "directed";
// 	
// 	public static final String NETWORK_SUID = "networkSUID";
// 	
// 	public static final String URL = "url";
// 	public static final String FORMAT_EDGELIST = "edgelist";
// 	
// 	
// 	
// }


// Path: src/main/java/org/cytoscape/rest/internal/datamapper/TableMapper.java
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import javax.ws.rs.NotFoundException;
import org.cytoscape.model.CyColumn;
import org.cytoscape.model.CyIdentifiable;
import org.cytoscape.model.CyRow;
import org.cytoscape.model.CyTable;
import org.cytoscape.rest.internal.resource.JsonTags;
import com.fasterxml.jackson.databind.JsonNode;

package org.cytoscape.rest.internal.datamapper;





/**
 * Create & Update table objects.
 * 
 *
 */
public class TableMapper {

	public void updateColumnName(final JsonNode rootNode, final CyTable table) {
		final JsonNode currentNameTag = rootNode.get(JsonTags.COLUMN_NAME_OLD);
		if(currentNameTag == null) {
			throw new IllegalArgumentException("Original column name is missing.");
		}
		
		final JsonNode newNameTag = rootNode.get(JsonTags.COLUMN_NAME_NEW);