org.geotools.catalog
Class AbstractMetadataEntity

java.lang.Object
  extended byorg.geotools.catalog.AbstractMetadataEntity
All Implemented Interfaces:
org.opengis.catalog.MetadataEntity
Direct Known Subclasses:
FileMetadataImpl, WMSLayerMetadataEntity

public abstract class AbstractMetadataEntity
extends java.lang.Object
implements org.opengis.catalog.MetadataEntity

MetadataEntity superclass that uses reflection for EntityType information.

AbstractMetadata uses reflection to identify all the getXXX() methods. The getXXX() are used to construct all the Metadata.Entity and Metadata.Element objects The return type of each is used to determine whether the element is a simple element or an entity, if the element is not a simple entity a entity for that class will can be created as well. All Metadata.Entities and Elements are created when requested (Lazily)

We should switch this over to use BeanInfo/Introspector reflection to allow for recognition of boolean isFoo as "foo", getBar as "bar" and getURL as "URL".

Since:
2.1
Author:
jeichar

Nested Class Summary
 
Nested classes inherited from class org.opengis.catalog.MetadataEntity
org.opengis.catalog.MetadataEntity.Element, org.opengis.catalog.MetadataEntity.EntityType
 
Constructor Summary
AbstractMetadataEntity()
           
 
Method Summary
 java.util.List elements()
           
 java.lang.Object getElement(org.opengis.catalog.MetadataEntity.Element element)
           
 java.lang.Object getElement(java.lang.String xpath)
           
 org.opengis.catalog.MetadataEntity.EntityType getEntityType()
          Builds EntityType based on reflection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMetadataEntity

public AbstractMetadataEntity()
Method Detail

elements

public final java.util.List elements()
Specified by:
elements in interface org.opengis.catalog.MetadataEntity
See Also:
org.geotools.metadata.Metadata#elements()

getElement

public final java.lang.Object getElement(java.lang.String xpath)
Specified by:
getElement in interface org.opengis.catalog.MetadataEntity
See Also:
org.geotools.metadata.Metadata#getElement(java.lang.String)

getElement

public java.lang.Object getElement(org.opengis.catalog.MetadataEntity.Element element)
Specified by:
getElement in interface org.opengis.catalog.MetadataEntity
See Also:
org.geotools.metadata.Metadata#getElement(org.geotools.metadata.ElementType)

getEntityType

public org.opengis.catalog.MetadataEntity.EntityType getEntityType()
Builds EntityType based on reflection.

The EntityType will not be built until the first time it is needed.

Specified by:
getEntityType in interface org.opengis.catalog.MetadataEntity
See Also:
org.geotools.metadata.Metadata#getEntity()


Copyright © GeoTools. All Rights Reserved.