src/main/java/com/findupon/commons/utilities/JsoupUtils.java
/**
	 * Used for basic text qualifications or in pair with element-text mapping.
	 * {@link Element#hasText()} is called before {@link Element#text()} as it is a cheaper operation that shorts out.
	 * @return the text that has passed the basic quality gates, or empty if it has failed.
	 */
Used for basic text qualifications or in pair with element-text mapping.
Element#hasText() is called before  Element#text() as it is a cheaper operation that shorts out.
@return the text that has passed the basic quality gates, or empty if it has failed.
Used for basic text qualifications or in pair with element - text mapping . Element#hasText () is called before Element#text () as it is a cheaper operation that shorts out . @return the text that has passed the basic quality gates or empty if it has failed .
private static String qualityText(Element element, boolean normalize) {
		if(element == null) {
			return StringUtils.EMPTY;
		}
		if(!element.hasText()) {
			return StringUtils.EMPTY;
		}
		if(TagWeight.largeTagsToAvoid.contains(element.tagName())) {
			return StringUtils.EMPTY;
		}
		String text = element.text();
		if(text.length() >= defaultMaxTextLength) {
			return StringUtils.EMPTY;
		}
		return normalize ? ScoutServices.normalize(text) : text;
	}
private static String qualityText ( Element element , boolean normalize ) { if ( element == null ) { return StringUtils . EMPTY ; } if ( ! element . hasText ( ) ) { return StringUtils . EMPTY ; } if ( TagWeight . largeTagsToAvoid . contains ( element . tagName ( ) ) ) { return StringUtils . EMPTY ; } String text = element . text ( ) ; if ( text . length ( ) >= defaultMaxTextLength ) { return StringUtils . EMPTY ; } return normalize ? ScoutServices . normalize ( text ) : text ; }
Used for basic text qualifications or in pair with element-text mapping.
Used for basic text qualifications or in pair with element - text mapping .