/** * Removes the specified resource from the resource bundle if that resource exists. * * @param documentBundle the bundle from which the resource will be removed * @param resource the reference to the resource to be removed * @return <code>true</code> if the resource was removed, <code>false</code> otherwise * @throws IOException indicates an error trying to remove the resource from the bundle */ public static boolean removeResource( final WriteableDocumentBundle documentBundle, final ResourceKey resource ) throws IOException { if ( documentBundle == null ) { throw new IllegalArgumentException(); } if ( resource == null ) { throw new IllegalArgumentException(); } if ( documentBundle.isEmbeddedKey( resource ) ) { return documentBundle.removeEntry( resource.getIdentifierAsString() ); } return false; }
pattern = derivePatternFromPath( mimeRegistry, mimeType, resourceKey.getIdentifierAsString() ); pattern, mimeType, newFactoryParameters ); if ( log.isDebugEnabled() ) { log.debug( "Resouce Embedded: [" + newResourceKey.getIdentifierAsString() + "]" );
if ( value instanceof ResourceKey ) { final ResourceKey reskey = (ResourceKey) value; final String identifierAsString = reskey.getIdentifierAsString(); attList.setAttribute( namespace, name, "resource-key:" + reskey.getSchema() + ":" + identifierAsString ); this.xmlWriter
if ( value instanceof ResourceKey ) { final ResourceKey reskey = (ResourceKey) value; final String identifierAsString = reskey.getIdentifierAsString(); attList.setAttribute( namespace, name, "resource-key:" + reskey.getSchema() + ":" + identifierAsString ); this.xmlWriter