public Interpretation getEffectiveInterpretation() { Interpretation ip = getSectionHeadInterpretation(); if (ip == null) return null; if (ip.isUnwrap()) return null; if (ip.isDispatch()) return ip; for (ip = ip.getParent(); ip != null; ip = ip.getParent()) { if (ip.isDispatch()) return ip; if (ip.isAttachPlaceHolder()) return null; } return null; }
public String getPrevID() { for (Interpretation ip = getParent(); ip != null; ip = ip.getParent()) { if (ip.isSectionHead()) { return ip.getID(); } } return ""; }
public Interpretation getSectionHeadInterpretation() { Interpretation ip; for (ip = this; ; ip = ip.getParent()) { if (ip == null) return null; if (ip.isSectionHead()) break; } return ip; }
private String generateID() { StringBuffer buf = new StringBuffer(); for (Interpretation ip = this; ip != null; ip = ip.getParent()) { if (!ip.isSectionHead()) continue; if (buf.length() > 0) buf.insert(0, " "); String name = ip.action.getName(); buf.insert(0, name); } return buf.toString(); }