Package org.apache.solr.common.util
Class URLUtil
- java.lang.Object
- 
- org.apache.solr.common.util.URLUtil
 
- 
 public class URLUtil extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description static PatternURL_PREFIX
 - 
Constructor SummaryConstructors Constructor Description URLUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildCoreUrl(String baseUrl, String coreName)Create a core URL (e.g.static StringextractBaseUrl(String coreUrl)static StringextractCoreFromCoreUrl(String coreUrl)static StringgetScheme(String url)static booleanhasScheme(String url)static StringremoveScheme(String url)
 
- 
- 
- 
Field Detail- 
URL_PREFIXpublic static final Pattern URL_PREFIX 
 
- 
 - 
Method Detail- 
hasSchemepublic static boolean hasScheme(String url) 
 - 
extractBaseUrlpublic static String extractBaseUrl(String coreUrl) - Parameters:
- coreUrl- a URL pointing to a specific "core" or collection (i.e. that adheres loosely to the form "scheme://host:port/solr/coreName")
- Returns:
- a URL pointing to the Solr node's root path
 
 - 
buildCoreUrlpublic static String buildCoreUrl(String baseUrl, String coreName) Create a core URL (e.g. "http://localhost:8983/solr/myCore") from its individual components- Parameters:
- baseUrl- a Solr "base URL" (e.g. "http://localhost:8983/solr/")
- coreName- the name of a Solr core or collection (with no leading or trailing slashes)
 
 
- 
 
-