Ejemplo n.º 1
0
  private Word getWord(String wordSyllables) {
    Word word = new Word();
    word.setSyllables(wordSyllables);
    String wordId = wordSyllables.replace("-", "");

    word.setId(wordId);
    word.setLength(wordId.length());
    return word;
  }
Ejemplo n.º 2
0
 private void processWords(String wordId) {
   System.out.println("Processing word: " + wordId);
   Word word = getWord(wordId);
   if (!wordIds.contains(word.getId())) {
     words.add(word);
     wordIds.add(word.getId());
     wordDao.save(word);
   }
 }