For GUI-oriented URL utilities see org.jabref.gui.fieldeditors.URLUtil
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| public static final Pattern | URL_PATTERN
Pattern matches a string containing a URL with a protocol |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the cleaned Google URL orurl if no search URL was detectedthe Google search URL string url)Cleans URLs returned by Google search. |
| public static @NonNull URL | |
| public static URI | |
| public static boolean | |
| public static boolean | isValidHttpUrl(String url)
Validates that a constructed URL is valid and conforms to RFC 3986 URI syntax (updated RFC 2396). |
| GOOGLE_SEARCH_EXP | back to summary |
|---|---|
| private static final String GOOGLE_SEARCH_EXP | |
| URL_EXP | back to summary |
|---|---|
| private static final String URL_EXP | |
| URL_PATTERN | back to summary |
|---|---|
| public static final Pattern URL_PATTERN Pattern matches a string containing a URL with a protocol | |
| URL_REGEX | back to summary |
|---|---|
| private static final String URL_REGEX | |
| URLUtil | back to summary |
|---|---|
| public URLUtil() | |
| cleanGoogleSearchURL | back to summary |
|---|---|
| public static String cleanGoogleSearchURL(@NonNull String url) Cleans URLs returned by Google search. Example```text If you copy links from search results from Google, all links will be enriched with search meta data, e.g. https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&&url=http%3A%2F%2Fwww.inrg.csie.ntu.edu.tw%2Falgorithm2014%2Fhomework%2FWagner-74.pdf&ei=DifeVYHkDYWqU5W0j6gD&usg=AFQjCNFl638rl5KVta1jIMWLyb4CPSZidg&sig2=0hSSMw9XZXL3HJWwEcJtOg ``` | |
| create | back to summary |
|---|---|
| public static @NonNull URL create(@NonNull String url) throws MalformedURLException Creates a | |
| createUri | back to summary |
|---|---|
| public static URI createUri(String url) Creates a
| |
| isURL | back to summary |
|---|---|
| public static boolean isURL(String url) Checks whether the given String is a URL. Currently only checks for a protocol String.
| |
| isValidHttpUrl | back to summary |
|---|---|
| public static boolean isValidHttpUrl(String url) Validates that a constructed URL is valid and conforms to RFC 3986 URI syntax (updated RFC 2396). And also validates that it has an HTTP or HTTPS scheme to prevent injection attacks. Does not perform complex checks such as opening connections. | |