Examples of addDocument()


Examples of org.internna.iwebmvc.model.core.MultiDocument.addDocument()

                        Document d = it.next();
                        if (doc.substring(1).equals(d.getUri())) it.remove();
                    }
                } else {
                    Document document = getDocument(doc);
                    if (document != null) docs.addDocument(document);
                }
            }
        }
        setValue(docs);
    }
View Full Code Here

Examples of org.openoffice.xmerge.ConvertData.addDocument()

        // Get the number of sheets in the workbook
        // This will equal the number of PDBs we need
        ConvertData cd = new ConvertData();
    Workbook wb = ((PocketExcelEncoder) encoder).getWorkbook();
    cd.addDocument(wb);

        return cd;
    }
   
View Full Code Here

Examples of org.sindice.siren.demo.SimpleIndexer.addDocument()

      final LineIterator it = FileUtils.lineIterator(BNB_PATH);
      while (it.hasNext()) {
        final String id = Integer.toString(counter++);
        final String content = (String) it.next();
        logger.info("Indexing document {}", id);
        indexer.addDocument(id, content);
      }
      LineIterator.closeQuietly(it);
      logger.info("Commiting all pending documents");
      indexer.commit();
    }
View Full Code Here

Examples of org.springmodules.lucene.index.core.DefaultLuceneIndexTemplate.addDocument()

    try {
      resourceManager.initializeResources(definition);
     
      Document document = new Document();
      document.add(new Field("id", "1", Field.Store.YES, Field.Index.UN_TOKENIZED));
      template.addDocument(document);
      template.addDocument(document);
      template.addDocument(document);
      template.optimize();
    } finally {
      resourceManager.releaseResources();
View Full Code Here

Examples of org.springmodules.lucene.index.factory.LuceneIndexWriter.addDocument()

      Document document = new Document();
      document.add(new Field("id", "1", Field.Store.YES, Field.Index.UN_TOKENIZED));
      document.add(new Field("field", "a sample", Field.Store.YES, Field.Index.TOKENIZED));
      document.add(new Field("filter", "a sample filter", Field.Store.YES, Field.Index.TOKENIZED));
      document.add(new Field("sort", "2", Field.Store.YES, Field.Index.UN_TOKENIZED));
      indexWriter.addDocument(document);
    } catch(Exception ex) {
    } finally {
      doCloseIndexWriter(indexWriter);
    }
  }
View Full Code Here

Examples of org.waveprotocol.box.common.comms.WaveletSnapshot.addDocument()

    for (ParticipantId participant : wavelet.getParticipants()) {
      builder.addParticipantId(participant.toString());
    }
    for (String id : wavelet.getDocumentIds()) {
      ReadableBlipData data = wavelet.getDocument(id);
      builder.addDocument(serializeDocument(data));
    }

    builder.setVersion(WaveletOperationSerializer.serialize(hashedVersion));
    builder.setLastModifiedTime(wavelet.getLastModifiedTime());
    builder.setCreator(wavelet.getCreator().getAddress());
View Full Code Here

Examples of org.xapian.WritableDatabase.addDocument()

            String term = args[x];
            Document doc = new Document();
            doc.addValue(0, term);

            doc.addTerm(term);
            db.addDocument(doc);
        }

        // make sure to commit the database so the documents get written to disk
        db.commit();
    }
View Full Code Here

Examples of owlsmx.Indexer.SimpleIndex.addDocument()

public static void main(String[] args) {   
    String test = "and([prime-http://www.develin.de/owl#DieselFZ,and([all(http://www.develin.de/owl#faehrtMit,and([prime-http://www.develin.de/owl#Diesel,http://www.develin.de/owl#Krafstoff])),and([prime-http://www.develin.de/owl#KFZ,and([and([and([and([all(http://www.develin.de/owl#faehrtAuf,and([prime-http://www.develin.de/owl#Rad,_TOP_])),all(http://www.develin.de/owl#angetriebenDurch,and([prime-http://www.develin.de/owl#Motor,_TOP_]))]),all(http://www.develin.de/owl#moeglicherUntergrund,and([prime-http://www.develin.de/owl#Strasse,_TOP_]))]),all(http://www.develin.de/owl#faehrtMit,and([prime-http://www.develin.de/owl#Kraftstoff,_TOP_]))]),and([prime-http://www.develin.de/owl#FZ,_TOP_])])])])])";
    Map pc = getPrimitiveConcepts(test);
    CollectionUtils.print(pc);
    SimpleIndex index = SimpleIndex.instanceOf();
    index.addDocument("DieselFZ",pc);

    if (index.getIDF("_TOP_")==0.2)
        System.out.println("IDF of _TOP_: 0.2 ");
    else
        System.out.println("Miscalculated IDF of _TOP_ it should be 0.2 but is " + index.getIDF("_TOP_"));
View Full Code Here

Examples of uk.ac.ucl.panda.indexing.io.IndexWriter.addDocument()

          new PorterStemAnalyzer(), true);
      writer.setUseCompoundFile(false);
     
     long start = new Date().getTime();
       while ((doc = docMaker.makeDocument()) != null) {
         writer.addDocument(doc);// add Document to index   
       }

   
   
    int numIndexed = writer.docCount();
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.