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

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


        }
        File outDir = new File(sxDir, i + "");
        outDir.mkdir();
        File outFile = new File(outDir, "markedup.xml");
        new Serializer(new FileOutputStream(outFile)).write(sxd);
        Nodes n = sxd.query("//ne");
        for(int j=0;j<n.size();j++) {
          XOMTools.removeElementPreservingText((Element)n.get(j));
        }
        outFile = new File(outDir, "source.xml");
        new Serializer(new FileOutputStream(outFile)).write(sxd);
View Full Code Here


          response.getWriter().write("Paper added OK");
        } else {
          SciXMLDocument doc = SciXMLDocument.makeFromDoc(new Builder().build(markedup));
          if(request.getParameter("minConf") != null) {
            double minConf = Double.parseDouble(request.getParameter("minConf"));
            Nodes n = doc.query("//ne[@confidence]");
            for(int i=0;i<n.size();i++) {
              Element e = (Element)n.get(i);
              double conf = Double.parseDouble(e.getAttributeValue("confidence"));
              if(conf < minConf) {
                XOMTools.removeElementPreservingText(e);
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.