private InvDatasetImpl openResolver(String urlString, ucar.nc2.util.CancelTask task, Result result) { InvCatalogFactory catFactory = new InvCatalogFactory("", false); InvCatalogImpl catalog = catFactory.readXML(urlString); if (catalog == null) { result.errLog.format("Couldnt open Resolver %s %n ", urlString); return null; } StringBuilder buff = new StringBuilder(); if (!catalog.check(buff)) { result.errLog.format("Invalid catalog from Resolver <%s>%n%s%n", urlString, buff.toString()); result.fatalError = true; return null; } InvDataset top = catalog.getDataset(); if (top.hasAccess()) return (InvDatasetImpl) top; else { java.util.List datasets = top.getDatasets(); return (InvDatasetImpl) datasets.get(0); } }
cat.filter(filter); proxy = (InvDatasetImpl) cat.getDataset(); if (proxy.getMark()) { proxy.setName(proxy.getName() + " (EMPTY)");
private InvDatasetImpl openResolver(String urlString, ucar.nc2.util.CancelTask task, Result result) { InvCatalogFactory catFactory = new InvCatalogFactory("", false); InvCatalogImpl catalog = catFactory.readXML(urlString); if (catalog == null) { result.errLog.format("Couldnt open Resolver %s %n ", urlString); return null; } StringBuilder buff = new StringBuilder(); if (!catalog.check(buff)) { result.errLog.format("Invalid catalog from Resolver <%s>%n%s%n", urlString, buff.toString()); result.fatalError = true; return null; } InvDataset top = catalog.getDataset(); if (top.hasAccess()) return (InvDatasetImpl) top; else { java.util.List datasets = top.getDatasets(); return (InvDatasetImpl) datasets.get(0); } }
cat.filter(filter); proxy = cat.getDataset(); if (proxy.getMark()) { proxy.setName(proxy.getName() + " (EMPTY)");
private InvDatasetImpl openResolver(String urlString, ucar.nc2.util.CancelTask task, Result result) { InvCatalogFactory catFactory = new InvCatalogFactory("", false); InvCatalogImpl catalog = catFactory.readXML(urlString); if (catalog == null) { result.errLog.format("Couldnt open Resolver %s %n ", urlString); return null; } StringBuilder buff = new StringBuilder(); if (!catalog.check(buff)) { result.errLog.format("Invalid catalog from Resolver <%s>%n%s%n", urlString, buff.toString()); result.fatalError = true; return null; } InvDataset top = catalog.getDataset(); if (top.hasAccess()) return (InvDatasetImpl) top; else { java.util.List datasets = top.getDatasets(); return (InvDatasetImpl) datasets.get(0); } }
cat.filter(filter); proxy = cat.getDataset(); if (proxy.getMark()) { proxy.setName(proxy.getName() + " (EMPTY)");
@Override public InvCatalogImpl makeCatalog(String match, String orgPath, URI catURI) { logger.debug("FMRC make catalog for " + match + " " + catURI); State localState = checkState(); try { if ((match == null) || (match.length() == 0)) { InvCatalogImpl main = makeCatalogTop(catURI, localState); main.addService(virtualService); main.getDataset().getLocalMetadataInheritable().setServiceName(virtualService.getName()); main.finish(); return main; } else if (match.equals(RUNS) && wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Runs)) return makeCatalogRuns(catURI, localState); else if (match.equals(OFFSET) && wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.ConstantOffsets)) return makeCatalogOffsets(catURI, localState); else if (match.equals(FORECAST) && wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.ConstantForecasts)) return makeCatalogForecasts(catURI, localState); else if (match.startsWith(FILES) && wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.Files)) { return makeCatalogFiles(catURI, localState, datasetCollection.getFilenames(), true); } } catch (Exception e) { logger.error("Error making catalog for " + path, e); } return null; }
InvCatalogImpl main = makeCatalogTop(catURI, localState); main.addService(virtualService); main.getDataset().getLocalMetadataInheritable().setServiceName(virtualService.getName()); main.finish(); return main;
@Override public InvCatalogImpl makeCatalog(String match, String orgPath, URI catURI) { logger.debug("FcPoint make catalog for " + match + " " + catURI); State localState = checkState(); try { if ((match == null) || (match.length() == 0)) { InvCatalogImpl main = makeCatalogTop(catURI, localState); main.addService(collectionService); main.getDataset().getLocalMetadataInheritable().setServiceName(collectionService.getName()); main.finish(); return main; } else if (match.startsWith(FILES) && wantDatasets.contains(FeatureCollectionConfig.PointDatasetType.Files)) { return makeCatalogFiles(catURI, localState, datasetCollection.getFilenames(), true); } } catch (Exception e) { logger.error("Error making catalog for " + path, e); } return null; }
@Override public InvCatalogImpl makeCatalog(String match, String orgPath, URI catURI) { logger.debug("FcPoint make catalog for " + match + " " + catURI); State localState = null; try { localState = checkState(); } catch (IOException e) { logger.error("Error in checkState", e); return null; } try { if ((match == null) || (match.length() == 0)) { InvCatalogImpl main = makeCatalogTop(catURI, localState); main.addService(collectionService); main.getDataset().getLocalMetadataInheritable().setServiceName(collectionService.getName()); main.finish(); return main; } else if (match.startsWith(FILES) && wantDatasets.contains(FeatureCollectionConfig.PointDatasetType.Files)) { return makeCatalogFiles(catURI, localState, dcm.getFilenames(), true); } } catch (Exception e) { logger.error("Error making catalog for " + path, e); } return null; }
/** * Constructor. * @param catalogURL the catalog URL * @param configObj a JDOM Element, example: * <pre> * <any> * <serviceType>OPENDAP</serviceType> * </any> * </pre> */ public CrawlableCatalog(String catalogURL, Object configObj) { this.catalogURL = catalogURL; this.configObj = configObj; if (configObj instanceof Element) { Element configElement = (Element) configObj; Element serviceElement = configElement.getChild("serviceType", NcMLReader.ncNS); if (null != serviceElement) { String service = serviceElement.getTextTrim(); serviceType = ServiceType.getType(service); } } InvCatalogFactory catFactory = InvCatalogFactory.getDefaultFactory(true); catalog = catFactory.readXML(catalogURL); dataset = (InvDatasetImpl) catalog.getDataset(); isCollection = true; }
/** * Constructor. * @param catalogURL the catalog URL * @param configObj a JDOM Element, example: * <pre> * <any> * <serviceType>OPENDAP</serviceType> * </any> * </pre> */ public CrawlableCatalog(String catalogURL, Object configObj) { this.catalogURL = catalogURL; this.configObj = configObj; if (configObj instanceof Element) { Element configElement = (Element) configObj; Element serviceElement = configElement.getChild("serviceType", XMLEntityResolver.ncmlNS); if (null != serviceElement) { String service = serviceElement.getTextTrim(); serviceType = ServiceType.getType(service); } } InvCatalogFactory catFactory = InvCatalogFactory.getDefaultFactory(true); catalog = catFactory.readXML(catalogURL); dataset = (InvDatasetImpl) catalog.getDataset(); isCollection = true; }
/** * Constructor. * @param catalogURL the catalog URL * @param configObj a JDOM Element, example: * <pre> * <any> * <serviceType>OPENDAP</serviceType> * </any> * </pre> */ public CrawlableCatalog(String catalogURL, Object configObj) { this.catalogURL = catalogURL; this.configObj = configObj; if (configObj instanceof Element) { Element configElement = (Element) configObj; Element serviceElement = configElement.getChild("serviceType", NcMLReader.ncNS); if (null != serviceElement) { String service = serviceElement.getTextTrim(); serviceType = ServiceType.getType(service); } } InvCatalogFactory catFactory = InvCatalogFactory.getDefaultFactory(true); catalog = catFactory.readXML(catalogURL); dataset = (InvDatasetImpl) catalog.getDataset(); isCollection = true; }
InvDataset curTopDs = curCatalog.getDataset(); InvDataset targetDs = curCatRefInfo.getInvDataset(); InvDataset targetParentDs = curCatRefInfo.getInvDataset().getParent();
InvDataset curTopDs = curCatalog.getDataset(); InvDataset targetDs = curCatRefInfo.getInvDataset(); InvDataset targetParentDs = curCatRefInfo.getInvDataset().getParent();
InvDataset curTopDs = curCatalog.getDataset(); InvDataset targetDs = curCatRefInfo.getInvDataset(); InvDataset targetParentDs = curCatRefInfo.getInvDataset().getParent();