return null if there is no CrawlDatum to generate
@return
12071
public CrawlDatum next(){
        int topN = getConf().getTopN();
        int maxExecuteCount = getConf().getOrDefault(Configuration.KEY_MAX_EXECUTE_COUNT, Integer.MAX_VALUE);

        if(topN > 0 && totalGenerate >= topN){
            return null;
        }

        CrawlDatum datum;
        while (true) {
            try {
                datum = nextWithoutFilter();
                if (datum == null) {
                    return datum;
                }
                if(filter == null || (datum = filter.filter(datum))!=null){
                    if (datum.getExecuteCount() > maxExecuteCount) {
                        continue;
                    }
                    totalGenerate += 1;
                    return datum;
                }

            } catch (Exception e) {
                LOG.info("Exception when generating", e);
                return null;
            }

        }
    }
988156
private synchronized TableBucket getNextBucketFromExistingBatch() {
        if (this.currentBatch != null) {
            TableBucket next = this.currentBatch.next();
            if (!this.currentBatch.hasNext()) {
                this.currentBatch = null;
            }

            return next;
        }

        return null;
    }
362427
public Integer getLoadOnStartup()
   {
      if (childNode.getTextValueForPatternName("load-on-startup") != null && !childNode.getTextValueForPatternName("load-on-startup").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("load-on-startup"));
      }
      return null;
   }
590236
@Override
	@Nullable
	public String getEncoding() {
		return (this.dataSource instanceof EncodingAware) ? ((EncodingAware) this.dataSource).getEncoding() : null;
	}
236870
@JsonIgnore
    @SuppressWarnings("unchecked")
    public Map<String, Object> getDataMap() {
        if (data instanceof Map) {
            return (Map<String, Object>) data;
        }
        return Collections.emptyMap();
    }
503190
public Map<String, Object> getDisplayDataMap() {
        return displayDataMap != null ? Collections.unmodifiableMap(displayDataMap) : Collections.emptyMap();
    }
1082933
public Integer getSRID() {
      Integer srid = null;
      if (getParameters().length > 1 && getParameters()[1] != null) {
         srid = Integer.valueOf(getParameters()[1].toString());
      }
      return srid;
   }
194505
public IPromise<String> getDataSimple() {
        Promise result = new Promise();
        result.complete("Data", null);
        return result;
    }
893093
@Restricted(DoNotUse.class)
    public static String getFrom() {
        String from = null, returnValue = null;
        final StaplerRequest request = Stapler.getCurrentRequest();

        // Try to obtain a return point either from the Session
        // or from the QueryParameter in this order
        if (request != null
                && request.getSession(false) != null) {
            from = (String) request.getSession().getAttribute("from");
        } else if (request != null) {
            from = request.getParameter("from");
        }

        // If entry point was not found, try to deduce it from the request URI
        // except pages related to login process
        if (from == null
                && request != null
                && request.getRequestURI() != null
                && !request.getRequestURI().equals("/loginError")
                && !request.getRequestURI().equals("/login")) {

                from = request.getRequestURI();
        }

        // If deduced entry point isn't deduced yet or the content is a blank value
        // use the root web point "/" as a fallback
        from = StringUtils.defaultIfBlank(from, "/").trim();
        
        // Encode the return value
        try {
            returnValue = java.net.URLEncoder.encode(from, "UTF-8");
        } catch (UnsupportedEncodingException e) { }

        // Return encoded value or at least "/" in the case exception occurred during encode()
        // or if the encoded content is blank value
        return StringUtils.isBlank(returnValue) ? "/" : returnValue;
    }
371305
@Nullable
    public Object fetchAValue() {
        if (doubleValue != null) {
            return doubleValue;
        }
        if (doubleArray != null) {
            return doubleArray;
        }
        if (longValue != null) {
            return longValue;
        }
        if (longArray != null) {
            return longArray;
        }
        if (stringValue != null) {
            return stringValue;
        }
        if (stringArray != null) {
            return stringArray;
        }
        if (map != null) {
            return map;
        }
        return null;
    }
