uk.org.ogsadai.dataresource.config
Class ProductInfo

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

public class ProductInfo
extends java.lang.Object

Data resource product information.

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

See the data_resource_config.xsd XML Schema.

Author:
The OGSA-DAI Project Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private  java.lang.String mName
           
private  org.w3c.dom.Element mProductInfoElt
           
private  Property mProperty
           
private  java.lang.String mVendor
           
private  java.lang.String mVersion
           
 
Constructor Summary
ProductInfo()
           
 
Method Summary
private  void buildProductInfoDocument()
          Build an XML document containing the product information.
private  void buildProductInfoProperty()
          Create a static product information property containing the product information in XML format.
 void configure(org.w3c.dom.Element elt)
          Create product information by parsing the given element and build an XML document holding this information.
private  void flagAsChanged()
          Flags that the product information has changed and so a new XML element must be generated the next time it is asked for.
 java.lang.String getName()
          Get product name.
 Property getProperty()
          Get product information property.
 java.lang.String getVendor()
          Get vendor name.
 java.lang.String getVersion()
          Get version.
 void setName(java.lang.String name)
          Set product name.
 void setVendor(java.lang.String vendor)
          Set vendor name.
 void setVersion(java.lang.String version)
          Set version.
 
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

mName

private java.lang.String mName

mVendor

private java.lang.String mVendor

mVersion

private java.lang.String mVersion

mProductInfoElt

private org.w3c.dom.Element mProductInfoElt

mProperty

private Property mProperty
Constructor Detail

ProductInfo

public ProductInfo()
Method Detail

configure

public void configure(org.w3c.dom.Element elt)
               throws java.lang.IllegalArgumentException,
                      ExternalModuleException
Create product information by parsing the given element and build an XML document holding this information.

Parameters:
elt - productInfo element from a data resource configuration document.
Throws:
ExternalModuleException - if there is an internal problem with Xerces when building the XML document.
java.lang.IllegalArgumentException - if elt is null or is not a productInfo element.

buildProductInfoDocument

private void buildProductInfoDocument()
Build an XML document containing the product information.

Throws:
ExternalModuleException - if there is an internal problem with Xerces when building the XML document.

buildProductInfoProperty

private void buildProductInfoProperty()
Create a static product information property containing the product information in XML format.


getName

public java.lang.String getName()
Get product name.

Returns:
name of product.

setName

public void setName(java.lang.String name)
Set product name.

Parameters:
name - Name of product.

getVendor

public java.lang.String getVendor()
Get vendor name.

Returns:
vendor name.

setVendor

public void setVendor(java.lang.String vendor)
Set vendor name.

Parameters:
vendor - Vendor name.

getVersion

public java.lang.String getVersion()
Get version.

Returns:
version.

setVersion

public void setVersion(java.lang.String version)
Set version.

Parameters:
version - Product version.

getProperty

public Property getProperty()
Get product information property.

Returns:
product information property.

flagAsChanged

private void flagAsChanged()
Flags that the product information has changed and so a new XML element must be generated the next time it is asked for.