public class InvCatalogFactory10 extends java.lang.Object implements InvCatalogConvertIF, MetadataConverterIF
Modifier and Type | Field and Description |
---|---|
static org.jdom2.Namespace |
defNS |
static org.jdom2.Namespace |
ncmlNS |
static org.jdom2.Namespace |
xlinkNS |
Constructor and Description |
---|
InvCatalogFactory10() |
Modifier and Type | Method and Description |
---|---|
void |
addMetadataContent(org.jdom2.Element mdataElement,
java.lang.Object contentObject)
Serialize the InvMetadata content object to a org.jdom2.Element and add ro the
|
java.util.List<PathAliasReplacement> |
getDataRootLocationAliasExpanders() |
protected DateType |
makeDateType(java.lang.String text,
java.lang.String format,
java.lang.String type) |
InvCatalogImpl |
parseXML(InvCatalogFactory fac,
org.jdom2.Document jdomDoc,
java.net.URI uri)
Create an InvCatalogImpl from a parsed document tree.
|
protected InvAccessImpl |
readAccess(InvDatasetImpl dataset,
org.jdom2.Element accessElem) |
protected InvCatalogImpl |
readCatalog(org.jdom2.Element catalogElem,
java.net.URI docBaseURI) |
protected InvCatalogRef |
readCatalogRef(InvCatalogImpl cat,
InvDatasetImpl parent,
org.jdom2.Element catRefElem,
java.net.URI baseURI) |
protected ThreddsMetadata.Contributor |
readContributor(org.jdom2.Element elem) |
protected ThreddsMetadata.Vocab |
readControlledVocabulary(org.jdom2.Element elem) |
protected InvDatasetImpl |
readDataset(InvCatalogImpl catalog,
InvDatasetImpl parent,
org.jdom2.Element dsElem,
java.net.URI base) |
protected void |
readDatasetInfo(InvCatalogImpl catalog,
InvDatasetImpl dataset,
org.jdom2.Element dsElem,
java.net.URI base) |
protected DataRootConfig |
readDatasetRoot(org.jdom2.Element s) |
protected InvDatasetScan |
readDatasetScan(InvCatalogImpl catalog,
InvDatasetImpl parent,
org.jdom2.Element dsElem,
java.net.URI base) |
protected java.util.Map<java.lang.String,ProxyDatasetHandler> |
readDatasetScanAddProxies(org.jdom2.Element addProxiesElem,
org.jdom2.Element addLatestElem,
InvCatalogImpl catalog) |
protected DatasetEnhancer |
readDatasetScanAddTimeCoverage(org.jdom2.Element addTimeCovElem) |
protected CrawlableDatasetLabeler |
readDatasetScanIdentifier(org.jdom2.Element identifierElem) |
protected CrawlableDatasetLabeler |
readDatasetScanNamer(org.jdom2.Element namerElem) |
protected InvDatasetScan |
readDatasetScanNew(InvCatalogImpl catalog,
InvDatasetImpl parent,
org.jdom2.Element dsElem,
java.net.URI base) |
protected CrawlableDatasetSorter |
readDatasetScanSorter(org.jdom2.Element sorterElem) |
protected double |
readDataSize(org.jdom2.Element parent) |
protected DateType |
readDate(org.jdom2.Element elem) |
protected InvDocumentation |
readDocumentation(InvCatalog cat,
org.jdom2.Element s) |
protected double |
readDouble(org.jdom2.Element elem) |
protected TimeDuration |
readDuration(org.jdom2.Element elem) |
protected InvDatasetImpl |
readFeatureCollection(InvCatalogImpl catalog,
InvDatasetImpl parent,
org.jdom2.Element dsElem,
java.net.URI base) |
protected ThreddsMetadata.GeospatialCoverage |
readGeospatialCoverage(org.jdom2.Element gcElem) |
protected ThreddsMetadata.Range |
readGeospatialRange(org.jdom2.Element spElem,
java.lang.String defUnits) |
protected InvMetadata |
readMetadata(InvCatalog catalog,
InvDatasetImpl dataset,
org.jdom2.Element mdataElement) |
java.lang.Object |
readMetadataContent(InvDataset dataset,
org.jdom2.Element mdataElement)
Create an InvMetadata content object from an org.jdom2.Element.
|
java.lang.Object |
readMetadataContentFromURL(InvDataset dataset,
java.net.URI uri)
Create an InvMetadata content object from an XML document at a named URL.
|
protected InvProperty |
readProperty(org.jdom2.Element s) |
protected InvService |
readService(org.jdom2.Element s,
java.net.URI baseURI) |
protected ThreddsMetadata.Source |
readSource(org.jdom2.Element elem) |
protected void |
readThreddsMetadata(InvCatalog catalog,
InvDatasetImpl dataset,
org.jdom2.Element parent,
ThreddsMetadata tmg) |
protected DateRange |
readTimeCoverage(org.jdom2.Element tElem) |
protected ThreddsMetadata.Variable |
readVariable(org.jdom2.Element varElem) |
protected ThreddsMetadata.Variables |
readVariables(InvCatalog cat,
InvDataset ds,
org.jdom2.Element varsElem) |
void |
registerMetadataConverter(MetadataType type,
MetadataConverterIF converter) |
void |
setDataRootLocationAliasExpanders(java.util.List<PathAliasReplacement> dataRootLocAliasExpanders) |
void |
setVersion(java.lang.String version) |
static void |
useBytesForDataSize(boolean b) |
boolean |
validateMetadataContent(java.lang.Object contentObject,
java.lang.StringBuilder out)
Validate internal data structures.
|
org.jdom2.Document |
writeCatalog(InvCatalogImpl cat) |
protected org.jdom2.Element |
writeContributor(ThreddsMetadata.Contributor c) |
protected org.jdom2.Element |
writeDate(java.lang.String name,
DateType date) |
org.jdom2.Element |
writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc) |
protected void |
writeInheritedMetadata(org.jdom2.Element elem,
ThreddsMetadata tmi) |
protected org.jdom2.Element |
writeSource(java.lang.String elementName,
ThreddsMetadata.Source p) |
protected void |
writeThreddsMetadata(org.jdom2.Element elem,
ThreddsMetadata tmg) |
protected org.jdom2.Element |
writeTimeCoverage(DateRange t) |
protected org.jdom2.Element |
writeVariable(ThreddsMetadata.Variable v) |
protected org.jdom2.Element |
writeVariables(ThreddsMetadata.Variables vs) |
void |
writeXML(InvCatalogImpl catalog,
java.io.OutputStream os)
Write the catalog as an XML document to the specified stream.
|
void |
writeXML(InvCatalogImpl catalog,
java.io.OutputStream os,
boolean raw)
Write the catalog as an XML document to the specified stream.
|
public static final org.jdom2.Namespace defNS
public static final org.jdom2.Namespace xlinkNS
public static final org.jdom2.Namespace ncmlNS
public static void useBytesForDataSize(boolean b)
public void setDataRootLocationAliasExpanders(java.util.List<PathAliasReplacement> dataRootLocAliasExpanders)
public java.util.List<PathAliasReplacement> getDataRootLocationAliasExpanders()
public InvCatalogImpl parseXML(InvCatalogFactory fac, org.jdom2.Document jdomDoc, java.net.URI uri)
InvCatalogConvertIF
parseXML
in interface InvCatalogConvertIF
fac
- use this factoryjdomDoc
- : a parsed document tree.uri
- : the URI for the document.public void registerMetadataConverter(MetadataType type, MetadataConverterIF converter)
public void setVersion(java.lang.String version)
protected InvAccessImpl readAccess(InvDatasetImpl dataset, org.jdom2.Element accessElem)
protected InvCatalogImpl readCatalog(org.jdom2.Element catalogElem, java.net.URI docBaseURI)
protected InvCatalogRef readCatalogRef(InvCatalogImpl cat, InvDatasetImpl parent, org.jdom2.Element catRefElem, java.net.URI baseURI)
protected ThreddsMetadata.Contributor readContributor(org.jdom2.Element elem)
protected ThreddsMetadata.Vocab readControlledVocabulary(org.jdom2.Element elem)
protected InvDatasetImpl readDataset(InvCatalogImpl catalog, InvDatasetImpl parent, org.jdom2.Element dsElem, java.net.URI base)
protected void readDatasetInfo(InvCatalogImpl catalog, InvDatasetImpl dataset, org.jdom2.Element dsElem, java.net.URI base)
protected InvDatasetImpl readFeatureCollection(InvCatalogImpl catalog, InvDatasetImpl parent, org.jdom2.Element dsElem, java.net.URI base)
protected InvDatasetScan readDatasetScan(InvCatalogImpl catalog, InvDatasetImpl parent, org.jdom2.Element dsElem, java.net.URI base)
protected InvDatasetScan readDatasetScanNew(InvCatalogImpl catalog, InvDatasetImpl parent, org.jdom2.Element dsElem, java.net.URI base)
protected CrawlableDatasetLabeler readDatasetScanIdentifier(org.jdom2.Element identifierElem)
protected CrawlableDatasetLabeler readDatasetScanNamer(org.jdom2.Element namerElem)
protected CrawlableDatasetSorter readDatasetScanSorter(org.jdom2.Element sorterElem)
protected java.util.Map<java.lang.String,ProxyDatasetHandler> readDatasetScanAddProxies(org.jdom2.Element addProxiesElem, org.jdom2.Element addLatestElem, InvCatalogImpl catalog)
protected DatasetEnhancer readDatasetScanAddTimeCoverage(org.jdom2.Element addTimeCovElem)
protected DataRootConfig readDatasetRoot(org.jdom2.Element s)
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 InvDocumentation readDocumentation(InvCatalog cat, org.jdom2.Element s)
protected double readDouble(org.jdom2.Element elem)
protected ThreddsMetadata.GeospatialCoverage readGeospatialCoverage(org.jdom2.Element gcElem)
protected ThreddsMetadata.Range readGeospatialRange(org.jdom2.Element spElem, java.lang.String defUnits)
protected InvMetadata readMetadata(InvCatalog catalog, InvDatasetImpl dataset, org.jdom2.Element mdataElement)
public java.lang.Object readMetadataContent(InvDataset dataset, org.jdom2.Element mdataElement)
MetadataConverterIF
readMetadataContent
in interface MetadataConverterIF
dataset
- : the containing datasetmdataElement
- : the public java.lang.Object readMetadataContentFromURL(InvDataset dataset, java.net.URI uri) throws java.io.IOException
MetadataConverterIF
readMetadataContentFromURL
in interface MetadataConverterIF
dataset
- : the containing dataseturi
- : the URI that the XML doc is at.java.io.IOException
- on read errorpublic boolean validateMetadataContent(java.lang.Object contentObject, java.lang.StringBuilder out)
MetadataConverterIF
validateMetadataContent
in interface MetadataConverterIF
contentObject
- : the content objectout
- : print errors herepublic void addMetadataContent(org.jdom2.Element mdataElement, java.lang.Object contentObject)
MetadataConverterIF
addMetadataContent
in interface MetadataConverterIF
mdataElement
- : the org.w3c.dom.Element to add tocontentObject
- : the InvMetadata content objectprotected InvProperty readProperty(org.jdom2.Element s)
protected ThreddsMetadata.Source readSource(org.jdom2.Element elem)
protected InvService readService(org.jdom2.Element s, java.net.URI baseURI)
protected double readDataSize(org.jdom2.Element parent)
protected DateRange readTimeCoverage(org.jdom2.Element tElem)
protected void readThreddsMetadata(InvCatalog catalog, InvDatasetImpl dataset, org.jdom2.Element parent, ThreddsMetadata tmg)
protected ThreddsMetadata.Variable readVariable(org.jdom2.Element varElem)
protected ThreddsMetadata.Variables readVariables(InvCatalog cat, InvDataset ds, org.jdom2.Element varsElem)
public void writeXML(InvCatalogImpl catalog, java.io.OutputStream os, boolean raw) throws java.io.IOException
writeXML
in interface InvCatalogConvertIF
catalog
- write this catalogos
- write to this OutputStreamraw
- write raw file if true (for server configuration)java.io.IOException
public void writeXML(InvCatalogImpl catalog, java.io.OutputStream os) throws java.io.IOException
writeXML
in interface InvCatalogConvertIF
catalog
- write this catalogos
- write to this OutputStreamjava.io.IOException
public org.jdom2.Document writeCatalog(InvCatalogImpl cat)
protected org.jdom2.Element writeContributor(ThreddsMetadata.Contributor c)
protected org.jdom2.Element writeDate(java.lang.String name, DateType date)
public org.jdom2.Element writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc)
protected org.jdom2.Element writeSource(java.lang.String elementName, ThreddsMetadata.Source p)
protected void writeInheritedMetadata(org.jdom2.Element elem, ThreddsMetadata tmi)
protected void writeThreddsMetadata(org.jdom2.Element elem, ThreddsMetadata tmg)
protected org.jdom2.Element writeTimeCoverage(DateRange t)
protected org.jdom2.Element writeVariable(ThreddsMetadata.Variable v)
protected org.jdom2.Element writeVariables(ThreddsMetadata.Variables vs)