Examples of Document


Examples of aQute.bnd.properties.Document

     * @throws CoreException
     */
    protected void processGeneratedProject(ProjectPaths projectPaths, BndEditModel bndModel, IJavaProject project, IProgressMonitor monitor) throws CoreException {
        SubMonitor progress = SubMonitor.convert(monitor, 3);

        Document document = new Document("");
        bndModel.saveChangesTo(document);
        progress.worked(1);

        ByteArrayInputStream bndInput;
        try {
            bndInput = new ByteArrayInputStream(document.get().getBytes("UTF-8"));
        } catch (UnsupportedEncodingException e) {
            return;
        }
        IFile bndBndFile = project.getProject().getFile(Project.BNDFILE);
        if (bndBndFile.exists()) {
View Full Code Here

Examples of buhi.Document

    return query.getResultList();
}

    @Override
    public void CreateVacation(Vacation vacation) {
        Document document = new Document();
        document.setName("consumption_vacation");
        document.setDate(vacation.getOrderDate());
        Consumption consumption = new Consumption();
        consumption.setDocumentFk(document);
        entityManagerBuhDb.persist(document);
        consumption.setTotal(vacation.getSalary());
        consumption.setTypeOfConsumption("vacation");
View Full Code Here

Examples of ca.carleton.gcrc.couch.app.Document

    ,AtlasProperties atlasProperties
    ,DocumentUpdateProcess updateProcess
    ) throws Exception {
   
    // Create _design/site document...
    Document doc = null;
    {
      List<FSEntry> mergedEntries = new Vector<FSEntry>();
     
      // htdocs from atlas project
      {
View Full Code Here

Examples of com.CompPad.model.Document

        // Get xMultiServiceFactory interface for document

        /* initialize the CompPad Document object */
        nResult=0;
        nError=0;
        document = new Document();


        /* get document url, and if it's file:// then strip this and the file name and
         * set that as the document working directory */
        String docURL = ((XModel)UnoRuntime.queryInterface(XModel.class, xTextDocArg)).getURL();
View Full Code Here

Examples of com.allanbank.mongodb.bson.Document

    }

        @Override
    @Suspendable
    public Document explain(final Aggregate.Builder query) throws MongoDbException {
        Document res = null;
        try {
            res = new FiberMongoCallback<Document>() {
                @Override
                protected void requestAsync() {
                    FiberMongoCollectionImpl.super.explainAsync(this, query);
View Full Code Here

Examples of com.aspose.words.Document

      // /* Info msg */
      // System.out.printf("Process request from : %s\n", request
      // .getRemoteAddr());
      /* Create a simple document */
      long start = System.currentTimeMillis();
      Document wordDoc = new Document();
      DocumentBuilder wordDocBuilder = new DocumentBuilder(wordDoc);
      // Add Header / Footer
      wordDocBuilder.getPageSetup().setDifferentFirstPageHeaderFooter(
          false);
      wordDocBuilder.getPageSetup().setOddAndEvenPagesHeaderFooter(false);
      wordDocBuilder.getPageSetup().setHeaderDistance(20);
      wordDocBuilder.getPageSetup().setFooterDistance(20);
      wordDocBuilder.moveToHeaderFooter(HeaderFooterType.HEADER_PRIMARY);
      wordDocBuilder.writeln("My HEADER");
      wordDocBuilder.moveToHeaderFooter(HeaderFooterType.FOOTER_PRIMARY);
      wordDocBuilder.writeln("My FOOTER");
      wordDocBuilder.moveToDocumentEnd();
      // Set font properties
      wordDocBuilder.setBold(true);
      wordDocBuilder.setItalic(true);
      // Add text
      wordDocBuilder.writeln("My Text");
      wordDocBuilder.writeln();
      // Add end footer note and foot note
      wordDocBuilder.insertFootnote(FootnoteType.ENDNOTE, "My End Note");
      wordDocBuilder
          .insertFootnote(FootnoteType.FOOTNOTE, "My Foot Note");
      wordDocBuilder.writeln();
      // Add hyperlink
      wordDocBuilder.insertHyperlink("LINK", "http://www.google.lu",
          false);
      wordDocBuilder.writeln();
      // Add a table
      wordDocBuilder.startTable();
      // --Row 1 with 2 cell
      Cell cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setVerticalAlignment(
          CellVerticalAlignment.CENTER);
      wordDocBuilder.writeln("Row 1 Cell 1 Text");
      cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setVerticalAlignment(
          CellVerticalAlignment.CENTER);
      wordDocBuilder.writeln("Row 1 Cell 2 Text");
      wordDocBuilder.endRow();
      // --Row 2 with 2 cell
      cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setVerticalAlignment(
          CellVerticalAlignment.BOTTOM);
      wordDocBuilder.writeln("Row 2 Cell 1 Text");
      cell = wordDocBuilder.insertCell();
      cell.getCellFormat()
          .setVerticalAlignment(CellVerticalAlignment.TOP);
      wordDocBuilder.writeln("Row 2 Cell 2 Text");
      wordDocBuilder.endRow();
      // --Row 3 with 3 cell merged
      cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setVerticalAlignment(
          CellVerticalAlignment.CENTER);
      cell.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
      cell.getCellFormat().setHorizontalMerge(CellMerge.FIRST);
      wordDocBuilder.writeln("Row 3 Cell 3 Text");
      cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setHorizontalMerge(CellMerge.PREVIOUS);
      wordDocBuilder.endRow();
      wordDocBuilder.endTable();
      // Add Comment
      Comment comment = new Comment(wordDoc);
      comment.setAuthor("D.Righetto");
      comment.getParagraphs().add(new Paragraph(wordDoc));
      comment.getFirstParagraph().getRuns().add(
          new Run(wordDoc, "My Comment text !!!"));
      wordDocBuilder.getCurrentParagraph().appendChild(comment);
      // Add break
      wordDocBuilder.insertBreak(BreakType.PAGE_BREAK);
      // Add image
      String imgUrl = "http://" + request.getServerName() + ":"
          + request.getServerPort() + request.getContextPath()
          + "/img/AsposeWords.gif";
      // System.out.printf("Insert image from : %s\n", imgUrl);
      wordDocBuilder.insertImage(imgUrl);
      System.out.printf("Document generated in %s ms\n", (System
          .currentTimeMillis() - start));

      /* Send document to client */
      response.setContentType("application/vnd.ms-word");
      response.addHeader("Content-Disposition",
          "inline;filename=myWordDocument.doc");
      wordDoc.save(response.getOutputStream(), SaveFormat.DOC);
      response.flushBuffer();
    } catch (Exception e) {
      throw new ServletException(e);
    }

View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.model.Document

            URI.create("http://localhost:" + port), "apikey"
        );

        UserModelId modelId = new UserModelId(new UserId("test"), "testGetDocument");
        DocumentId docId = new DocumentId(10);
        Document document = client.getDocument(new GetDocumentRequest(modelId, docId));

        Assert.assertNotNull(document);
        Assert.assertEquals(document.getId(), docId);
    }
View Full Code Here

Examples of com.btaz.datautil.xml.model.Document

     * @param captureContent capture content, if true capture the content within an element
     * @return <code>Document</code> captured XML model or null if there's no match
     */
    public Document read(String xmlPathQuery, boolean captureContent) {
        XmlPath xmlPath = new XmlPath(xmlPathQuery);
        Document doc = new Document();
        boolean captureXml = false;

        try {
            String localName;
            XmlPathElement element;
            XmlPath currentPath;
            while(reader.hasNext()) {
                int event = reader.next();
                switch(event) {
                    case XMLStreamConstants.START_ELEMENT:
                        // element
                        localName = reader.getLocalName();
                        List<XmlPathElementAttribute> attributes = getAttributes(reader);
                        element = new XmlPathElement(localName, attributes);

                        // set current path
                        elementPath.add(element);

                        // path match?
                        currentPath = new XmlPath(elementPath);
                        if(xmlPath.equals(currentPath)) {
                            // found the path
                            captureXml = true;
                        }

                        // capture XML?
                        if(captureXml) {
                            doc.addElement(element.toString());
                        }

                        // only capture start tag?
                        if(! captureContent && xmlPath.equals(currentPath)) {
                            return doc;
                        }

                        break;
                    case XMLStreamConstants.CHARACTERS:
                        // capture XML?
                        if(captureXml) {
                            String text = reader.getText();
                            text = text.replace("\n", " ");
                            text = text.replaceAll(" {2,}", " ");
                            text = text.replaceAll("&", "&amp;");
                            text = text.replaceAll("\"", "&quot;");
                            text = text.replaceAll("'", "&apos;");
                            text = text.replaceAll("<", "&lt;");
                            text = text.replaceAll(">", "&gt;");
                            text = text.trim();
                            if(text.length() > 0) {
                                doc.addContent(text);
                            }
                        }
                        break;
                    case XMLStreamConstants.END_ELEMENT:
                        // element
                        localName = reader.getLocalName();
                        element = new XmlPathElement(localName);

                        // capture XML?
                        if(captureXml) {
                            doc.endElement();
                        }

                        // path match?
                        currentPath = new XmlPath(elementPath);
                        if(xmlPath.equals(currentPath)) {
View Full Code Here

Examples of com.btaz.util.reader.xml.model.Document

     * @param captureContent capture content, if true capture the content within an element
     * @return <code>Document</code> captured XML model or null if there's no match
     */
    public Document read(String xmlPathQuery, boolean captureContent) {
        XmlPath xmlPath = new XmlPath(xmlPathQuery);
        Document doc = new Document();
        boolean captureXml = false;

        try {
            String localName;
            XmlPathElement element;
            XmlPath currentPath;
            while(reader.hasNext()) {
                int event = reader.next();
                switch(event) {
                    case XMLStreamConstants.START_ELEMENT:
                        // element
                        localName = reader.getLocalName();
                        List<XmlPathElementAttribute> attributes = getAttributes(reader);
                        element = new XmlPathElement(localName, attributes);

                        // set current path
                        elementPath.add(element);

                        // path match?
                        currentPath = new XmlPath(elementPath);
                        if(xmlPath.equals(currentPath)) {
                            // found the path
                            captureXml = true;
                        }

                        // capture XML?
                        if(captureXml) {
                            doc.addElement(element.toString());
                        }

                        // only capture start tag?
                        if(! captureContent && xmlPath.equals(currentPath)) {
                            return doc;
                        }

                        break;
                    case XMLStreamConstants.CHARACTERS:
                        // capture XML?
                        if(captureXml) {
                            String text = reader.getText();
                            text = text.replace("\n", " ");
                            text = text.replaceAll(" {2,}", " ");
                            text = text.replaceAll("&", "&amp;");
                            text = text.replaceAll("\"", "&quot;");
                            text = text.replaceAll("'", "&apos;");
                            text = text.replaceAll("<", "&lt;");
                            text = text.replaceAll(">", "&gt;");
                            text = text.trim();
                            if(text.length() > 0) {
                                doc.addContent(text);
                            }
                        }
                        break;
                    case XMLStreamConstants.END_ELEMENT:
                        // element
                        localName = reader.getLocalName();
                        element = new XmlPathElement(localName);

                        // capture XML?
                        if(captureXml) {
                            doc.endElement();
                        }

                        // path match?
                        currentPath = new XmlPath(elementPath);
                        if(xmlPath.equals(currentPath)) {
View Full Code Here

Examples of com.denimgroup.threadfix.data.entities.Document

   * @param extension
   * @return
   */
  @Override
  public Document retrieveByAppIdAndFilename(Integer appId, String filename, String extension) {
    Document retVal;
   
    retVal = (Document) sessionFactory
        .getCurrentSession()
        .createQuery(
            "from Document document "
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.