public abstract class AbstractDataResourceFactory extends AbstractLoggableComponent implements DataResourceFactory
DataResourceFactory
interface.Modifier and Type | Class and Description |
---|---|
protected class |
AbstractDataResourceFactory.DataResourceAdapter
This is an implementation of the
DataResource interface, that adapts another
DataResource and enhances the AbstractDataResourceFactory.DataResourceAdapter.navigate(String) -method to support switching schemes via the
DataResourceFactory that created this DataResource . |
Constructor and Description |
---|
AbstractDataResourceFactory()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract DataResource |
createDataResource(ResourceUri resourceUri)
This method
creates the actual raw DataResource . |
DataResource |
createDataResource(String resourceUri)
This method creates a new
DataResource from the given resourceUri . |
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
public AbstractDataResourceFactory()
public DataResource createDataResource(String resourceUri) throws ResourceUriUndefinedException
DataResourceFactory
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 |
createDataResource
in interface DataResourceFactory
resourceUri
- is the absolute URI
pointing to the location of the
requested DataResource
.DataResource
.ResourceUriUndefinedException
- if the given resourceUri
is undefined (e.g. the scheme is
NOT supported).protected abstract DataResource createDataResource(ResourceUri resourceUri) throws ResourceUriUndefinedException
creates
the actual raw DataResource
.resourceUri
- is the parsed and qualified ResourceUri
.DataResource
.ResourceUriUndefinedException
- if the given resourceUri
is undefined, e.g. the
scheme-prefix
is NOT supported by this factory.Copyright © 2001–2016 mmm-Team. All rights reserved.