public class CatalogBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.net.URI |
baseURI |
protected java.util.List<DatasetBuilder> |
datasetBuilders |
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() |
CatalogBuilder(Catalog from) |
Modifier and Type | Method and Description |
---|---|
void |
addDataset(DatasetBuilder d) |
void |
addProperty(Property p) |
void |
addService(Service s) |
Catalog |
buildFromCatref(CatalogRef catref) |
Catalog |
buildFromJdom(org.jdom2.Element root,
java.net.URI docBaseUri) |
Catalog |
buildFromLocation(java.lang.String location,
java.net.URI baseURI) |
Catalog |
buildFromStream(java.io.InputStream stream,
java.net.URI docBaseUri) |
Catalog |
buildFromString(java.lang.String catalogAsString,
java.net.URI docBaseUri) |
Catalog |
buildFromURI(java.net.URI uri) |
protected DatasetBuilder |
buildOtherDataset(DatasetBuilder parent,
org.jdom2.Element dsElem) |
java.lang.Iterable<DatasetBuilder> |
getDatasets() |
java.lang.String |
getErrorMessage() |
DatasetBuilder |
getTopDataset() |
java.lang.String |
getValidationMessage() |
boolean |
hasFatalError() |
boolean |
hasService(java.lang.String name) |
boolean |
hasServiceInDataset(java.lang.String name) |
Catalog |
makeCatalog() |
protected DateType |
makeDateType(java.lang.String text,
java.lang.String format,
java.lang.String type,
Calendar calendar) |
protected AccessBuilder |
readAccess(DatasetBuilder dataset,
org.jdom2.Element accessElem) |
protected Calendar |
readCalendar(java.lang.String calendarAttribValue) |
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,
Calendar calendar) |
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 |
removeAnyService() |
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.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 CatalogBuilder()
public CatalogBuilder(Catalog from)
public Catalog buildFromLocation(java.lang.String location, java.net.URI baseURI)
public Catalog buildFromURI(java.net.URI uri)
public Catalog buildFromCatref(CatalogRef catref)
public Catalog buildFromString(java.lang.String catalogAsString, java.net.URI docBaseUri)
public Catalog buildFromStream(java.io.InputStream stream, java.net.URI docBaseUri)
public Catalog buildFromJdom(org.jdom2.Element root, java.net.URI docBaseUri)
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 removeAnyService()
public void addDataset(DatasetBuilder d)
public Catalog makeCatalog()
protected java.util.Map<java.lang.String,java.lang.Object> setFields()
@Nullable public DatasetBuilder getTopDataset()
public java.lang.Iterable<DatasetBuilder> getDatasets()
public boolean hasService(java.lang.String name)
public boolean hasServiceInDataset(java.lang.String name)
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 Calendar readCalendar(java.lang.String calendarAttribValue)
protected DateType makeDateType(java.lang.String text, java.lang.String format, java.lang.String type, Calendar calendar)
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)