function createEdgesForVertex(targetVertexNodes, sourceVertexNode, toCategory, numberOfEdgesToCreate) {
		var edges = [];
		var availableTargetNodes = getNodesByCategory(targetVertexNodes,toCategory),
			availableTargetNodesCount= availableTargetNodes.length;

		if (numberOfEdgesToCreate>availableTargetNodesCount) {
			numberOfEdgesToCreate = availableTargetNodesCount;
		}
		var linkCount = 1;

		for (var index = 0; index<availableTargetNodes.length && linkCount<=numberOfEdgesToCreate; index++ ) {
			var node = availableTargetNodes[index],
			edge = {
                "id": "126f9-ivjc-2dx-35s" + index,
                "label": "EMAILS_TO",
                "type": "edge",
                "inVLabel": node.label,
                "outVLabel": sourceVertexNode.label,
                "inV": sourceVertexNode.id,
                "outV": node.id,
                "properties":  {
                    "Date": "02-13-2001 14:10:00 +0530",
                    "ccBcc": "TO",
                    "email_messageId": "802872"
                }
        	};
        	edges.push(edge);
        	linkCount++;
		}
		return edges;
	}
/*
	 *This creates Specified Number of Edges from toCategory types of vertexNodes
	*/
This creates Specified Number of Edges from toCategory types of vertexNodes
This creates Specified Number of Edges from toCategory types of vertexNodes
function createEdgesForVertex(targetVertexNodes, sourceVertexNode, toCategory, numberOfEdgesToCreate) {
		var edges = [];
		var availableTargetNodes = getNodesByCategory(targetVertexNodes,toCategory),
			availableTargetNodesCount= availableTargetNodes.length;
		if (numberOfEdgesToCreate>availableTargetNodesCount) {
			numberOfEdgesToCreate = availableTargetNodesCount;
		}
		var linkCount = 1;
		for (var index = 0; index<availableTargetNodes.length && linkCount<=numberOfEdgesToCreate; index++ ) {
			var node = availableTargetNodes[index],
			edge = {
                "id": "126f9-ivjc-2dx-35s" + index,
                "label": "EMAILS_TO",
                "type": "edge",
                "inVLabel": node.label,
                "outVLabel": sourceVertexNode.label,
                "inV": sourceVertexNode.id,
                "outV": node.id,
                "properties":  {
                    "Date": "02-13-2001 14:10:00 +0530",
                    "ccBcc": "TO",
                    "email_messageId": "802872"
                }
        	};
        	edges.push(edge);
        	linkCount++;
		}
		return edges;
	}
function createEdgesForVertex ( targetVertexNodes , sourceVertexNode , toCategory , numberOfEdgesToCreate ) { var edges = [ ] ; var availableTargetNodes = getNodesByCategory ( targetVertexNodes , toCategory ) , availableTargetNodesCount = availableTargetNodes . length ; if ( numberOfEdgesToCreate > availableTargetNodesCount ) { numberOfEdgesToCreate = availableTargetNodesCount ; } var linkCount = 1 ; for ( var index = 0 ; index < availableTargetNodes . length && linkCount <= numberOfEdgesToCreate ; index ++ ) { var node = availableTargetNodes [ index ] , edge = { "id" : "126f9-ivjc-2dx-35s" + index , "label" : "EMAILS_TO" , "type" : "edge" , "inVLabel" : node . label , "outVLabel" : sourceVertexNode . label , "inV" : sourceVertexNode . id , "outV" : node . id , "properties" : { "Date" : "02-13-2001 14:10:00 +0530" , "ccBcc" : "TO" , "email_messageId" : "802872" } } ; edges . push ( edge ) ; linkCount ++ ; } return edges ; }
This creates Specified Number of Edges from toCategory types of vertexNodes
This creates Specified Number of Edges from toCategory types of vertexNodes