net.sf.mmm.util.resource.base
Class AbstractDataResourceFactory
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.resource.base.AbstractDataResourceFactory
- All Implemented Interfaces:
- DataResourceFactory
- Direct Known Subclasses:
- AbstractBrowsableResourceFactory, DataResourceFactoryImpl
public abstract class AbstractDataResourceFactory
- extends AbstractLoggableComponent
- implements DataResourceFactory
This is the abstract base implementation of the DataResourceFactory
interface.
- Since:
- 1.0.2
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDataResourceFactory
public AbstractDataResourceFactory()
- The constructor.
createDataResource
public DataResource createDataResource(String resourceUri)
throws ResourceUriUndefinedException
- This method creates a new
DataResource from the given
resourceUri. The following URI-schemes are guaranteed to be
supported:
| scheme |
example URI |
default implementation |
| file |
file:///tmp/foo.xml |
FileResource |
| classpath |
classpath:net/sf/mmm/util/beans-core.xml |
ClasspathResource |
ftp|http|https|... (whatever supported by URL) |
http://m-m-m.sourceforge.net/maven/ |
UrlResource |
- Specified by:
createDataResource in interface DataResourceFactory
- Parameters:
resourceUri - is the absolute URI
pointing to the location of the requested DataResource.
- Returns:
- the requested
DataResource.
- Throws:
ResourceUriUndefinedException - if the given resourceUri
is undefined (e.g. the scheme is NOT supported).
createDataResource
protected abstract DataResource createDataResource(ResourceUri resourceUri)
throws ResourceUriUndefinedException
- This method
creates the actual raw
DataResource.
- Parameters:
resourceUri - is the parsed and qualified ResourceUriImpl.
- Returns:
- the created
DataResource.
- Throws:
ResourceUriUndefinedException - if the given resourceUri
is undefined, e.g. the scheme-prefix is NOT supported by this factory.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.