Package thredds.client.catalog.tools
Class CatalogXmlWriter
- java.lang.Object
-
- thredds.client.catalog.tools.CatalogXmlWriter
-
public class CatalogXmlWriter extends Object
Write client side catalogs out as XML. Used for server catalogs too. Note there is no reference to the catalog's baseURI.- Since:
- 1/11/2015
-
-
Constructor Summary
Constructors Constructor Description CatalogXmlWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
useBytesForDataSize(boolean b)
org.jdom2.Document
writeCatalog(Catalog cat)
protected org.jdom2.Element
writeContributor(ThreddsMetadata.Contributor c)
protected org.jdom2.Element
writeDate(String name, DateType date)
org.jdom2.Element
writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
protected void
writeInheritedMetadata(org.jdom2.Element elem, Dataset ds)
protected org.jdom2.Element
writeSource(String elementName, ThreddsMetadata.Source p)
protected void
writeThreddsMetadata(org.jdom2.Element elem, ThreddsMetadataContainer ds)
protected org.jdom2.Element
writeTimeCoverage(DateRange t)
protected org.jdom2.Element
writeVariable(ThreddsMetadata.Variable v)
protected org.jdom2.Element
writeVariables(ThreddsMetadata.VariableGroup vs)
String
writeXML(Catalog catalog)
void
writeXML(Catalog catalog, OutputStream os)
Write the catalog as an XML document to the specified stream.void
writeXML(Catalog catalog, OutputStream os, boolean raw)
Write the catalog as an XML document to the specified stream.
-
-
-
Method Detail
-
useBytesForDataSize
public static void useBytesForDataSize(boolean b)
-
writeXML
public void writeXML(Catalog catalog, OutputStream os, boolean raw) throws IOException
Write the catalog as an XML document to the specified stream.- Parameters:
catalog
- write this catalogos
- write to this OutputStreamraw
- write raw file if true (for server configuration)- Throws:
IOException
-
writeXML
public String writeXML(Catalog catalog) throws IOException
- Throws:
IOException
-
writeXML
public void writeXML(Catalog catalog, OutputStream os) throws IOException
Write the catalog as an XML document to the specified stream.- Parameters:
catalog
- write this catalogos
- write to this OutputStream- Throws:
IOException
-
writeCatalog
public org.jdom2.Document writeCatalog(Catalog cat)
-
writeContributor
protected org.jdom2.Element writeContributor(ThreddsMetadata.Contributor c)
-
writeGeospatialCoverage
public org.jdom2.Element writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
-
writeSource
protected org.jdom2.Element writeSource(String elementName, ThreddsMetadata.Source p)
-
writeInheritedMetadata
protected void writeInheritedMetadata(org.jdom2.Element elem, Dataset ds)
-
writeThreddsMetadata
protected void writeThreddsMetadata(org.jdom2.Element elem, ThreddsMetadataContainer ds)
-
writeTimeCoverage
protected org.jdom2.Element writeTimeCoverage(DateRange t)
-
writeVariable
protected org.jdom2.Element writeVariable(ThreddsMetadata.Variable v)
-
writeVariables
protected org.jdom2.Element writeVariables(ThreddsMetadata.VariableGroup vs)
-
-