Class MetadataIndexSupport
java.lang.Object
org.opensaml.saml.metadata.resolver.index.impl.MetadataIndexSupport
Support methods for metadata indexing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcanonicalizeLocationURI(String input) Canonicalize a location to be indexed.static StringtrimURLPathSegment(String input) Trim the right-most segment from the specified URL path.
-
Constructor Details
-
MetadataIndexSupport
private MetadataIndexSupport()Constructor.
-
-
Method Details
-
canonicalizeLocationURI
@Nonnull public static String canonicalizeLocationURI(@Nonnull String input) throws MalformedURLException Canonicalize a location to be indexed.Query, fragment and username/password are removed. Then further canonicalization is performed as implemented by
SimpleURLCanonicalizer.- Parameters:
input- the location- Returns:
- the canonicalized location value to index
- Throws:
MalformedURLException- if URL can not be canonicalized
-
trimURLPathSegment
Trim the right-most segment from the specified URL path.The input should be the path only, with no query or fragment.
Paths ending in "/" return the input with the trailing slash omitted, except for the special case of input == "/", which returns null. Paths not ending in "/" return the input with the right-most segment removed, and including a trailing slash.
- Parameters:
input- the path to evaluate- Returns:
- the trimmed path, or null
-