private static String encodeURIComponent(String s) { return IRILib.encodeUriComponent(s); }
protected final String target(Node name) { if ( !name.isURI() ) throw new JenaException("Not a URI: " + name) ; String guri = name.getURI() ; // Encode guri = IRILib.encodeUriComponent(guri) ; return remote + "?" + HttpNames.paramGraph + "=" + guri ; }
private static void encodeComponent(String string, String result) { String r = IRILib.encodeUriComponent(string) ; assertEquals(result, r) ; }
public static NodeValue strEncodeForURI(NodeValue v) { Node n = v.asNode() ; if ( !n.isLiteral() ) throw new ExprEvalException("Not a literal") ; if ( ! Util.isSimpleString(n) && ! Util.isLangString(n) ) throw new ExprEvalException("Not a string literal") ; String str = n.getLiteralLexicalForm() ; String encStr = IRILib.encodeUriComponent(str) ; encStr = IRILib.encodeNonASCII(encStr) ; return NodeValue.makeString(encStr) ; }