if (graphElementDeleted != null) {
if (keysToDelete != null && keysToDelete.length() > 0) {
// just delete keys from the element
for (int ix = 0; ix < keysToDelete.length(); ix++) {
graphElementDeleted.removeProperty(keysToDelete.optString(ix));
}
} else {
// delete the whole element
if (elementType.equals(Tokens.VERTEX)) {
graph.removeVertex((Vertex) graphElementDeleted);