/** * <b>DOM</b>: Implements {@link org.w3c.dom.Document#setDocumentURI(String)}. */ public void setDocumentURI(String uri) { documentURI = uri; url = uri == null ? null : new ParsedURL(uri); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Document#setDocumentURI(String)}. */ public void setDocumentURI(String uri) { documentURI = uri; url = uri == null ? null : new ParsedURL(uri); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Document#setDocumentURI(String)}. */ public void setDocumentURI(String uri) { documentURI = uri; url = uri == null ? null : new ParsedURL(uri); }
String ref = new ParsedURL(uri).getRef();
/** * Sets the URI of the document. */ public void setURLObject(URL url) { setParsedURL(new ParsedURL(url)); }
/** * Sets the URI of the document. */ public void setURLObject(URL url) { setParsedURL(new ParsedURL(url)); }
/** * Resolves an URI. */ protected static String resolveURI(ParsedURL base, String value) { return new ParsedURL(base, value).toString(); }
public Source resolve(String href, String base) { if (base == null || "".equals(base)) { base = documentURI; } ParsedURL purl = new ParsedURL(base, href); return new StreamSource(purl.toString()); } }
/** * Sets the URI of the document. */ public void setURLObject(URL url) { setParsedURL(new ParsedURL(url)); }
/** * Returns the CSS base URL of this element. * @throws IllegalArgumentException when the result of getBaseURI() * cannot be used as an URL. */ public ParsedURL getCSSBase() { if (getXblBoundElement() != null) { return null; } String bu = getBaseURI(); return bu == null ? null : new ParsedURL(bu); }
/** * Factory method to construct an appropriate subclass of ParsedURLData, * for a sub url. * @param baseStr The base URL string to parse. * @param urlStr the sub URL string to parse. */ public static ParsedURLData parseURL(String baseStr, String urlStr) { if (baseStr == null) return parseURL(urlStr); ParsedURL purl = new ParsedURL(baseStr); return parseURL(purl, urlStr); }
/** * Returns the CSS base URL of this element. * @throws IllegalArgumentException when the result of getBaseURI() * cannot be used as an URL. */ public ParsedURL getCSSBase() { if (getXblBoundElement() != null) { return null; } String bu = getBaseURI(); return bu == null ? null : new ParsedURL(bu); }
/** * Returns the CSS base URL of this element. * @throws IllegalArgumentException when the result of getBaseURI() * cannot be used as an URL. */ public ParsedURL getCSSBase() { if (getXblBoundElement() != null) { return null; } String bu = getBaseURI(); return bu == null ? null : new ParsedURL(bu); }
/** * Factory method to construct an appropriate subclass of ParsedURLData, * for a sub url. * @param baseStr The base URL string to parse. * @param urlStr the sub URL string to parse. */ public static ParsedURLData parseURL(String baseStr, String urlStr) { if (baseStr == null) return parseURL(urlStr); ParsedURL purl = new ParsedURL(baseStr); return parseURL(purl, urlStr); }
public Source resolveURI(String uri) { try { ParsedURL url = new ParsedURL(baseURI, uri); InputStream in = url.openStream(); StreamSource source = new StreamSource(in, url.toString()); return source; } catch (IOException ioe) { userAgent.displayError(ioe); return null; } }
/** * Creates a new BaseScriptingEnvironment. * @param ctx the bridge context */ public BaseScriptingEnvironment(BridgeContext ctx) { bridgeContext = ctx; document = ctx.getDocument(); docPURL = new ParsedURL(((SVGDocument)document).getURL()); userAgent = bridgeContext.getUserAgent(); }
/** * Creates a new BaseScriptingEnvironment. * @param ctx the bridge context */ public BaseScriptingEnvironment(BridgeContext ctx) { bridgeContext = ctx; document = ctx.getDocument(); docPURL = new ParsedURL(((SVGDocument)document).getURL()); userAgent = bridgeContext.getUserAgent(); }
/** * Creates a new BaseScriptingEnvironment. * @param ctx the bridge context */ public BaseScriptingEnvironment(BridgeContext ctx) { bridgeContext = ctx; document = ctx.getDocument(); docPURL = new ParsedURL(((SVGDocument)document).getURL()); userAgent = bridgeContext.getUserAgent(); }
/** * Returns the URI of the referenced stylesheet. */ public String getStyleSheetURI() { SVGOMDocument svgDoc = (SVGOMDocument) getOwnerDocument(); ParsedURL url = svgDoc.getParsedURL(); String href = (String)getPseudoAttributes().get("href"); if (url != null) { return new ParsedURL(url, href).toString(); } return href; }
/** * Returns the URI of the referenced stylesheet. */ public String getStyleSheetURI() { SVGOMDocument svgDoc = (SVGOMDocument) getOwnerDocument(); ParsedURL url = svgDoc.getParsedURL(); String href = (String)getPseudoAttributes().get("href"); if (url != null) { return new ParsedURL(url, href).toString(); } return href; }