org.geotools.catalog
Interface MetadataEntity


public interface MetadataEntity

Interface for progamatic access to the Metadata content. This API is used by Catalog to query against CatalogEntry Metadata.

Conceptually a Metadata is comprised of a series of elements. These elements are described by an associated EntityType & Element schema information.

In the best of all possible worlds the EntityType is a member of a well known specification such as ISO19115 (Metadata for spatial data), or ISO19119 (Metadata for Services). GeoAPI kindly provides these abstractions as a series of interfaces, which we are in the process of implementing.

The Metadata interface is similar in use to that of the Feature, it has the same relationship with EntityType that Feature has with FeatureType. By extention Element is similar to AttributeType.

Aside: Many classes that implement Metadata follow Java Bean property conventions to allow for element access. This is not a requirement.

Internationalization: Accounting for internationlization is an interesting problem with metadata.

This interface is based on the discussion in the Abstract Catalog specification:


 4.6 Metadata dataset
     Metadta describing a specific dataset [ISO 19101]
 
 4.7 Metadata entity
     Group of metadata elements and other metadata entities describing the same
     aspect of data.
 
 NOTE 1  A metadata entity may contain one or more metadata entities
 NOTE 2  A metadata is equivalent to a class in UML terminology [ISO 19101]
 
 4.8 Metadata schema
     Conceptual schema describing metadata
 
 NOTE ISO 19115 describes a standard for a metadata schema [ISO 19101]
 

Version:
Catalog Services 1.1.1
Author:
ISO 19101, ISO 19115, OpenGIS® consortium

Nested Class Summary
static interface MetadataEntity.Element
          Metadata element schema description (name, class, nillable).
static interface MetadataEntity.EntityType
          Metadata schema description - the "type" of Metadata.
 
Method Summary
 java.util.List elements()
          Access to the values associated with metadata elements.
 java.lang.Object getElement(MetadataEntity.Element element)
          Gets the value of the provided Element.
 java.lang.Object getElement(java.lang.String xPath)
          Access to Metadata element values specified by the xPath expression.
 MetadataEntity.EntityType getEntityType()
          Returns the entity type that describes the schema of this Metadata.
 

Method Detail

elements

public java.util.List elements()
Access to the values associated with metadata elements. The list is returned in the same order as described by the MetadataEntity.EntityType schema information.

Returns:
List of element values.

getElement

public java.lang.Object getElement(java.lang.String xPath)
Access to Metadata element values specified by the xPath expression. Usually used to return individual objects, if the xPath expression matches multiple elements a List will be returned.

To be clear xPath expression can be used to:


getElement

public java.lang.Object getElement(MetadataEntity.Element element)
Gets the value of the provided Element.

Parameters:
element - Element that indicates the value the caller wishes to obtain.
Returns:
The value of the element the parameter represents null if the current Metadata does not contain the Element.

getEntityType

public MetadataEntity.EntityType getEntityType()
Returns the entity type that describes the schema of this Metadata.

Returns:
the entity type that describes the current Metadata object


Copyright © GeoTools. All Rights Reserved.