Examples of Document


Examples of com.haulmont.yarg.formatters.impl.xlsx.Document

        band1_1.addChild(band11_2);
        return band1_1;
    }

    private void compareFiles(String resultPath, String etalonPath) throws Docx4JException {
        Document result = Document.create(SpreadsheetMLPackage.load(new File(resultPath)));
        Document etalon = Document.create(SpreadsheetMLPackage.load(new File(etalonPath)));

        List<Document.SheetWrapper> resultWorksheets = result.getWorksheets();
        List<Document.SheetWrapper> etalonWorksheets = etalon.getWorksheets();

        for (int i = 0; i < resultWorksheets.size(); i++) {
            Document.SheetWrapper resultWorksheet = resultWorksheets.get(i);
            Document.SheetWrapper etalonWorksheet = etalonWorksheets.get(i);
View Full Code Here

Examples of com.hp.hpl.sparta.Document

    try {
      // find the node of source Pinyin system
      String xpathQuery1 =
          "//" + sourcePinyinSystem.getTagName() + "[text()='" + pinyinString + "']";

      Document pinyinMappingDoc = PinyinRomanizationResource.getInstance().getPinyinMappingDoc();

      Element hanyuNode = pinyinMappingDoc.xpathSelectElement(xpathQuery1);

      if (null != hanyuNode) {
        // find the node of target Pinyin system
        String xpathQuery2 = "../" + targetPinyinSystem.getTagName() + "/text()";
        String targetPinyinStrWithoutToneNumber = hanyuNode.xpathSelectString(xpathQuery2);
View Full Code Here

Examples of com.intellij.openapi.editor.Document

        return PomManager.getInstance(pProject).isValid(pFile.getUrl());
    }

    public FileEditor createEditor(final Project pProject, final VirtualFile pPomFile) {
        final FileDocumentManager filedocMgr = FileDocumentManager.getInstance();
        final Document document = filedocMgr.getDocument(pPomFile);
        final XmlFile xmlFile = PsiUtils.findXmlFile(pProject, document);

        return new PomFileEditor(new DefaultPsiProject(xmlFile));
    }
View Full Code Here

Examples of com.intersys.gds.Document

    Connection connection = new Connection();
    connection.connect();
   
    //2. Generate test data
    List<Document> worldJugs = new ArrayList<Document>();
    Document jug = null;
    Document location = null;
    for(int i=0; i<documentCount ; i++){
      jug = new Document();
      jug.put("jugVisit-" + i, new String("Date: " + Calendar.getInstance().getTime()));
      location = new Document();
      location.put("country", "(Axis-Of-Evil) - " + i);
      location.put("venue", "Hotel-" + i*3);
      jug.put("location", location);
      worldJugs.add(jug);
    }
    //3 TODO: Without schema you will get nulls instead of Exceptions.  Add exception/error notification.
    Document firstJUG = worldJugs.get(0);
    DocumentType jugType = DocumentType.createDocumentType("WorldJUGs", firstJUG);
    jugType.setReference("location", ElementType.TYPE_REFERENCE, "Location", "country");
    connection.saveDocumentType(jugType);
   
    Document jugLocation = (Document) firstJUG.get("location");
    DocumentType locationType = DocumentType.createDocumentType("Location", jugLocation);
    locationType.setReference("venue", ElementType.TYPE_BACK_REFERENCE, "WorldJUGs", "NONE");
    connection.saveDocumentType(locationType);
   
    //4.Create the db object handle
    DocumentMap dbDocHandle = connection.getDocumentMap("WorldJUGs");
   
    //5. Store the data in the database
    for(int j=0; j<documentCount; j++){
      Document ljug = worldJugs.get(j);
      dbDocHandle.store(Integer.toString(j), ljug);
    }
    //6. Close the connection
    connection.close();
  }
View Full Code Here

Examples of com.itedge.solutionmanager.domain.impl.Document

  @Override
  public Map<String,Object> loadTaskData(String taskId, Solution linkedSolution, Boolean forHistory) {
      AddDocumentationTaskData taskData = addDocumentationTaskDataService.findEntityByProcessTaskId(taskId);
      if (taskData == null) {
          taskData = new AddDocumentationTaskData()
          Document document = new Document();
          taskData.setDocument(document);
      }
      taskData.setTaskId(taskId);
      Map<String,Object> data = new HashMap<String,Object>();
      data.put("taskData", taskData);
View Full Code Here

Examples of com.itextpdf.text.Document

        Rectangle size = new Rectangle(pageSize);
        if (landscape) {
            size = new Rectangle(pageSize.rotate());
        }
        size.setBackgroundColor(new BaseColor(Lookup.getDefault().lookup(PreviewController.class).getModel().getBackgroundColor()));
        document = new Document(size);
        PdfWriter pdfWriter = PdfWriter.getInstance(document, stream);
        document.open();
        cb = pdfWriter.getDirectContent();
        cb.saveState();
View Full Code Here

Examples of com.jagpdf.Document

// ---------------------------------------------------------------------------
//             strings

    static void strings(String[] args)
    {
        Document doc = jagpdf.create_file(args[0] + "/jagpdf_doc_java_strings.pdf");
        doc.page_start(597.6, 848.68);
        Canvas canvas = doc.page().canvas();

        //[java_example_string
        /*` An example should make it clear. Let's load a standard ISO-8859-2
            encoded font. */
        Font helv = doc.font_load("standard; enc=iso-8859-2; name=Helvetica; size=24");
        canvas.text_font(helv);
        /*` One of the languages representable by this encoding is Czech. We can
          pass a Unicode string ['úplněk] (full moon). [lib] converts the string
          to ISO-8859-2 and it is shown correctly. */
        String full_moon_cze = "\u00fapln\u011bk";
        canvas.text(50, 800, full_moon_cze); // ok
        /*` If we pass Swedish ['fullmåne], letter ['å] will not be shown
         because ISO-8859-2 does not represent such character. We should have
         used ISO-8859-1 encoded font instead. */
        String full_moon_swe = "fullm\u00e5ne";
        canvas.text(50, 760, full_moon_swe); // wrong
        /*` Let's load a Unicode encoded TrueType font. */
        //<-
        /* //->
        Font dejavu = doc.font_load("enc=utf-8; file=DejaVuSans.ttf; size=24");
        //<- */
        String res_dir = testlib.getResourcesDir();
        String dejavu_file = res_dir + "/fonts/DejaVuSans.ttf";
        Font dejavu = doc.font_load("enc=utf-8; file=" + dejavu_file + "; size=24");
        //->
        canvas.text_font(dejavu);
        /*` Now we can mix Czech and Swedish and it will be shown correctly as
            [lib] converts the strings to UTF-8.*/
        canvas.text(50, 720, full_moon_swe);
        canvas.text(50, 680, full_moon_cze);
        //]

        doc.page_end();
        doc.finalize_doc();
    }
View Full Code Here

Examples of com.jgaap.util.Document

    probs[0] = 0.02874005; //Mary
    //R code : pnorm(80,30,sqrt(200),lower.tail=FALSE)*pnorm(20,70,sqrt(200))*.5
    probs[1] = 2.070124e-08; //Peter
    weka.core.Utils.normalize(probs);
   
    Document unknownDocument = new Document();
    unknownDocument.addEventSet(null, unknown);
   
    List<Document> knowns = new ArrayList<Document>();
    Document knownDocument1 = new Document();
    knownDocument1.setAuthor("Mary");
    knownDocument1.addEventSet(null, known1);
    knowns.add(knownDocument1);
    Document knownDocument2 = new Document();
    knownDocument2.setAuthor("Peter");
    knownDocument2.addEventSet(null, known2);
    knowns.add(knownDocument2);
    Document knownDocument3 = new Document();
    knownDocument3.setAuthor("Mary");
    knownDocument3.addEventSet(null, known3);
    knowns.add(knownDocument3);
    Document knownDocument4 = new Document();
    knownDocument4.setAuthor("Peter");
    knownDocument4.addEventSet(null, known4);
    knowns.add(knownDocument4);

    WEKANaiveBayes classifier = new WEKANaiveBayes();
    classifier.train(knowns);
    List<Pair<String, Double>> t = classifier.analyze(unknownDocument);
View Full Code Here

Examples of com.liferay.portal.kernel.search.Document

  @Override
  protected Document doGetDocument(Object obj) throws Exception {
   
    Guestbook guestbook = (Guestbook)obj;

    Document document = getBaseModelDocument(PORTLET_ID, guestbook);

    document.addDate(Field.MODIFIED_DATE, guestbook.getModifiedDate());
    document.addText(Field.TITLE, guestbook.getName());
    document.addKeyword(Field.GROUP_ID, getSiteGroupId(guestbook.getGroupId()));
    document.addKeyword(Field.SCOPE_GROUP_ID, guestbook.getGroupId());
   
    return document;
  }
View Full Code Here

Examples of com.liferay.portal.kernel.xml.Document

            if (_log.isDebugEnabled()) {
                _log.debug("Loading " + source);
            }
        }

        Document doc = _saxReader.read(is);

        Element root = doc.getRootElement();

        Iterator<Element> itr1 = root.elements("hint-collection").iterator();

        while (itr1.hasNext()) {
            Element hintCollection = itr1.next();
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.