Package de.anomic.data.ymark

Examples of de.anomic.data.ymark.YMarkCrawlStart


                count = putMeta(count, meta.loadMetadata());
              } else if(isURLdb) {
            count = putMeta(count, meta.getMetadata());
              } else if(isCrawlStart) {
                Log.logInfo("YMark", "I am looking for CrawlStart: "+post.get(ROOT).substring(2));
                final YMarkCrawlStart crawlStart = new YMarkCrawlStart(sb.tables, post.get(ROOT).substring(2));
                final Iterator<String> iter = crawlStart.keySet().iterator();
                String key;
                while(iter.hasNext()) {
                  key = iter.next();
                  prop.put("folders_"+count+"_foldername","<small><b>"+key.toLowerCase()+":</b> " + crawlStart.get(key) + "</small>");
                  putProp(count, "meta");
                  count++;
                }
                prop.put("folders", count);
              }
View Full Code Here


                      prop.putJSON("json_"+count+"_"+bmk.key(), (new YMarkDate(bmk_row.get(bmk.key()))).toISO8601().replaceAll("T", "<br />"));
                    else
                        prop.putJSON("json_"+count+"_"+bmk.key(), bmk_row.get(bmk.key(),bmk.deflt()));
                }

                final YMarkCrawlStart crawlstart = new YMarkCrawlStart(sb.tables, bmk_row.get(YMarkEntry.BOOKMARK.URL.key(),YMarkEntry.BOOKMARK.URL.deflt()));
                int crawl = 0;
                if (!crawlstart.isEmpty()) {
                  crawl = 1;
                  prop.put("json_"+count+"_crawlstart_info", "Crawl last executed: "+YMarkDate.ISO8601(crawlstart.date_last_exec()));
                }
                if (crawlstart.hasSchedule()) {
                  crawl = 2;
                  prop.put("json_"+count+"_crawlstart_info", "Crawl scheduled: "+YMarkDate.ISO8601(crawlstart.date_next_exec()));
                }
                if (crawlstart.isRunning(sb.crawler)) {
                  crawl = 3;
                  prop.put("json_"+count+"_crawlstart_info", "Crawl is running ...");
                }
                prop.put("json_"+count+"_crawlstart", crawl);

                prop.put("json_"+count+"_apicall_pk", crawlstart.getPK());
                prop.put("json_"+count+"_date_recording", YMarkDate.ISO8601(crawlstart.date_recording()).replaceAll("T", "<br />"));
                prop.put("json_"+count+"_date_next_exec", YMarkDate.ISO8601(crawlstart.date_next_exec()).replaceAll("T", "<br />"));
                prop.put("json_"+count+"_date_last_exec", YMarkDate.ISO8601(crawlstart.date_last_exec()).replaceAll("T", "<br />"));

                prop.put("json_"+count+"_comma", ",");

                // put XML
                prop.putXML("xml_"+count+"_id", UTF8.String(bmk_row.getPK()));
View Full Code Here

                count = putMeta(count, meta.loadMetadata());
              } else if(isURLdb) {
            count = putMeta(count, meta.getMetadata());
              } else if(isCrawlStart) {
                Log.logInfo("YMark", "I am looking for CrawlStart: "+post.get(ROOT).substring(2));
                final YMarkCrawlStart crawlStart = new YMarkCrawlStart(sb.tables, post.get(ROOT).substring(2));
                final Iterator<String> iter = crawlStart.keySet().iterator();
                String key;
                while(iter.hasNext()) {
                  key = iter.next();
                  prop.put("folders_"+count+"_foldername","<small><b>"+key.toLowerCase()+":</b> " + crawlStart.get(key) + "</small>");
                  putProp(count, "meta");
                  count++;
                }
                prop.put("folders", count);
              }
View Full Code Here

        prop.putXML("title", metadata.get(YMarkMetadata.METADATA.TITLE));
        prop.putXML("desc", metadata.get(YMarkMetadata.METADATA.DESCRIPTION));
        prop.put("keywords", putTags(document.dc_subject(','), "keywords"));
        prop.put("autotags", putTags(YMarkAutoTagger.autoTag(document, 5, sb.tables.bookmarks.getTags(bmk_user)), "autotags"));

        final YMarkCrawlStart crawlStart = new YMarkCrawlStart(sb.tables, url);
          int count = 0;
        if(!crawlStart.isEmpty()) {
          final Iterator<String> iter = crawlStart.keySet().iterator();
            String key;
            while(iter.hasNext()) {
              key = iter.next();
              prop.putXML("crawlstart_"+count+"_key",key.toLowerCase());
              prop.putXML("crawlstart_"+count+"_value",crawlStart.get(key));
              count++;
            }
          }
          prop.put("crawlstart", count);
View Full Code Here

TOP

Related Classes of de.anomic.data.ymark.YMarkCrawlStart

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.