Examples of Document


Examples of org.apache.lucene.document.Document

    /**
     * ��������
     */
    protected static int addIndex() throws IOException {
    Document doc = new Document();
    doc.add(new Field("id", "1", Field.Store.YES, Field.Index.UN_TOKENIZED));
    doc.add(new Field("author", "����IBM OSIһһ����", Field.Store.YES, Field.Index.TOKENIZED));
    doc.add(new Field("time", Long.toString(System.currentTimeMillis()), Field.Store.YES, Field.Index.UN_TOKENIZED));
    doc.add(new Field("content", "��֪����ʲôʱ��ʼ����ʲô�������涼�и����ڣ��ﵶ�����ڣ����ͷ����ڣ�������ֽ������ڣ��ҿ�ʼ���ɣ�����������ϣ�����ʲô�����Dz�����ڵģ�", Field.Store.NO, Field.Index.TOKENIZED));
    IndexWriter writer = getWriter();
    try {
        writer.addDocument(doc);
        writer.optimize();
    }finally {
View Full Code Here

Examples of org.apache.metamodel.data.Document

        }

        final Row row = _rowIterator.next();
        final JsonNode docNode = row.getDocAsNode();
        final Map<String, Object> map = CouchDbUtils.jsonNodeToMap(docNode);
        return new Document(_databaseName, map, row);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.text.Document

            this.removed = removed;
        }

        @Override
        public void undo() {
            Document tmp = new Document();
            for (int i=0; i<removed.getLength(); i++) {
                tmp.add(removed.get(i));
            }
            node.insertRange(tmp, offset);
        }
View Full Code Here

Examples of org.apache.poi.hslf.record.Document

     * @return the picture data for this picture.
     */
    public PictureData getPictureData(){
        SlideShow ppt = getSheet().getSlideShow();
        PictureData[] pict = ppt.getPictureData();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);

        List lst = bstore.getChildRecords();
        int idx = getPictureIndex()-1;
        EscherBSERecord bse = (EscherBSERecord)lst.get(idx);
View Full Code Here

Examples of org.apache.rat.api.Document

     * @param file the file to be reported on
     * @throws RatException
     */
    private void report(final RatReport report, byte[] contents, File file) throws RatException {

        Document document = new ArchiveEntryDocument(file, contents);
        report.report(document);

    }
View Full Code Here

Examples of org.apache.tapestry.dom.Document

    public void submit_aso()
    {
        String appPackage = "org.apache.tapestry.integration.app2";
        String appName = "";
        _tester = new PageTester(appPackage, appName);
        Document doc = _tester.renderPage("TestPageForASO");
        assertTrue(doc.toString().contains("bar"));
    }
View Full Code Here

Examples of org.apache.tapestry5.dom.Document

                {
                    setupRequestFromLink(link);
                    continue;
                }

                Document result = response.getRenderedDocument();

                if (result == null)
                    throw new RuntimeException(String.format("Render of page '%s' did not result in a Document.",
                            pageName));
View Full Code Here

Examples of org.apache.tuscany.sca.domain.search.impl.Document

     * @param key the {@link Document} key
     * @return the {@link Document} object mapped from the key
     */
    @Override
    public Document get(Object key) {
        Document doc = super.get(key);

        if (doc == null) {
            doc = new Document();
            put(key, doc);

        }

        return doc;
View Full Code Here

Examples of org.apache.type_test.types1.Document

    @Test
    public void testDocument() throws Exception {
        if (!shouldRunTest("Document")) {
            return;
        }
        Document x = new Document();
        x.setValue("content-x");
        x.setID("Hello There");
        Document yOrig = new Document();
        yOrig.setID("Cheerio");
        yOrig.setValue("content-y");

        Holder<Document> y = new Holder<Document>(yOrig);
        Holder<Document> z = new Holder<Document>();

        Document ret;
        if (testDocLiteral) {
            ret = docClient.testDocument(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testDocument(x, y, z);
        } else {
            ret = rpcClient.testDocument(x, y, z);
        }
        if (!perfTestOnly) {
            equals("testDocument(): Incorrect value for inout param", x, y.value);
            equals("testDocument(): Incorrect value for out param", yOrig, z.value);
            equals("testDocument(): Incorrect return value", x, ret);
        }

        x = new Document();
        yOrig = new Document();
        x.setValue("content-x");
        yOrig.setValue("content-y");
        x.setID(null);
        yOrig.setID(null);
        y = new Holder<Document>(yOrig);
        z = new Holder<Document>();

        if (testDocLiteral) {
            ret = docClient.testDocument(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testDocument(x, y, z);
        } else {
            ret = rpcClient.testDocument(x, y, z);
        }
        if (!perfTestOnly) {
            equals("testDocument(): Incorrect value for inout param", x, y.value);
            equals("testDocument(): Incorrect value for out param", yOrig, z.value);
            equals("testDocument(): Incorrect return value", x, ret);
            assertNull(y.value.getID());
            assertNull(ret.getID());
        }
    }
View Full Code Here

Examples of org.asciidoctor.ast.Document

    private DocumentHeader toDocumentHeader(DocumentRuby documentRuby) {
        Map<Object, Object> opts = new HashMap<Object, Object>();
        opts.put("partition", true);

        Document document = new Document(documentRuby, rubyRuntime);

        return DocumentHeader.createDocumentHeader((Title) document.doctitle(opts), documentRuby.title(),
                documentRuby.getAttributes());
    }
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.