...
Insert excerpt |
---|
| Resource Description |
---|
| Resource Description |
---|
nopanel | true | Resource Description |
---|
|
A resource object in
Insert excerpt |
---|
| ApplicationName |
---|
| ApplicationName |
---|
nopanel | trueApplicationName |
---|
|
contains an
InputStream
with the binary data of the resource. It describes that resource with a name, which could be a file name, URI, or another identifier. It also contains a mime type or content type which a client can use to know how to interpret the binary data.
...
Metacards are used to describe a resource through metadata. This metadata includes the time the resource was created, the location where the resource was created, etc. A
Insert excerpt |
---|
| ApplicationName |
---|
| ApplicationName |
---|
nopanel | trueApplicationName |
---|
|
Metacard
contains the
getResourceUri
method which is used to locate and retrieve its corresponding resource.
...
When a client attempts to retrieve a resource, it must provide a metacard ID or URI corresponding to a unique resource. As mentioned above, the resource URI is obtained from a Metacard's
getResourceUri
method. The CatalogFramework
has three methods that can be used by clients to obtain a resource: getEnterpriseResource
, getResource
, and getLocalResource
. The getEnterpriseResource
method invokes the retrieveResource
method on a local ResourceReader
as well as all the Federated
and Connected Sources
in the
Insert excerpt |
---|
| ApplicationName |
---|
| ApplicationName |
---|
nopanel | true | ApplicationName |
---|
|
enterprise. The second method,
getResource
, takes in a source ID as a parameter and only invokes
retrieveResource
on the specified
Source
. The third method invokes
retrieveResource
on a local
ResourceReader
.
The parameter for each of these methods in the CatalogFramework
is a ResourceRequest
.
Insert excerpt |
---|
| ApplicationName |
---|
| ApplicationName |
---|
nopanel | true | ApplicationName |
---|
|
includes two implementations of
ResourceRequest
:
ResourceRequestById
and
ResourceRequestByProductUri
. Since these implementations extend
OperationImpl
, they can pass a
Map
of generic properties through the
CatalogFramework
to customize how the resource request is carried out. One example of this is explained under the Options heading below. The following is a basic example of how to create a
ResourceRequest
and invoke the
CatalogFramework
resource retrieval methods to process the request.
...
BinaryContent
is an object used as a container to store translated or transformed
Insert excerpt |
---|
| ApplicationName |
---|
| ApplicationName |
---|
nopanel | trueApplicationName |
---|
|
components.
Resource
extends
BinaryContent
and includes a
getName
method.
BinaryContent
has methods to get the
InputStream
,
byte
array, MIME type, and size of the represented binary data. An implementation of
BinaryContent
(
BinaryContentImpl
) can be found in the Catalog API in the
ddf.catalog.data
package.