/** * Get the 'form province' - either the configured (applicableSurtPrefix) * or inferred (full current server) range of URIs that is considered * covered by one form login * * @param curi * @return */ protected String getFormProvince(CrawlURI curi) { if (StringUtils.isNotBlank(getApplicableSurtPrefix())) { return getApplicableSurtPrefix(); } try { return curi.getUURI().resolve("/").getSurtForm(); } catch (URIException e) { logger.log(Level.WARNING,"error trimming to root",e); return curi.getClassKey(); // should never happen } }
/** * Calculate the SURT form URI to use as a candidate against prefixes * from the given Object (CandidateURI or UURI) * * @param object CandidateURI or UURI * @return SURT form of URI for evaluation, or null if unavailable */ public static String getCandidateSurt(UsableURI u) { if (u == null) { return null; } String candidateSurt = u.getSurtForm(); // also want to treat https as http candidateSurt = coerceFromHttpsForComparison(candidateSurt); return candidateSurt; } /**
/** * Calculate the SURT form URI to use as a candidate against prefixes * from the given Object (CandidateURI or UURI) * * @param object CandidateURI or UURI * @return SURT form of URI for evaluation, or null if unavailable */ public static String getCandidateSurt(UsableURI u) { if (u == null) { return null; } String candidateSurt = u.getSurtForm(); // also want to treat https as http candidateSurt = coerceFromHttpsForComparison(candidateSurt); return candidateSurt; } /**
/** * Calculate the SURT form URI to use as a candidate against prefixes * from the given Object (CandidateURI or UURI) * * @param object CandidateURI or UURI * @return SURT form of URI for evaluation, or null if unavailable */ public static String getCandidateSurt(UsableURI u) { if (u == null) { return null; } String candidateSurt = u.getSurtForm(); // also want to treat https as http candidateSurt = coerceFromHttpsForComparison(candidateSurt); return candidateSurt; } /**
/** * Get the 'form province' - either the configured (applicableSurtPrefix) * or inferred (full current server) range of URIs that is considered * covered by one form login * * @param curi * @return */ protected String getFormProvince(CrawlURI curi) { if (StringUtils.isNotBlank(getApplicableSurtPrefix())) { return getApplicableSurtPrefix(); } try { return curi.getUURI().resolve("/").getSurtForm(); } catch (URIException e) { logger.log(Level.WARNING,"error trimming to root",e); return curi.getClassKey(); // should never happen } }