Package org.sf.mustru.utils

Examples of org.sf.mustru.utils.DbTools.fetch()


     retv.append("Document: " + i + Constants.NEWLINE);
     explanation = is.explain(query, hits.id(i))
     Document doc = hits.doc(i);
     String key = doc.get("key");
     DatabaseEntry data = new DatabaseEntry();
     if (!dbt.fetch(key, data)) continue LOOP;

     //*-- extract the text
     IndexableDoc idoc = new IndexableDoc();
     idoc = (IndexableDoc) idoc.getBdbBinding().entryToObject(data);
     String line= idoc.getContents().toString();
View Full Code Here


    String ftype = doc.get("type");
    DatabaseEntry data = new DatabaseEntry();

    String dbname = (ftype.equalsIgnoreCase("email")) ? Constants.EXT_MESSAGES_DB: Constants.EXT_FILES_DB;
    dbt.openDB(dbname, true, false); //*-- no create and no dups            
    dbt.fetch(key, data);
    dbt.closeDB();

    //*-- use the type of the document to create a doc instance of the specified type
    String docClass = dprops.getProperty(ftype);
    if ( (docClass == null) || (docClass.equals("")) ) docClass = "org.sf.mustru.docs.TextDoc";
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.