示例#1
0
 public void handleElement(Element e) {
   // create family
   if (e.getName().equals("family")) {
     try {
       lexicon.add(new Family(e));
     } catch (RuntimeException exc) {
       System.err.println("Skipping family: " + e.getAttributeValue("name"));
       System.err.println(exc.toString());
     }
   }
   // save distributive attributes
   else if (e.getName().equals("distributive-features")) distrElt = e;
   // save licensing features
   else if (e.getName().equals("licensing-features")) licensingElt = e;
   // save relation sort order
   else if (e.getName().equals("relation-sorting")) relationSortingElt = e;
 }
示例#2
0
 public void handleElement(Element e) {
   // create morph item
   if (e.getName().equals("entry")) {
     try {
       morphItems.add(new MorphItem(e));
     } catch (RuntimeException exc) {
       System.err.println("Skipping morph item: " + e.getAttributeValue("word"));
       System.err.println(exc.toString());
     }
   }
   // create macro item
   else if (e.getName().equals("macro")) {
     try {
       macroItems.add(new MacroItem(e));
     } catch (RuntimeException exc) {
       System.err.println("Skipping macro item: " + e.getAttributeValue("name"));
       System.err.println(exc.toString());
     }
   }
 }