if ("add".equals(command)) {
if (sentence.length() > MAX_SENTENCE_LENGTH ||
data.getSentences().size() > MAX_DIAGRAM_LENGTH) {
return;
}
data.addSentence(sentence);
} else if ("delete".equals(command)) {
data.deleteSentence(sentence);
} else if ("moveup".equals(command)) {
data.moveUp(sentence);
} else if ("movedown".equals(command)) {