Exemplo n.º 1
0
  public void parseCode() {

    // Parse all <code> and <parameter> elements
    List codeList = ParseUtils.parseDescendants(root, "code", idMap);
    Iterator i = codeList.iterator();
    while (i.hasNext()) {
      Element codeElt = (Element) i.next();
      String codeId = codeElt.getAttributeValue("id");
      if (objects.containsKey(codeId)) {
        System.out.println("Note: Shadowing definition of <code id=\"" + codeId + "\">");
      }
      objects.put(codeId, new Code(codeElt, idMap));
    }
  }
Exemplo n.º 2
0
  public static HMM parseHMM(Element hmmelt, TreeMap idMap, TreeMap objects) {

    HMM hmm = new HMM(hmmelt, idMap, objects);
    hmm.analyze(objects);
    objects.put(hmmelt.getAttributeValue("id"), hmm);
    return hmm;
  }