Пример #1
0
 public String getPrevID() {
   for (Interpretation ip = getParent(); ip != null; ip = ip.getParent()) {
     if (ip.isSectionHead()) {
       return ip.getID();
     }
   }
   return "";
 }
Пример #2
0
 public Interpretation getSectionHeadInterpretation() {
   Interpretation ip;
   for (ip = this; ; ip = ip.getParent()) {
     if (ip == null) return null;
     if (ip.isSectionHead()) break;
   }
   return ip;
 }
Пример #3
0
  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();
  }
Пример #4
0
 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;
 }