Package uk.ac.cam.ch.wwmm.ptclib.scixml

Examples of uk.ac.cam.ch.wwmm.ptclib.scixml.SciXMLDocument.addPara()


    for(String id : ontology.getTerms().keySet()) {
      OntologyTerm term = ontology.getTerms().get(id);
      //SciXMLDocument sxd = new SciXMLDocument();
      //sxd.setTitle(term.getName());
      sxd.getNewDiv(term.getId());
      sxd.addPara().appendChild(term.getName());
     
      if(term.getDef() != null) {
        sxd.addPara().appendChild(term.getDef());
        if(term.getDef().matches(".*[Rr]eaction.*")) reacts++;
      }
View Full Code Here


      //sxd.setTitle(term.getName());
      sxd.getNewDiv(term.getId());
      sxd.addPara().appendChild(term.getName());
     
      if(term.getDef() != null) {
        sxd.addPara().appendChild(term.getDef());
        if(term.getDef().matches(".*[Rr]eaction.*")) reacts++;
      }
      termID++;
      if(termID % 100 == 0) {
        System.out.println(termID);
View Full Code Here

                XOMTools.removeElementPreservingText(e);
              }
            }
          }
         
          Element p = doc.addPara();
          Element a = doc.makeLink(request.getRequestURI() + "?toscrapbook=full", "Put in scrapbook");
          p.appendChild(a);
          p.appendChild(" ");
          a = doc.makeLink(request.getRequestURI() + "?toscrapbook=noexperimental", "Put in scrapbook (No experimental or captions)");
          p.appendChild(a);
View Full Code Here

        return;
      }
     
      SciXMLDocument doc = new SciXMLDocument();
      doc.addServerProcessingInstructions();
      Element para = doc.addPara();
      para.appendChild(doc.makeLink("/ViewPaper" + request.getPathInfo() + "?reprocess", "Reprocess this directory"));
     
      Element list = doc.addList();
     
      File [] children = f.listFiles();
View Full Code Here

    doc.setTitle("Search Results");
    int hitsTotal = tdc.getTotalHits();
    if(lq.size + lq.skip > hitsTotal) {
      lq.size = hitsTotal - lq.skip;
    }
    Element p = doc.addPara();
    p.appendChild("Results " + Integer.toString(lq.skip + 1) + " to " + Integer.toString(lq.size + lq.skip) + " of " + Integer.toString(hitsTotal) + ": ");
    if(lq.skip > 0) p.appendChild(doc.makeLink(lq.getQueryURL(Math.max(lq.skip - lq.size, 0), lq.size), "prev"));
    p.appendChild(" ");
    if(lq.size + lq.skip < hitsTotal) p.appendChild(doc.makeLink(lq.getQueryURL(lq.skip + lq.size, lq.size), "next"));
    TopDocs td = tdc.topDocs();
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.