Package com.ikanow.infinit.e.harvest.utils

Examples of com.ikanow.infinit.e.harvest.utils.PropertiesManager


    // (don't re-initialize _props, that can persist)
    // (don't re-initialize doc state like _cachedRawFullText*, _firstTextExtractionInPipeline, _lastDocInPipeline)
    _timeOfLastSleep = -1L; // (not sure about this one, can see an argument for leaving it, but it's consistent with legacy this way)
   
    if (null == _props) { // turns out we always need this, for getMaxTimePerSource()
      _props = new PropertiesManager()
      nMaxTimeSpentInPipeline_ms = _props.getMaxTimePerSource();
    }
  }//TESTED (by eye)
View Full Code Here


              }//TESTED
            }// TESTED
           
            if (!userAgentSet) {
              if (null == _props) {
                _props = new PropertiesManager();
                _defaultUserAgent = _props.getHarvestUserAgent();
              }
              if (null != _defaultUserAgent) {
                urlConnect.setRequestProperty("User-Agent", _defaultUserAgent);
              }
View Full Code Here

  public FileHarvester()
  {
    sourceTypesCanHarvest.add(InfiniteEnums.FILES);
    maxDepth = 5;

    PropertiesManager pm = new PropertiesManager();
    maxDocsPerCycle = pm.getMaxDocsPerSource();
    harvestSecureMode = pm.getHarvestSecurity();
  }
View Full Code Here

      else if (null != wpa.getApiKey()) {
        // Change or create API key
        // Only admins can do this:
        if (null != personIdStr) { // (this is != null iff user isn't admin)
          // Check security settings
          PropertiesManager pm = new PropertiesManager();
          if (pm.getHarvestSecurity()) {
            rp.setResponse(new ResponseObject("WP Update User",false,"You must be admin in secure mode to set an API key"));
            return rp;
          }
        }//TESTED (admin, admin-enabled, non-admin - harvest.secure on and off)
       
View Full Code Here

    {
      AlchemyAPI_JSON api = new AlchemyAPI_JSON();
     
        try
        {
          api.SetAPIKey(new PropertiesManager().getExtractorKey("AlchemyApi"));
    }
        catch (Exception e)
        {
          // If an exception occurs log the error
      logger.error("Exception Message: " + e.getMessage(), e);
View Full Code Here

   * Default Constructor
   */
  public NoSqlHarvester()
  {     
    sourceTypesCanHarvest.add(InfiniteEnums.DATABASE);
    PropertiesManager pm = new PropertiesManager();
    maxDocsPerCycle = pm.getMaxDocsPerSource();
  }
View Full Code Here

   * @return void
   */
  private void processDatabase(SourcePojo source) throws ClassNotFoundException, SQLException, IOException
  {
    // Set up properties and RDBMS Manager
    properties = new PropertiesManager();
    rdbms = new RdbmsManager();

    // Get the type of database to access from the source object
    String dt = source.getDatabaseConfig().getDatabaseType()
   
View Full Code Here

      if (null != source.getRssConfig().getWaitTimeOverride_ms()) {
        nBetweenDocs_ms = source.getRssConfig().getWaitTimeOverride_ms();
      }
    }
    if (-1 == nBetweenDocs_ms) {
      PropertiesManager props = new PropertiesManager();
      nBetweenDocs_ms = props.getWebCrawlWaitTime();
    }
    // TESTED: default and overridden values

    _context = contextController;
    securityManager = _context.getSecurityManager();
View Full Code Here

        if (null != source.getRssConfig().getWaitTimeOverride_ms()) {
          nBetweenDocs_ms = source.getRssConfig().getWaitTimeOverride_ms();
        }
      }
      if (-1 == nBetweenDocs_ms) { // (ie not overridden so use default)
        PropertiesManager props = new PropertiesManager();
        nBetweenDocs_ms = props.getWebCrawlWaitTime();
      }
    } // TESTED (overridden and using system default)

    _context = context;
    securityManager = _context.getSecurityManager();
View Full Code Here

  //_____________________________INITIALIZATION________________
  //_______________________________________________________________________

  public ExtractorOpenCalais()
  {   
    PropertiesManager props = new PropertiesManager();
    CALAIS_LICENSE = props.getExtractorKey("OpenCalais");
   
    client = new HttpClient();
    eventSchemas = loadEventSchemas();
    //insert capabilities of this extractor
    _capabilities.put(EntityExtractorEnum.Name, "OpenCalais");
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.harvest.utils.PropertiesManager

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.