1326105
@SuppressWarnings("unchecked")
    private E nextLazy() {
        //noinspection unchecked
        List<Emit<SqlgElement>> result = this.elements;
        this.elements = null;
        return (E) result;
    }
73139
public Content getContent() {
        if (getContents() != null && !getContents().isEmpty()) {
            final Content c = getContents().get(0);
            return c;
        }
        return null;
    }
399954
@JsonInclude(Include.NON_EMPTY)
	@JsonProperty("id")
	public String getJsonId() {
		if (!EntityIdValue.SITE_LOCAL.equals(this.siteIri)) {
			return this.entityId;
		} else {
			return null;
		}
	}
1326591
private I_CmsSearchResultWrapper getSearchResults() {

        // The second parameter is just ignored - so it does not matter
        m_searchController.updateFromRequestParameters(pageContext.getRequest().getParameterMap(), false);
        I_CmsSearchControllerCommon common = m_searchController.getCommon();
        // Do not search for empty query, if configured
        if (common.getState().getQuery().isEmpty()
            && (!common.getConfig().getIgnoreQueryParam() && !common.getConfig().getSearchForEmptyQueryParam())) {
            return new CmsSearchResultWrapper(m_searchController, null, null, m_cms, null);
        }
        Map<String, String[]> queryParams = null;
        boolean isEditMode = CmsJspTagEditable.isEditableRequest(pageContext.getRequest());
        if (isEditMode) {
            String params = "";
            if (common.getConfig().getIgnoreReleaseDate()) {
                params += "&fq=released:[* TO *]";
            }
            if (common.getConfig().getIgnoreExpirationDate()) {
                params += "&fq=expired:[* TO *]";
            }
            if (!params.isEmpty()) {
                queryParams = CmsRequestUtil.createParameterMap(params.substring(1));
            }
        }
        CmsSolrQuery query = new CmsSolrQuery(null, queryParams);
        m_searchController.addQueryParts(query, m_cms);
        try {
            // use "complicated" constructor to allow more than 50 results -> set ignoreMaxResults to true
            // also set resource filter to allow for returning unreleased/expired resources if necessary.
            CmsSolrResultList solrResultList = m_index.search(
                m_cms,
                query.clone(), // use a clone of the query, since the search function manipulates the query (removes highlighting parts), but we want to keep the original one.
                true,
                isEditMode ? CmsResourceFilter.IGNORE_EXPIRATION : null);
            return new CmsSearchResultWrapper(m_searchController, solrResultList, query, m_cms, null);
        } catch (CmsSearchException e) {
            LOG.warn(Messages.get().getBundle().key(Messages.LOG_TAG_SEARCH_SEARCH_FAILED_0), e);
            return new CmsSearchResultWrapper(m_searchController, null, query, m_cms, e);
        }
    }
320752
public Object getNextData() {
        moreData = false;
        if (dataObject instanceof double[][]) {
            return outputData;
        } else {
            throw new RuntimeException();
        }
    }

    public ColorMapBuffer getNextDataColor( int attColor ) {
        return null;
    }

    /**
     * Create a string that defines how the legend will look.
     * @throws IOException 
     */
    public String getLegendString() throws IOException {
        return null;
    }

    /**
     * 
     */
    public void hasChanged( boolean _haschanged ) {
        // if (_haschanged) {
        // novalue = new Double(Double.NaN);
        // matrixType = 0;
        // // theFilePath = null;
        // cellFile = nullFile = null;
        // filename = null;
        // mapsetPath = null;
        // locationPath = null;
        // rasterByteBuffer = null;
        // moreData = false;
        // // fileWindow = null;
        // // dataWindow = null;
        // rasterMapType = -9999;
        // numberOfBytesPerValue = -9999;
        // compressed = -9999;
        // }
        // hasChanged = _haschanged;
    }
1351691
public Map<String, String[]> getParams() {

        // get the params
        Map<String, String[]> params = CmsCollectionsGenericWrapper.map(m_request.getParameterMap());
        if (params.size() == 0) {
            return null;
        }
        return params;
    }
956543
@Override
    public Map<String, String[]> getParameterMap() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getParameterMap();
        return null;
    }