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

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


      }

      Element a = doc.makeLink("Search?settoscrap", "ScrapBook");
      list.appendChild(doc.makeListItem(a));

      a = doc.makeLink("Search?indexall", "Index entire workspace");
      list.appendChild(doc.makeListItem(a));

      doc.addServerProcessingInstructions();
      response.setContentType("application/xml");
      new Serializer(response.getOutputStream()).write(doc);
View Full Code Here


      Element list = doc.addList();
      File [] dirs = new File(Oscar3Props.getInstance().workspace, "corpora").listFiles();
      for(int i=0;i<dirs.length;i++) {
        String name = dirs[i].getName();
        if(dirs[i].isDirectory() && !name.startsWith("."))  {
          Element a = doc.makeLink("TermSimilarity?setcorpus=" + URLEncoder.encode(name, "UTF-8"), name);
          list.appendChild(doc.makeListItem(a));
        }
      }

      //Element a = doc.makeLink("Search?settoscrap", "ScrapBook");
View Full Code Here

              }
            }
          }
         
          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);
          p.appendChild(" ");
View Full Code Here

         
          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);
          p.appendChild(" ");
          a = doc.makeLink(request.getRequestURI() + "?toscrapbook=nocaptions", "Put in scrapbook (No captions)");
          p.appendChild(a);
          try {
View Full Code Here

          p.appendChild(a);
          p.appendChild(" ");
          a = doc.makeLink(request.getRequestURI() + "?toscrapbook=noexperimental", "Put in scrapbook (No experimental or captions)");
          p.appendChild(a);
          p.appendChild(" ");
          a = doc.makeLink(request.getRequestURI() + "?toscrapbook=nocaptions", "Put in scrapbook (No captions)");
          p.appendChild(a);
          try {
            int paperId = ResultDbReader.getInstance().getPaperId(f);
            if(paperId > -1) {
              p.appendChild(" ");
View Full Code Here

          p.appendChild(a);
          try {
            int paperId = ResultDbReader.getInstance().getPaperId(f);
            if(paperId > -1) {
              p.appendChild(" ");
              a = doc.makeLink("/SciBorg/papers/" + paperId, " SciBorg Paper " + paperId);           
              p.appendChild(a);
            }           
          } catch (RuntimeException e) {
            //e.printStackTrace();
          }
View Full Code Here

      }
     
      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();
      for(int i=0;i<children.length;i++) {
View Full Code Here

      Element list = doc.addList();
     
      File [] children = f.listFiles();
      for(int i=0;i<children.length;i++) {
        if(children[i].isDirectory()) {
          Element a = doc.makeLink("./" + children[i].getName());
          File cm = new File(children[i], "markedup.xml");
          if(!cm.exists()) cm = new File(children[i], "source.xml");
          if(cm.exists()) {
            try {
              Nodes nn = new Builder().build(cm).query(XMLStrings.getInstance().TITLE_XPATH, XMLStrings.getInstance().getXpc());
View Full Code Here

    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();
    for(int i=lq.skip;i<lq.skip+lq.size;i++) {
     
View Full Code Here

    }
    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();
    for(int i=lq.skip;i<lq.skip+lq.size;i++) {
     
      File f = new File(ir.document(td.scoreDocs[i].doc).get("filename"));
      Element body = doc.getBody();
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.