Data Components
Metacard
A single instance of metadata in the Catalog (an instance of a Metacard Type). Generally contains metadata providing a title for the product and describing a product's geo-location, created and modified dates, owner or producer, security classification, etc.
Metacard Type
A Metacard Type indicates the attributes available for a particular Metacard. It is a model used to define the Attributes of a Metacard, much like a schema.
Default Metacard Type
Most Metacards within the system are created using with the default Metacard Type. The default Metacard Type of the system can be programmatically retrieved by calling ddf.catalog.data.
BasicTypes.BASIC_METACARD
. The name of the default MetacardType can be retrieved from ddf.catalog.data.
MetacardType.DEFAULT_METACARD_TYPE_NAME
.
The default Metacard Type has the following required attributes. Though the following attributes are required on all Metacard types, setting their values is optional except for ID.
Required Attributes
ddf.catalog.data.Metacard Constant | Attribute Name | Attribute Format | Description |
---|---|---|---|
CONTENT_TYPE | metadata-content-type | STRING | Attribute name for accessing the metadata content type of a Metacard. |
CONTENT_TYPE_VERSION | metadata-content-type-version | STRING | Attribute name for accessing the version of the metadata content type of a Metacard. |
CREATED | created | DATE | Attribute name for accessing the date/time this Metacard was created. |
EFFECTIVE | effective | DATE | Attribute name for accessing the date/time of the product represented by the Metacard. |
EXPIRATION | expiration | DATE | Attribute name for accessing the date/time the Metacard is no longer valid and could be removed. |
GEOGRAPHY | location | GEOMETRY | Attribute name for accessing the location for this Metacard. |
ID | id | STRING | Attribute name for accessing the ID of the Metacard. |
METADATA | metadata | XML | Attribute name for accessing the XML metadata for this Metacard. |
MODIFIED | modified | DATE | Attribute name for accessing the date/time this Metacard was last modified. |
RESOURCE_SIZE | resource-size | STRING | Attribute name for accessing the size of the product this Metacard represents. |
RESOURCE_URI | resource-uri | STRING | Attribute name for accessing the URI reference to the product this Metacard represents. |
TARGET_NAMESPACE | metadata-target-namespace | STRING | Attribute name for accessing the target namespace of the metadata content type of a Metacard. |
THUMBNAIL | thumbnail | BINARY | Attribute name for accessing the thumbnail image of the product this Metacard represents. The thumbnail must be of MIME Type |
TITLE | title | STRING | Attribute name for accessing the title of the Metacard. |
It is highly recommended when referencing a default attribute name to use the ddf.catalog.data.Metacard
constants whenever possible.
Every Source should at the very least return an ID attribute according to Catalog API. Other fields might or might not be applicable, but a unique ID must be returned by a Source.
Extensible Metacards
Metacard extensibility is achieved by creating a new MetacardType that supports Attributes in addition to the required Attributes listed above. Required attributes must be the base of all extensible Metacard types. See Working with Metacards for more details.
Not all Catalog Providers support extensible metacards. Nevertheless, each Catalog Provider should at least have support for the default MetacardType, i.e. it should be able to store and query on the Attributes and Attribute Formats specified by the default Metacard Type. Consult the documentation of the Catalog Provider in use for more information on its support of extensible metacards.
Metacard Type Registry
The MetacardTypeRegistry is experimental. While this component has been tested and is functional, it may change as more information is gathered about what is needed and as it is used in more scenarios.
The MetacardTypeRegistry allows DDF components, primarily CatalogProviders and Sources, to make available the MetacardTypes that they support. It maintains a list of all supported MetacardTypes in the CatalogFramework, so that other components such as Endpoints, Plugins, and Transformers can make use of those MetacardTypes. The MetacardType is essential for a component in the CatalogFramework to understand how it should interpret a Metacard by knowing what Attributes are available in that Metacard.
As an example, an Endpoint receiving incoming metadata can perform a lookup in the MetacardTypeRegistry to find a corresponding MetacardType. The discovered MetacardType will then be used to help the Endpoint populate a Metacard based on the specified Attributes in the MetacardType. By doing this, all the incoming metadata elements can then be available for processing, cataloging, and searching by the rest of the CatalogFramework. See Working with Metacards in the DDF Developer's Guide for more information.
Attribute
A single field of a Metacard, an instance of an Attribute Type. Attributes are typically indexed for searching by a Source or Catalog Provider.
Attribute Type
An Attribute Type indicates the Attribute Format of the value stored as an Attribute. It is a model for an Attribute.
Attribute Format
An enumeration of Attribute Formats are available in the catalog. Only these Attribute Formats may be used.
AttributeFormat | Description |
---|---|
BINARY | Attributes of this Attribute Format must have a value that is a Java byte[] and AttributeType.getBinding() should return Class<Array>of byte. |
BOOLEAN | Attributes of this Attribute Format must have a value that is a Java Boolean. |
DATE | Attributes of this Attribute Format must have a value that is a Java Date. |
DOUBLE | Attributes of this Attribute Format must have a value that is a Java Double. |
FLOAT | Attributes of this Attribute Format must have a value that is a Java Float. |
GEOMETRY | Attributes of this Attribute Format must have a value that is a WKT-formatted Java String. |
INTEGER | Attributes of this Attribute Format must have a value that is a Java Integer. |
LONG | Attributes of this Attribute Format must have a value that is a Java Long. |
OBJECT | Attributes of this Attribute Format must have a value that implements the Serializable interface. |
SHORT | Attributes of this Attribute Format must have a value that is a Java Short. |
STRING | Attributes of this Attribute Format must have a value that is a Java String and treated as plain text. |
XML | Attributes of this Attribute Format must have a value that is a XML-formatted Java String. |
Result
A single "hit" included in a Query Response.
A Result object consists of the following:
- a Metacard
- a relevance score if included
- distance in meters if included