import org.javarosa.core.model.GroupDef; //导入方法依赖的package包/类
public String getRepeatText(String typeKey) {
GroupDef g = (GroupDef)element;
if (!g.isRepeat()) {
throw new RuntimeException("not a repeat");
}
String title = getLongText();
int count = getNumRepetitions();
String caption = null;
if ("mainheader".equals(typeKey)) {
caption = g.mainHeader;
if (caption == null) {
return title;
}
} else if ("add".equals(typeKey)) {
caption = g.addCaption;
if (caption == null) {
return "Add another " + title;
}
} else if ("add-empty".equals(typeKey)) {
caption = g.addEmptyCaption;
if (caption == null) {
captio