Class URLValidator
java.lang.Object
org.springframework.ai.bedrock.converse.api.URLValidator
Utility class for detecting and normalizing URLs. Intended for use with multimodal user
inputs.
- Since:
- 1.0.0
- Author:
- Christian Tzolov
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidURLBasic
(String urlString) Quick validation using regex pattern Good for basic checks but may not catch all edge casesstatic boolean
isValidURLStrict
(String urlString) Thorough validation using URL class More comprehensive but might be slower Validates protocol, host, port, and basic structurestatic String
normalizeURL
(String urlString) Attempts to fix common URL issues Adds protocol if missing, removes extra spaces
-
Method Details
-
isValidURLBasic
Quick validation using regex pattern Good for basic checks but may not catch all edge cases -
isValidURLStrict
Thorough validation using URL class More comprehensive but might be slower Validates protocol, host, port, and basic structure -
normalizeURL
Attempts to fix common URL issues Adds protocol if missing, removes extra spaces
-