Java 8 URIResolver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 URIResolver class.

This code example shows how to use the following methods:resolve
 
    @Override 
    public Source resolve(String href, String base) throws TransformerException {
 
        if (parent != null) {
            return parent.resolve(href, base);
        } 
 
        return null; 
    } 
} 
5
CodeRank
This code example shows how to use the following methods:resolve
  private HttpServletResponse response;
  private HttpxProducer producer;
  private Headers headers;
 
  public void setHeaders(Headers headers) {
    this.headers = headers;
  } 
 
  public void setParams(QueryParameters params) {
    this.params = params;
  } 
 
  public void setRequestInformation(RequestInformation info) {
    this.info = info;
  } 
 
  private QueryParameters params;
  private RequestInformation info;
  private final HttpxMarshaller marshaller;
  
5
CodeRank
This code example shows how to use the following methods:resolve
    throws TransformerException 
  { 
    Source source = null;
    if (userResolver != null)
      { 
        source = userResolver.resolve(base, href);
      } 
    return resolveDOM(source, href, base);
  } 
 
  DOMSource resolveDOM(Source source, String base, String href)
    throws TransformerException 
  { 
    if (source != null && source instanceof DOMSource)
      { 
        return (DOMSource) source;
      } 
    String systemId = (source == null) ? null : source.getSystemId();
    long lastModified = 0L, lastLastModified = 0L;
 
4
CodeRank
This code example shows how to use the following methods:resolve
			xslIs = this.getClass().getResourceAsStream(href) ; 
			if(xslIs!=null) {
				sSource = new StreamSource(xslIs) ;
				return  sSource ;
			} else { 
				return defaultResolver.resolve(href, base) ;
			} 
		} 
	} 
 
} 
4
CodeRank
This code example shows how to use the following methods:resolve
This code example shows how to use the following methods:resolve
            TransformerFactoryImpl processor = handler.getStylesheetProcessor();
            URIResolver uriresolver = processor.getURIResolver();
            if (uriresolver != null) {
                String href = getHref();
                String base = handler.getBaseIdentifier();
                s = uriresolver.resolve(href,base);
            } 
 
        return s;
    } 
 
    /** 
     * Get the base URI of the included or imported stylesheet, 
     * if the user provided a URIResolver, then get the Source 
     * object for the stylsheet from it, and get the systemId  
     * from that Source object, otherwise try to recover by 
     * using the SysteIDResolver to figure out the base URI. 
     * @param handler The handler that processes the stylesheet as SAX events, 
     * and maintains state 
     * @param s The Source object from a URIResolver, for the included stylesheet module, 
4
CodeRank
This code example shows how to use the following methods:resolve
 
    Node doc = null;
    Source source = null;
    if (resolver != null) {
      try { 
        source = resolver.resolve(name, systemId);
      } catch (TransformerException e) {
        throw new XPathException(e);
      } 
    } 
 
    if (source != null) {
      systemId = source.getSystemId();
      path = pwd.lookup(systemId);
    } 
    else if (systemId != null) {
      pwd = pwd.lookup(systemId).getParent();
 
      path = pwd.lookup(name);
    } 
4
CodeRank
This code example shows how to use the following methods:resolve
  public InputSource resolveEntity(String publicId, String systemId)
    throws SAXException, IOException 
  { 
    try 
      { 
        Source source = resolver.resolve(null, systemId);
        if (source == null)
          { 
            return null; 
          } 
        return SAXSource.sourceToInputSource(source);
      } 
    catch (TransformerException e)
      { 
        throw new SAXException(e);
      } 
  } 
 
} 
4
CodeRank
This code example shows how to use the following methods:resolve
  public InputSource resolveEntity (String publicId, String systemId)
    throws SAXException, IOException 
  { 
    try 
      { 
        return SAXSource.sourceToInputSource (resolver.resolve (systemId,
                                                                null)); 
      } 
    catch (TransformerException e)
      { 
        Throwable cause = e.getCause ();
        if (cause instanceof SAXException)
          { 
            throw (SAXException) cause;
          } 
        else if (cause instanceof IOException)
          { 
            throw (IOException) cause;
          } 
        throw new SAXException (e);
4
CodeRank
This code example shows how to use the following methods:resolve
     * @return Source the generated Source object 
     */ 
    protected Source convertString2Source(String param) {
        Source src;
        try { 
            src = uriResolver.resolve(param, null);
        } catch (TransformerException e) {
            src = null;
        } 
        if (src == null) {
            src = new StreamSource(new File(param));
        } 
        return src;
    } 
     
    /** 
     * Renders an XSL-FO file into a PDF file. The PDF is written to a byte 
     * array that is returned as the method's result. 
     * @param fo the XSL-FO file 
     * @param response HTTP response object 

4
CodeRank
See Code Examples for Java 8 URIResolver Methods: