Examples of IDataExtractor


Examples of net.fp.rp.search.plugins.IDataExtractor

                    location);

                AddInfo addInfo = new AddInfo(info.getCategoryLocation(),
                        info.getCategoryName(), location, info.getLevel() - 1);

                IDataExtractor extractor = PluginManager.getBestExtractor(addInfo);

                if (extractor != null) {
                    logger.debug(
                        "Best extractor for handling the information is :" +
                        extractor.getClass().getName());

                    try {
                        extractor.convert(addInfo);
                    } catch (RpException e) {
                        //no exception to be thrown -> continue the add
                        logger.debug("Error in extract the data " +
                            e.getMessage(), e);
                    }
View Full Code Here

Examples of net.fp.rp.search.plugins.IDataExtractor

                logger.debug("Process the link :" + uriLink);

                AddInfo addInfo = new AddInfo(info.getCategoryLocation(),
                        info.getCategoryName(), uriLink, info.getLevel() - 1);

                IDataExtractor extractor = PluginManager.getBestExtractor(addInfo);

                if (extractor != null) {
                    logger.debug(
                        "Best extractor for handling the information is :" +
                        extractor.getClass().getName());

                    try {
                        extractor.convert(addInfo);
                    } catch (RpException e) {
                        //no exception to be thrown -> continue the add
                        logger.debug("Error in extract the data " +
                            e.getMessage(), e);
                    }
View Full Code Here

Examples of net.fp.rp.search.plugins.IDataExtractor

        return isPlugin;
    }
   
   
    public static IDataExtractor getBestExtractor(final INewInformation addInfo) throws RpException{
        IDataExtractor extractor = null;
        int max = 0;
        IDataExtractor[] extractors = PluginManager.getDataExtractors();

        for (int j = 0; j < extractors.length; j++) {
            int val = extractors[j].canHandle(addInfo);

            if (val > max) {
                max = val;
                extractor = extractors[j];
            }
        }
        if (extractor != null) {
            Logger.getRootLogger().debug(
                "Best extractor for handling the information is :" +
                extractor.getClass().getName());

        } else {
            Logger.getRootLogger().warn(
                "No extractor is available for extract the data  " + addInfo.getUri());
        }
View Full Code Here

Examples of net.fp.rp.search.plugins.IDataExtractor

                            //must specify the category location, category name from the actual information
                            INewInformation childInfo = new AddInfo(info.getCategoryLocation(),
                                    info.getCategoryName(), list[i].getPath(),
                                    info.getLevel() - 1);

                            IDataExtractor extractor = PluginManager.getBestExtractor(childInfo);

                            if (extractor != null) {
                                logger.debug("Best extractor for location " +
                                    list[i].getPath() + " is :" +
                                    extractor.getClass().getName());

                                //process the information with level =1
                                try {
                                    extractor.convert(childInfo);
                                } catch (RpException e) {
                                    //no exception to be thrown -> continue the add
                                    logger.debug("Error in extracting the data " +
                                        e.getMessage(), e);
                                }
View Full Code Here

Examples of net.fp.rp.search.plugins.IDataExtractor

    public void addInformation(INewInformation info) throws RpException {
        logger.info("CategoryManager add a new information to the system :" +
            info.getUri());

        //detect which data extractor is more apropiate to handle the data
        IDataExtractor extractor = PluginManager.getBestExtractor( info) ;

        if (extractor != null) {
            logger.debug("Extractor " + extractor.getClass().getName() +
                " will handle the information " + info.getUri());

            //validate if the name is specified
            String defaultCategName = info.getCategoryName();
View Full Code Here

Examples of net.fp.rp.search.plugins.IDataExtractor

      
      logger.info("CategoryManager add a new piece of information to the system :" +
            info.getUri());

        //detect which data extractor is more apropiate to handle the data
        IDataExtractor extractor = PluginManager.getBestExtractor( info) ;

        if (extractor != null) {
            logger.debug("Extractor " + extractor.getClass().getName() +
                " will handle the information " + info.getUri());

            //validate if the name is specified
            String defaultCategName = info.getCategoryName();
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.