Examples of deTagDocument()


Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

    XMLInserter xi = new XMLInserter(para, "a", "c");
       
    Element ne = new Element("ne");
    ne.addAttribute(new Attribute("type", type));
    xi.insertElement(ne, start, end);
    xi.deTagDocument();
    writeScrapBook();
  }
 
  public void moveNe(String sid, String start, String end, String neid) throws Exception {
    Element para = (Element)doc.query("//snippet[@id='" + sid + "']").get(0).getParent();
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

    Element ne = (Element)n.get(Integer.parseInt(neid));
    XOMTools.removeElementPreservingText(ne);

    XMLInserter xi = new XMLInserter(para, "a", "c");   
    xi.insertElement(ne, start, end);
    xi.deTagDocument();
    writeScrapBook();   
  }
 
  public void addSourceDoc(Document sourceDoc) throws Exception {
    File sourceFile = new File(fileDir, "source.xml");
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

      Nodes neNodes = snippet.query(".//ne");
      for(int j=0;j<neNodes.size();j++) {
        xi.insertTaggedElement((Element)neNodes.get(j));
      }
      xst.deTagDocument();
      xi.deTagDocument();
      } catch (Exception e) {
       
      }
    }
  }
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

      Element p1 = (Element)p1n.get(i);
      Element p2 = (Element)p2n.get(i);
      XMLInserter xi = new XMLInserter(p1, "a", "b");
      XMLSpanTagger.tagUpDocument(p2, "b");
      xi.incorporateElementsFromRetaggedDocument(p2, "b");
      xi.deTagDocument();
      System.out.println(p1.toXML());

      Nodes en = p1.query("ne/ne");
      for(int j=0;j<en.size();j++) {
        XOMTools.removeElementPreservingText((Element)en.get(j));
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

          Element ne = new Element("ne");
          ne.addAttribute(new Attribute("type", "GENE"));
          ne.appendChild(g.contents);
          xi.insertElement(ne, g.start, g.end);
        }
        xi.deTagDocument();
      }
      sentenceElems.add(p);
      //System.out.println(p.toXML());
    }
   
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

                XMLInserter xi = new XMLInserter(para, "a", "c");

                Element ne = new Element("ne");
                ne.addAttribute(new Attribute("type", type));
                xi.insertElement(ne, start, end);
                xi.deTagDocument();
                writeScrapBook();
        }

        public void moveNe(String sid, String start, String end, String neid)
                        throws Exception {
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

                Element ne = (Element) n.get(Integer.parseInt(neid));
                XOMTools.removeElementPreservingText(ne);

                XMLInserter xi = new XMLInserter(para, "a", "c");
                xi.insertElement(ne, start, end);
                xi.deTagDocument();
                writeScrapBook();
        }

        public void addSourceDoc(Document sourceDoc) throws Exception {
                File sourceFile = new File(fileDir, "source.xml");
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

      Nodes neNodes = snippet.query(".//ne");
      for(int j=0;j<neNodes.size();j++) {
        xi.insertTaggedElement((Element)neNodes.get(j));
      }
      xst.deTagDocument();
      xi.deTagDocument();
      } catch (Exception e) {
       
      }
    }
  }
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

        " +++*<d /><w>**+++</w> +++*<d><e>*</e></d>*+++ </a>");
    XMLInserter xi = new XMLInserter(baselineXMLCopy, "a", "c");
    XMLSpanTagger.tagUpDocument(newXML, "b");
    xi.incorporateElementsFromRetaggedDocument(newXML, "b");
   
    xi.deTagDocument();   
    assertEquals("Insertion goes in OK", expectedOut, baselineXMLCopy.toXML());
  }

}
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.xml.XMLInserter.deTagDocument()

          if(n.size() > 0) System.err.println(n.get(0).getValue());
          continue;         
        }
      }
    }
    xi.deTagDocument();
   
    Nodes n = safDoc.query("//cmlPile");
    if(n.size() > 0) {
      resultsDoc.getRootElement().appendChild(n.get(0).copy());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.