Package enzyme.database

Examples of enzyme.database.Doc


              //Ϊÿ���ĵ�����
              for (int i = 0; i < size; i++) {
               
                //���½���������
                progressBar.setValue(i + 1);
                Doc doc = (Doc) docs.get(i);
                docList.append(doc.getId() + ":"
                    + doc.getDocTitle() + "\n");
                progressBar.repaint();
                docListSP.getVerticalScrollBar().setValue(
                    docListSP.getVerticalScrollBar()
                        .getMaximum());
                progressBar.repaint();

               
                Document d = new Document();
                //Ϊ�ĵ���ÿ���ֶμ���������
                d.add(new Field("id", "" + doc.getId(),
                    Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                d.add(new Field("docAuthor",
                    doc.getDocAuthor() == null ? "" : doc
                        .getDocAuthor(),
                    Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                d.add(new Field("docContent", doc
                    .getDocContent() == null ? "" : doc
                    .getDocContent(), Field.Store.NO,
                    Field.Index.ANALYZED));
                d.add(new Field("docFilePath", doc
                    .getDocFilePath() == null ? "" : doc
                    .getDocFilePath(), Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                d.add(new Field("docKey",
                    doc.getDocKey() == null ? "" : doc
                        .getDocKey(), Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                d.add(new Field("docPublishDate", doc
                    .getDocPublishDate() == null ? "" : doc
                    .getDocPublishDate(), Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                d.add(new Field("docTitle",
                    doc.getDocTitle() == null ? "" : doc
                        .getDocTitle(),
                    Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                d.add(new Field("docTypeId", ""
                    + doc.getDocTypeId(), Field.Store.YES,
                    Field.Index.NOT_ANALYZED));
                writer.addDocument(d);

              }
              System.out.println(writer.docCount());
View Full Code Here


    return docs;
  }

  //����һ���ĵ�����
  private Doc createDoc(Document d) {
    Doc doc = new Doc();
    doc.setDocAuthor(d.getField("docAuthor").stringValue());
    doc.setDocFilePath(d.getField("docFilePath").stringValue());
    doc.setDocKey(d.getField("docKey").stringValue());
    doc.setDocPublishDate(d.getField("docPublishDate").stringValue());
    doc.setDocTitle(d.getField("docTitle").stringValue());
    doc.setDocTypeId(Long.parseLong(d.getField("docTypeId").stringValue()));
    doc.setId(Long.parseLong(d.getField("id").stringValue()));
    return doc;

  }
View Full Code Here

TOP

Related Classes of enzyme.database.Doc

Copyright © 2018 www.massapicom. 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.