Пример #1
0
 @Override
 protected void startElement() throws AnimoException, IOException {
     String prefix = reader.getPrefix();
     String name = reader.getLocalName();
     if ("ptrn".equals(prefix) && "language".equals(name)) {
         s.push(false);
     } else if ("have".equals(prefix) || "is".equals(prefix) || "ic".equals(prefix)) {
         builder.start(AN._);
             builder._(REF._, name.equals("name") ? "word" : name);
         s.push(true);
     } else {
         Statement s = Statements.relationshipType(prefix);
         if (s != null) {
             if (s instanceof DEF) {
                 builder.start(DEF._, name);
             } else if (s instanceof Instruction) {
                 builder.start(AN._);
                     builder._(REF._, prefix);
                     builder.start(AN._);
                         builder._(REF._, name);
                     builder.end();
             } else {
                 builder.start(s);
                     builder._(REF._, name);
             }
         } else {
             super.startElement();
         }
         this.s.push(true);
     }
 }
Пример #2
0
 @Override
 protected void endElement() throws AnimoException, IOException {
     if (s.pop()) {
         super.endElement();
     }
 }
Пример #3
0
 @Override
 public void build() throws Throwable {
     super.process();
 }