public abstract class AbstractBrowsableResourceFactory extends AbstractDataResourceFactory implements BrowsableResourceFactory
BrowsableResourceFactory
interface.Modifier and Type | Class and Description |
---|---|
protected class |
AbstractBrowsableResourceFactory.BrowsableResourceAdapter
This is an implementation of the
BrowsableResource interface, that adapts another
BrowsableResource and enhances the AbstractBrowsableResourceFactory.BrowsableResourceAdapter.navigate(String) -method to support switching schemes via the
BrowsableResourceFactory that created this BrowsableResource . |
AbstractDataResourceFactory.DataResourceAdapter
Modifier and Type | Field and Description |
---|---|
private Map<String,DataResourceProvider<? extends DataResource>> |
schema2providerMap |
Constructor and Description |
---|
AbstractBrowsableResourceFactory()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected BrowsableResource |
createBrowsableResource(ResourceUri resourceUri)
This method
creates the actual raw BrowsableResource . |
BrowsableResource |
createBrowsableResource(String resourceUri)
This method creates a new
BrowsableResource from the given resourceUri . |
protected DataResource |
createDataResource(ResourceUri resourceUri)
This method
creates the actual raw DataResource . |
protected DataResourceProvider<? extends DataResource> |
getProvider(ResourceUri resourceUri)
This method gets the
provider for the given resourceUri . |
void |
registerProvider(DataResourceProvider<? extends DataResource> provider)
This method registers the given
provider . |
void |
registerProvider(DataResourceProvider<? extends DataResource> provider,
String schemaPrefix)
This method registers the given
provider for the given schemaPrefix . |
createDataResource
createLogger, doInitialize, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDataResource
private final Map<String,DataResourceProvider<? extends DataResource>> schema2providerMap
public AbstractBrowsableResourceFactory()
public void registerProvider(DataResourceProvider<? extends DataResource> provider) throws DuplicateObjectException
provider
.provider
- is the DataResourceProvider
to register.DuplicateObjectException
- if a DataResourceProvider
is already registered for one of the
scheme-prefixes
.public void registerProvider(DataResourceProvider<? extends DataResource> provider, String schemaPrefix) throws DuplicateObjectException
provider
for the given schemaPrefix
.provider
- is the DataResourceProvider
to register.schemaPrefix
- is the scheme-prefix
for which the provider shall be
registered.DuplicateObjectException
- if a DataResourceProvider
is already registered with the same
scheme-prefix
.protected DataResourceProvider<? extends DataResource> getProvider(ResourceUri resourceUri) throws ResourceUriUndefinedException
provider
for the given resourceUri
.resourceUri
- is the ResourceUriImpl
.DataResourceProvider
responsible
for the given
resourceUri
.ResourceUriUndefinedException
- if no provider
is
registered
that is responsible.protected DataResource createDataResource(ResourceUri resourceUri) throws ResourceUriUndefinedException
AbstractDataResourceFactory
creates
the actual raw DataResource
.createDataResource
in class AbstractDataResourceFactory
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.protected BrowsableResource createBrowsableResource(ResourceUri resourceUri) throws ResourceUriUndefinedException
creates
the actual raw BrowsableResource
.resourceUri
- is the parsed and qualified ResourceUriImpl
.BrowsableResource
.ResourceUriUndefinedException
- if the given resourceUri
is undefined, e.g. the
scheme-prefix
is NOT supported by this factory.public BrowsableResource createBrowsableResource(String resourceUri) throws ResourceUriUndefinedException
BrowsableResourceFactory
BrowsableResource
from the given resourceUri
. The following URI-schemes
are guaranteed to be supported:
scheme | example URI | default implementation |
---|---|---|
file | file:///tmp/foo.xml | FileResource |
createBrowsableResource
in interface BrowsableResourceFactory
resourceUri
- is the absolute URI
pointing to the location of the requested
BrowsableResource
.BrowsableResource
.ResourceUriUndefinedException
- if the given resourceUri
is undefined (e.g. the scheme is NOT
supported).Copyright © 2001–2016 mmm-Team. All rights reserved.