/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Given a composite URI, parse the individual URI elements contained within that URI and return * a CompositeData instance that contains the parsed URI values. * * @param uri The target URI that should be parsed. * @return a new CompositeData instance representing the parsed composite URI. * @throws java.net.URISyntaxException */ public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); parseComposite(uri, rc, ssp); rc.fragment = uri.getFragment(); return rc; }
if (p >= 0) { if (p > 0) { rc.path = stripPrefix(params.substring(0, p), "/"); rc.path = stripPrefix(params, "/");
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Strip a URI of its scheme element. * * @param uri The URI whose scheme value should be stripped. * @return The stripped URI value. * @throws java.net.URISyntaxException */ public static URI stripScheme(URI uri) throws URISyntaxException { return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//")); }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Examine a URI and determine if it is a Composite type or not. * * @param uri The URI that is to be examined. * @return true if the given URI is a Composite type. */ public static boolean isCompositeURI(URI uri) { String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); if (ssp.indexOf('(') == 0 && checkParenthesis(ssp)) { return true; } return false; }
/** * Given a composite URI, parse the individual URI elements contained within that URI and return * a CompositeData instance that contains the parsed URI values. * * @param uri The target URI that should be parsed. * @return a new CompositeData instance representing the parsed composite URI. * @throws java.net.URISyntaxException */ public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); parseComposite(uri, rc, ssp); rc.fragment = uri.getFragment(); return rc; }
/** * Given a composite URI, parse the individual URI elements contained within that URI and return * a CompositeData instance that contains the parsed URI values. * * @param uri The target URI that should be parsed. * @return a new CompositeData instance representing the parsed composite URI. * @throws java.net.URISyntaxException */ public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); parseComposite(uri, rc, ssp); rc.fragment = uri.getFragment(); return rc; }
/** * Given a composite URI, parse the individual URI elements contained within that URI and return * a CompositeData instance that contains the parsed URI values. * * @param uri The target URI that should be parsed. * @return a new CompositeData instance representing the parsed composite URI. * @throws java.net.URISyntaxException */ public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); parseComposite(uri, rc, ssp); rc.fragment = uri.getFragment(); return rc; }