Package thredds.cataloggen.config
Class CatGenConfigMetadataFactory
- java.lang.Object
-
- 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
-
-
Constructor Summary
Constructors Constructor Description CatGenConfigMetadataFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMetadataContent(org.jdom2.Element mdataJdomElement, Object contentObject)
Serialize the InvMetadata content object to a org.w3c.dom.ElementObject
readMetadataContent(InvDataset dataset, org.jdom2.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.
-
-
-
Method Detail
-
readMetadataContent
public Object readMetadataContent(InvDataset dataset, org.jdom2.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 interfaceMetadataConverterIF
- Parameters:
dataset
- - the containing datasetmdataElement
- - 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 interfaceMetadataConverterIF
- Parameters:
dataset
- : the containing dataseturi
- : 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.jdom2.Element mdataJdomElement, Object contentObject)
Serialize the InvMetadata content object to a org.w3c.dom.Element- Specified by:
addMetadataContent
in interfaceMetadataConverterIF
- Parameters:
mdataJdomElement
- - add content to this org.w3c.dom.ElementcontentObject
- - the content model
-
validateMetadataContent
public boolean validateMetadataContent(Object contentObject, StringBuilder out)
Validate the content object.- Specified by:
validateMetadataContent
in interfaceMetadataConverterIF
- Parameters:
contentObject
- : the content objectout
- : print errors here- Returns:
- true if no fatal validation errors.
-
-