thredds.cataloggen.config
Class CatGenConfigMetadataFactory

java.lang.Object
  extended by thredds.cataloggen.config.CatGenConfigMetadataFactory
All Implemented Interfaces:
MetadataConverterIF

public class CatGenConfigMetadataFactory
extends Object
implements MetadataConverterIF

Title: Catalog Generator

Description: Tool for generating THREDDS catalogs.

Copyright: Copyright (c) 2001

Company: UCAR/Unidata

Version:
1.0
Author:
Ethan Davis

Constructor Summary
CatGenConfigMetadataFactory()
           
 
Method Summary
 void addMetadataContent(org.jdom.Element mdataJdomElement, Object contentObject)
          Serialize the InvMetadata content object to a org.w3c.dom.Element
 Object readMetadataContent(InvDataset dataset, org.jdom.Element mdataElement)
          Create an InvMetadata content object from an org.w3c.dom.Element.
 Object readMetadataContentFromURL(InvDataset dataset, URI uri)
          Create an InvMetadata content object from an XML document at a named URL.
 boolean validateMetadataContent(Object contentObject, StringBuilder out)
          Validate the content object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatGenConfigMetadataFactory

public CatGenConfigMetadataFactory()
Method Detail

readMetadataContent

public Object readMetadataContent(InvDataset dataset,
                                  org.jdom.Element mdataElement)
Create an InvMetadata content object from an org.w3c.dom.Element. The content object is an ArrayList of CatalogGenConfig instances.

Specified by:
readMetadataContent in interface MetadataConverterIF
Parameters:
dataset - - the containing dataset
mdataElement - - the metadata element as an org.w3c.dom.Element
Returns:
an object representing the metadata which is an ArrayList of CatalogGenConfig instances.

readMetadataContentFromURL

public Object readMetadataContentFromURL(InvDataset dataset,
                                         URI uri)
                                  throws IOException
Description copied from interface: MetadataConverterIF
Create an InvMetadata content object from an XML document at a named URL.

Specified by:
readMetadataContentFromURL in interface MetadataConverterIF
Parameters:
dataset - : the containing dataset
uri - : the URI that the XML doc is at.
Returns:
an object representing the metadata content. The type depends on the metadata handler.
Throws:
IOException - on read error

addMetadataContent

public void addMetadataContent(org.jdom.Element mdataJdomElement,
                               Object contentObject)
Serialize the InvMetadata content object to a org.w3c.dom.Element

Specified by:
addMetadataContent in interface MetadataConverterIF
Parameters:
mdataJdomElement - - add content to this org.w3c.dom.Element
contentObject - - the content model

validateMetadataContent

public boolean validateMetadataContent(Object contentObject,
                                       StringBuilder out)
Validate the content object.

Specified by:
validateMetadataContent in interface MetadataConverterIF
Parameters:
contentObject - : the content object
out - : print errors here
Returns:
true if no fatal validation errors.


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.