/** * Get containing catalog. * * @return containing catalog. */ public InvCatalog getParentCatalog() { if (catalog != null) return catalog; return (parent != null) ? parent.getParentCatalog() : null; }
/** * Get containing catalog. * * @return containing catalog. */ public InvCatalog getParentCatalog() { if (catalog != null) return catalog; return (parent != null) ? parent.getParentCatalog() : null; }
/** * Get containing catalog. * * @return containing catalog. */ public InvCatalog getParentCatalog() { if (catalog != null) return catalog; return (parent != null) ? parent.getParentCatalog() : null; }
/** * resolve reletive URLS against the catalog URL. * * @param ds use ds parent catalog, if it exists * @param href URL to resolve * @return resolved URL */ static public String resolve(InvDataset ds, String href) { InvCatalog cat = ds.getParentCatalog(); if (cat != null) { try { java.net.URI uri = cat.resolveUri(href); href = uri.toString(); } catch (java.net.URISyntaxException e) { logger.warn("InvDatasetImpl.writeHtml: error parsing URL= " + href); } } return href; }
/** * resolve reletive URLS against the catalog URL. * * @param ds use ds parent catalog, if it exists * @param href URL to resolve * @return resolved URL */ static public String resolve(InvDataset ds, String href) { InvCatalog cat = ds.getParentCatalog(); if (cat != null) { try { java.net.URI uri = cat.resolveUri(href); href = uri.toString(); } catch (java.net.URISyntaxException e) { System.err.println("InvDatasetImpl.writeHtml: error parsing URL= " + href); } } return href; }
/** * Return the query fragment referencing this dataset, ie "catalog=catalog.xml&dataset=datasetID" * * @return the query fragment for this dataset */ public String getSubsetUrl() { if (getID() == null) return null; return "catalog=" + getParentCatalog().baseURI.toString() + "&dataset=" + getID(); }
/** * Return the query fragment referencing this dataset, ie "catalog=catalog.xml&dataset=datasetID" * * @return the query fragment for this dataset */ public String getSubsetUrl() { if (getID() == null) return null; return "catalog=" + getParentCatalog().baseURI.toString() + "&dataset=" + getID(); }
/** * Get URL to this dataset. Dataset must have an ID. * Form is catalogURL#DatasetID * * @return URL to this dataset. */ public String getCatalogUrl() { return getParentCatalog().getUriString() + "#" + getID(); }
/** * Return the query fragment referencing this dataset, ie "catalog=catalog.xml&dataset=datasetID" * * @return the query fragment for this dataset */ public String getSubsetUrl() { if (getID() == null) return null; return "catalog=" + getParentCatalog().baseURI.toString() + "&dataset=" + getID(); }
/** * Get URL to this dataset. Dataset must have an ID. * Form is catalogURL#DatasetID * * @return URL to this dataset. */ public String getCatalogUrl() { return getParentCatalog().getUriString() + "#" + getID(); }
/** * Get URL to this dataset. Dataset must have an ID. * Form is catalogURL#DatasetID * * @return URL to this dataset. */ public String getCatalogUrl() { return getParentCatalog().getUriString() + "#" + getID(); }
public Object readMetadataContent(InvDataset dataset, org.jdom2.Element mdataElement) { InvMetadata m = readMetadata(dataset.getParentCatalog(), (InvDatasetImpl) dataset, mdataElement); return m.getThreddsMetadata(); }
public Object readMetadataContent(InvDataset dataset, org.jdom2.Element mdataElement) { InvMetadata m = readMetadata(dataset.getParentCatalog(), (InvDatasetImpl) dataset, mdataElement); return m.getThreddsMetadata(); }
public Object readMetadataContent(InvDataset dataset, org.jdom2.Element mdataElement) { InvMetadata m = readMetadata(dataset.getParentCatalog(), (InvDatasetImpl) dataset, mdataElement); return m.getThreddsMetadata(); }
/** * Construct the standard THREDDS access URI for this dataset access method, * resolve if the URI is relative. * * @return the standard fully resolved THREDDS access URI for this dataset access method, or null if error. */ public URI getStandardUri() { try { InvCatalog cat = dataset.getParentCatalog(); if (cat == null) return new URI(getUnresolvedUrlName()); return cat.resolveUri(getUnresolvedUrlName()); } catch (java.net.URISyntaxException e) { logger.warn("Error parsing URL= " + getUnresolvedUrlName()); return null; } }
/** * Construct the standard THREDDS access URI for this dataset access method, * resolve if the URI is relative. * * @return the standard fully resolved THREDDS access URI for this dataset access method, or null if error. */ public URI getStandardUri() { try { InvCatalog cat = dataset.getParentCatalog(); if (cat == null) return new URI(getUnresolvedUrlName()); return cat.resolveUri(getUnresolvedUrlName()); } catch (java.net.URISyntaxException e) { System.err.println("Error parsing URL= " + getUnresolvedUrlName()); return null; } }
/** * Construct the standard THREDDS access URI for this dataset access method, * resolve if the URI is relative. * * @return the standard fully resolved THREDDS access URI for this dataset access method, or null if error. */ public URI getStandardUri() { try { InvCatalog cat = dataset.getParentCatalog(); if (cat == null) return new URI(getUnresolvedUrlName()); return cat.resolveUri(getUnresolvedUrlName()); } catch (java.net.URISyntaxException e) { logger.warn("Error parsing URL= " + getUnresolvedUrlName()); return null; } }
public static InvCatalog subsetCatalogOnDataset( InvCatalog catalog, InvDataset dataset) { if ( catalog == null ) throw new IllegalArgumentException( "Catalog may not be null." ); if ( dataset == null ) throw new IllegalArgumentException( "Dataset may not be null." ); if ( dataset.getParentCatalog() != catalog ) throw new IllegalArgumentException( "Catalog must contain the dataset." ); URI docBaseUri = formDocBaseUriForSubsetCatalog( catalog, dataset ); InvCatalogImpl resultCatalog = new InvCatalogImpl( dataset.getName(), "1.0", docBaseUri ); List<InvService> copiedServices = copyServicesIntoCopiedCatalog( catalog, resultCatalog ); InvDataset topDs = DeepCopyUtils.copyDataset( dataset, copiedServices, true ); resultCatalog.addDataset( (InvDatasetImpl) topDs ); resultCatalog.finish(); return resultCatalog; }
public static InvCatalog subsetCatalogOnDataset( InvCatalog catalog, InvDataset dataset) { if ( catalog == null ) throw new IllegalArgumentException( "Catalog may not be null." ); if ( dataset == null ) throw new IllegalArgumentException( "Dataset may not be null." ); if ( dataset.getParentCatalog() != catalog ) throw new IllegalArgumentException( "Catalog must contain the dataset." ); URI docBaseUri = formDocBaseUriForSubsetCatalog( catalog, dataset ); InvCatalogImpl resultCatalog = new InvCatalogImpl( dataset.getName(), "1.0", docBaseUri ); List<InvService> copiedServices = copyServicesIntoCopiedCatalog( catalog, resultCatalog ); InvDataset topDs = DeepCopyUtils.copyDataset( dataset, copiedServices, true ); resultCatalog.addDataset( (InvDatasetImpl) topDs ); resultCatalog.finish(); return resultCatalog; }
public static InvCatalog subsetCatalogOnDataset( InvCatalog catalog, InvDataset dataset) { if ( catalog == null ) throw new IllegalArgumentException( "Catalog may not be null." ); if ( dataset == null ) throw new IllegalArgumentException( "Dataset may not be null." ); if ( dataset.getParentCatalog() != catalog ) throw new IllegalArgumentException( "Catalog must contain the dataset." ); URI docBaseUri = formDocBaseUriForSubsetCatalog( catalog, dataset ); InvCatalogImpl resultCatalog = new InvCatalogImpl( dataset.getName(), "1.0", docBaseUri ); List<InvService> copiedServices = copyServicesIntoCopiedCatalog( catalog, resultCatalog ); InvDataset topDs = DeepCopyUtils.copyDataset( dataset, copiedServices, true ); resultCatalog.addDataset( (InvDatasetImpl) topDs ); resultCatalog.finish(); return resultCatalog; }