Exemplo n.º 1
0
  private Syllable getSyllable(String syllableId) {
    Syllable syllable = new Syllable();
    syllable.setId(syllableId);
    syllable.setPattern(getPattern(syllableId));
    syllable.setLength(syllableId.length());

    return syllable;
  }
Exemplo n.º 2
0
 private void processSyllables(String[] wordSyllables) {
   for (String wordSyllable : wordSyllables) {
     Syllable syllable = getSyllable(wordSyllable);
     if (!syllableIds.contains(syllable.getId())) {
       syllables.add(syllable);
       syllableIds.add(syllable.getId());
       System.out.println("inserting syllable " + syllable.getId());
       syllableDao.save(syllable);
     }
   }
 }