use of com.tyndalehouse.step.models.info.VocabInfo in project step by STEPBible.
the class ModuleController method translateToVocabInfo.
/**
* Copies over information.
*
* @param vocabResponse the vocab response, including the definitions and the mappings to their related words
* @param includeAllInfo true to include all information
* @return a list of infos
*/
private List<VocabInfo> translateToVocabInfo(final VocabResponse vocabResponse, final boolean includeAllInfo, final String userLanguage) {
final List<VocabInfo> morphologyInfos = new ArrayList<VocabInfo>(vocabResponse.getDefinitions().length);
EntityDoc[] definitions = vocabResponse.getDefinitions();
for (int i = 0; i < definitions.length; i++) {
EntityDoc d = definitions[i];
morphologyInfos.add(new VocabInfo(d, vocabResponse.getRelatedWords(), includeAllInfo, userLanguage));
}
return morphologyInfos;
}