int db_id_edge = currStatement.columnInt(0);
String id_edge = currStatement.columnString(1);
int db_source = currStatement.columnInt(2);
int db_target = currStatement.columnInt(3);
if(vertexId.contains(db_source) && vertexId.contains(db_target)) {
StorableEdge e = new StorableEdge(db_id_edge, mapVertexes.get(db_source), mapVertexes.get(db_target), id_edge);
edges.add(e);
//add edge attributes
request.setLength(0);
request.append("select s1.db_id, s1.name, s1.value, s1.value_type from attribute s1, com_edge_attribute s2 where s1.db_id = s2.db_id_attribute and s2.db_id_edge = ");
request.append(db_id_edge);
request.append(";");
SQLiteStatement resultAttribute = connection.prepare(request.toString(), false);
while (resultAttribute.step()) {
int db_id_attr = resultAttribute.columnInt(0);
String name_attr = resultAttribute.columnString(1);
String value_attr = resultAttribute.columnString(2);
String type_attr = resultAttribute.columnString(3);
StorableAttribute attr = new StorableAttribute(db_id_attr, name_attr, value_attr,
type_attr);
e.addStorableAttribute(attr);
}
}
}
StorableSubGraph ssg = new StorableSubGraph(db_id_sg, id_sg, name_sg, vertexes, edges, direct_sg);
return(ssg);