public class CatalogBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
CatalogBuilder.Callback |
Modifier and Type | Field and Description |
---|---|
protected java.net.URI |
baseURI |
protected java.util.List<DatasetBuilder> |
datasetBuilders |
protected java.net.URI |
docBaseURI |
protected java.util.Formatter |
errlog |
protected CalendarDate |
expires |
protected boolean |
fatalError |
protected java.lang.String |
name |
protected java.util.List<Property> |
properties |
protected java.util.List<Service> |
services |
protected java.lang.String |
version |
Constructor and Description |
---|
CatalogBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addDataset(DatasetBuilder d) |
void |
addProperty(Property p) |
void |
addService(Service s) |
Catalog |
buildFromCatref(CatalogRef catref) |
Catalog |
buildFromLocation(java.lang.String location) |
Catalog |
buildFromURI(java.net.URI uri) |
protected DatasetBuilder |
buildOtherDataset(DatasetBuilder parent,
org.jdom2.Element dsElem) |
java.lang.String |
getErrorMessage() |
java.lang.String |
getValidationMessage() |
boolean |
hasFatalError() |
Catalog |
makeCatalog() |
protected DateType |
makeDateType(java.lang.String text,
java.lang.String format,
java.lang.String type) |
protected AccessBuilder |
readAccess(DatasetBuilder dataset,
org.jdom2.Element accessElem) |
void |
readCatalog(CatalogBuilder catBuilder,
org.jdom2.Element catalogElem,
java.net.URI docBaseURI) |
protected DatasetBuilder |
readCatalogRef(DatasetBuilder parent,
org.jdom2.Element catRefElem) |
protected ThreddsMetadata.Contributor |
readContributor(org.jdom2.Element elem) |
protected ThreddsMetadata.Vocab |
readControlledVocabulary(org.jdom2.Element elem) |
protected DatasetBuilder |
readDataset(DatasetBuilder parent,
org.jdom2.Element dsElem) |
protected void |
readDatasetInfo(DatasetBuilder dataset,
org.jdom2.Element dsElem) |
protected long |
readDataSize(org.jdom2.Element parent) |
protected DateType |
readDate(org.jdom2.Element elem) |
protected Documentation |
readDocumentation(org.jdom2.Element s) |
protected double |
readDouble(org.jdom2.Element elem) |
protected TimeDuration |
readDuration(org.jdom2.Element elem) |
protected ThreddsMetadata.GeospatialCoverage |
readGeospatialCoverage(org.jdom2.Element gcElem) |
protected ThreddsMetadata.GeospatialRange |
readGeospatialRange(org.jdom2.Element spElem,
java.lang.String defUnits) |
protected ThreddsMetadata.MetadataOther |
readMetadata(java.util.Map<java.lang.String,java.lang.Object> flds,
DatasetBuilder dataset,
org.jdom2.Element mdataElement) |
protected Property |
readProperty(org.jdom2.Element s) |
protected Service |
readService(org.jdom2.Element s) |
protected ThreddsMetadata.Source |
readSource(org.jdom2.Element elem) |
protected void |
readThreddsMetadataGroup(java.util.Map<java.lang.String,java.lang.Object> flds,
DatasetBuilder dataset,
org.jdom2.Element parent) |
protected DateRange |
readTimeCoverage(org.jdom2.Element tElem) |
static ThreddsMetadata.Variable |
readVariable(org.jdom2.Element varElem) |
protected ThreddsMetadata.VariableGroup |
readVariables(org.jdom2.Element varsElem) |
void |
readXML(CatalogBuilder catBuilder,
java.net.URI uri) |
void |
setBaseURI(java.net.URI baseURI) |
void |
setExpires(CalendarDate expires) |
protected java.util.Map<java.lang.String,java.lang.Object> |
setFields() |
void |
setName(java.lang.String name) |
void |
setVersion(java.lang.String version) |
protected java.net.URI docBaseURI
protected java.util.Formatter errlog
protected boolean fatalError
protected java.lang.String name
protected java.lang.String version
protected CalendarDate expires
protected java.net.URI baseURI
protected java.util.List<Property> properties
protected java.util.List<Service> services
protected java.util.List<DatasetBuilder> datasetBuilders
public Catalog buildFromCatref(CatalogRef catref) throws java.io.IOException
java.io.IOException
public Catalog buildFromLocation(java.lang.String location) throws java.io.IOException
java.io.IOException
public Catalog buildFromURI(java.net.URI uri) throws java.io.IOException
java.io.IOException
public java.lang.String getErrorMessage()
public java.lang.String getValidationMessage()
public boolean hasFatalError()
public void setName(java.lang.String name)
public void setBaseURI(java.net.URI baseURI)
public void setExpires(CalendarDate expires)
public void setVersion(java.lang.String version)
public void addProperty(Property p)
public void addService(Service s)
public void addDataset(DatasetBuilder d)
public Catalog makeCatalog()
protected java.util.Map<java.lang.String,java.lang.Object> setFields()
public void readXML(CatalogBuilder catBuilder, java.net.URI uri) throws java.io.IOException
java.io.IOException
public void readCatalog(CatalogBuilder catBuilder, org.jdom2.Element catalogElem, java.net.URI docBaseURI)
protected DatasetBuilder buildOtherDataset(DatasetBuilder parent, org.jdom2.Element dsElem)
protected AccessBuilder readAccess(DatasetBuilder dataset, org.jdom2.Element accessElem)
protected Property readProperty(org.jdom2.Element s)
protected Service readService(org.jdom2.Element s)
protected DatasetBuilder readCatalogRef(DatasetBuilder parent, org.jdom2.Element catRefElem)
protected DatasetBuilder readDataset(DatasetBuilder parent, org.jdom2.Element dsElem)
protected void readDatasetInfo(DatasetBuilder dataset, org.jdom2.Element dsElem)
protected void readThreddsMetadataGroup(java.util.Map<java.lang.String,java.lang.Object> flds, DatasetBuilder dataset, org.jdom2.Element parent)
protected ThreddsMetadata.Contributor readContributor(org.jdom2.Element elem)
protected long readDataSize(org.jdom2.Element parent)
protected Documentation readDocumentation(org.jdom2.Element s)
protected double readDouble(org.jdom2.Element elem)
protected ThreddsMetadata.GeospatialCoverage readGeospatialCoverage(org.jdom2.Element gcElem)
protected ThreddsMetadata.GeospatialRange readGeospatialRange(org.jdom2.Element spElem, java.lang.String defUnits)
protected ThreddsMetadata.MetadataOther readMetadata(java.util.Map<java.lang.String,java.lang.Object> flds, DatasetBuilder dataset, org.jdom2.Element mdataElement)
protected ThreddsMetadata.Source readSource(org.jdom2.Element elem)
protected DateRange readTimeCoverage(org.jdom2.Element tElem)
protected DateType readDate(org.jdom2.Element elem)
protected DateType makeDateType(java.lang.String text, java.lang.String format, java.lang.String type)
protected TimeDuration readDuration(org.jdom2.Element elem)
protected ThreddsMetadata.VariableGroup readVariables(org.jdom2.Element varsElem)
public static ThreddsMetadata.Variable readVariable(org.jdom2.Element varElem)
protected ThreddsMetadata.Vocab readControlledVocabulary(org.jdom2.Element elem)