/** * Makes an absolute URI based on a baseURI and a relative URI. */ private String absolutize( SourceFactory factory, String baseURI, String systemID ) { if( factory instanceof URIAbsolutizer ) systemID = ((URIAbsolutizer)factory).absolutize(baseURI, systemID); else systemID = SourceUtil.absolutize(baseURI, systemID); return systemID; }
/** * @see org.apache.excalibur.source.MoveableSource#copyTo(org.apache.excalibur.source.Source) */ public void copyTo(Source destination) throws SourceException { try { SourceUtil.copy(this.getInputStream(), ((ModifiableSource) destination).getOutputStream()); } catch (IOException ioe) { throw new SourceException("Couldn't copy " + this.getURI() + " to " + destination.getURI(), ioe); } }
/** * @see org.apache.excalibur.source.Source#getInputStream() */ public final InputStream getInputStream() throws SourceException, IOException { return this.source.getInputStream(); }
/** * @see org.apache.excalibur.source.Source#getURI() */ public String getURI() { return this.wrappedSource.getURI(); }
/** * @see org.apache.excalibur.source.Source#getValidity() */ public SourceValidity getValidity() { return this.source.getValidity(); }
/** * @see org.apache.excalibur.source.Source#getLastModified() */ public long getLastModified() { return this.wrappedSource.getLastModified(); }
/** * @see org.apache.excalibur.source.URIAbsolutizer#absolutize(java.lang.String, java.lang.String) */ public String absolutize(String baseURI, String location) { return SourceUtil.absolutize(baseURI, location, true); } }
/** * @see org.apache.excalibur.source.Source#getMimeType() */ public String getMimeType() { return this.source.getMimeType(); }
public int isValid(SourceValidity newValidity) { // Always delegate return this.delegate.isValid(newValidity); } }
/** * @see org.springframework.core.io.Resource#exists() */ public boolean exists() { return this.source.exists(); }
/** * @see org.apache.excalibur.source.Source#refresh() */ public void refresh() { this.wrappedSource.refresh(); }
/** * Set the value of this parameter to the given value. * Remove all other values for this parameter. */ public void setSingleParameterValue( String name, String value ) { this.removeParameter( name ); this.setParameter( name, value ); }
/** * Generate the unique key. * This key must be unique inside the space of this component. * * @return The generated key hashes the src */ public Serializable getKey() { return this.inputSource.getURI(); }
/** * Makes an absolute URI based on a baseURI and a relative URI. */ protected String absolutize(SourceFactory factory, String baseURI, String systemID) { if (factory instanceof URIAbsolutizer) { systemID = ((URIAbsolutizer) factory).absolutize(baseURI, systemID); } else { systemID = org.apache.excalibur.source.SourceUtil.absolutize(baseURI, systemID); } return systemID; } }
/** * @see org.apache.excalibur.source.URIAbsolutizer#absolutize(java.lang.String, java.lang.String) */ public String absolutize(String baseURI, String location) { return SourceUtil.absolutize(baseURI, location, true); }
/** * @see org.apache.excalibur.source.Source#getMimeType() */ public String getMimeType() { return this.wrappedSource.getMimeType(); }
/** * @see org.apache.excalibur.source.Source#exists() */ public boolean exists() { return this.source.exists(); }
/** * Calls absolutize(url1, url2, false). */ public static String absolutize(String url1, String url2) { return absolutize(url1, url2, false, true); }
/** * @see org.apache.excalibur.source.Source#exists() */ public boolean exists() { return this.wrappedSource.exists(); }
/** * Calls absolutize(url1, url2, false, true). */ public static String absolutize(String url1, String url2, boolean treatAuthorityAsBelongingToPath) { return absolutize(url1, url2, treatAuthorityAsBelongingToPath, true); }