uk.org.ogsadai.dataresource.config
Class MetaData

java.lang.Object
  |
  +--uk.org.ogsadai.dataresource.config.MetaData

public class MetaData
extends java.lang.Object

General data resource meta data.

The information is set up using an XML fragment from a data resource configuration document. Specifically the metaData element.

Child elements with the callback attribute are assumed to be dynamic properties - the value of the attribute contains the name of the class implemnting the dynamic property.

All other child elements become static properties whose value is just the element and its children.

The productInfo sub-element is ignored. This can be handled by the ProductInfo class in this package.

Child elements with name xmlMetaData are also ignored.

See the data_resource_config.xsd XML Schema.

Author:
The OGSA-DAI Project Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private  Property[] mProperties
           
 
Constructor Summary
MetaData()
           
 
Method Summary
private  void buildProperties(org.w3c.dom.Element[] metaData)
          Construct resource properties from the meta data.
 void configure(org.w3c.dom.Element elt)
          Create meta data information by parsing the given element into a collection of its child elements.
 Property[] getProperties()
          Gets the resource properties that expose the application-specific data resource meta-data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

mProperties

private Property[] mProperties
Constructor Detail

MetaData

public MetaData()
Method Detail

configure

public void configure(org.w3c.dom.Element elt)
               throws java.lang.IllegalArgumentException,
                      DynamicPropertyCreationException
Create meta data information by parsing the given element into a collection of its child elements.

Parameters:
elt - metaData element from a data resource configuration document.
Throws:
DynamicPropertyCreationException - if a dynamic property callback class cannot be loaded or found, an instance of this class cannot be created or if the class does not implement the PropertyCallback interface.
java.lang.IllegalArgumentException - if elt is null or is not a metaData element.

getProperties

public Property[] getProperties()
Gets the resource properties that expose the application-specific data resource meta-data.

Returns:
Resource properties exposing the data resource meta-data.

buildProperties

private void buildProperties(org.w3c.dom.Element[] metaData)
                      throws DynamicPropertyCreationException
Construct resource properties from the meta data.

Parameters:
metaData - The meta data in the form of XML fragments.
Throws:
DynamicPropertyCreationException - if a dynamic property callback class cannot be loaded or found, an instance of this class cannot be created or if the class does not implement the PropertyCallback interface.