Resource Repository
The resource
repository
enables users to access local copies of files that may originally have
resided at a remote location. The resources are keyed by their original
public ID and/or system ID. If a caller the resource repository
requests a resource that is not held locally, the resource repository
attempts to download it from the URI provided as a system ID, and if
successful caches the content locally. The resource repository can also
act as an entity resolver.
Resource
The resources are stored locally and made accessible on demand as a
java.io.InputStream
.
Resource Meta-data
Resource meta-data are
used to register a resource. The basic resource repository
implementation that comes with OBE stores these data in the
configuration
file BasicResourceRepository.xml
; the entries have the format:
<entry>
<resource id="nmtoken" type="nmtoken" threadsafe="true|false"?>
<display-name .../>?
<author .../>?
<description .../>?
<doc-url .../>?
<public-id .../>
<system-id .../>
</resource>
<instance xsi:type="java:fqcn" ... />
</entry>
- public-id
- The Public ID of the resource (required for DTD resolution, etc.).
- system-id
- The System ID of the resource.
- instance
- The name of the disk file containing the resource content, relative to
${obe.config.dir}/resources
.