Package net.fp.rp.search.mid.feedback

Examples of net.fp.rp.search.mid.feedback.DocumentFeedback


            logger.info(
                "Document feedback - background process for score calculation");

            try {
                //convert to feedback document
                DocumentFeedback feedback = (DocumentFeedback) advice;

                //update the document score
                PluginManager.getCategoryStores().updateDocumentDirectScore(feedback.getCategoryName(),
                    feedback.getDocumentID(), feedback.getScore());
            } catch (RpException e) {
                logger.warn("Exception occured in document feedback process", e);
            }
        } else if (advice instanceof CategoryFeedback) {
            logger.info(
                "Category feedback - background process for score calculation");

            try {
                //convert to feedback category
                CategoryFeedback feedback = (CategoryFeedback) advice;

                //update the category score
                PluginManager.getCategoryStores().updateCategoryScore(feedback.getCategoryName(),
                    feedback.getScore());
            } catch (RpException e) {
                logger.warn("Exception occured in category feedback process", e);
            }
        }
    }
View Full Code Here


                                              .getObject().toString();
                        String summary = node.getProperty(RP.summary).getObject()
                                            .toString();
                        logger.debug("Feedback document constructed");

                        return new DocumentFeedback(Integer.valueOf(score)
                                                           .intValue(), id,
                            categName, summary);
                    } else if (type.equalsIgnoreCase(
                                BaseFeedback.TYPE_CATEGORY_FEEDBACK)) {
                        String score = node.getProperty(RP.score).getObject()
View Full Code Here

                    node.addProperty(RP.score,
                        String.valueOf(feedback.getScore()));
                    node.addProperty(RP.searchquery, feedback.getFeedbackQuery());
                    //node.addProperty(RP.issearch, "true");
                } else if (advice instanceof DocumentFeedback) {
                    DocumentFeedback feedback = (DocumentFeedback) advice;
                    node.addProperty(RP.score,
                        String.valueOf(feedback.getScore()));
                    node.addProperty(RP.documentID, feedback.getDocumentID());
                    node.addProperty(RP.categoryName, feedback.getCategoryName());
                    node.addProperty(RP.summary, feedback.getSummary());
                } else if (advice instanceof CategoryFeedback) {
                    CategoryFeedback feedback = (CategoryFeedback) advice;
                    node.addProperty(RP.score,
                        String.valueOf(feedback.getScore()));
                    node.addProperty(RP.categoryName, feedback.getCategoryName());
                    node.addProperty(RP.categoryLocation,
                        feedback.getCategoryLocation());
                }

                //write the model
                model.write(new FileOutputStream(file));
                model.close();
View Full Code Here

            String score = request.getParameter(DocumentFeedback.SCORE);
            String id = request.getParameter(DocumentFeedback.ID);
            String categname = request.getParameter(DocumentFeedback.CATEGORY_NAME);
            String summary = request.getParameter(DocumentFeedback.DESCRIPTION);

            feedback = new DocumentFeedback(Integer.valueOf(score).intValue(),
                    id, categname, summary);

            String searchterm = request.getParameter(PARAM_SEARCHTERM);

            //fill the model with data
View Full Code Here

TOP

Related Classes of net.fp.rp.search.mid.feedback.DocumentFeedback

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.