public void setCatalog(thredds.catalog.InvCatalog p0) { proxy.setCatalog( p0); }
public void setCatalog(thredds.catalog.InvCatalog p0) { proxy.setCatalog( p0); }
public void setCatalog(thredds.catalog.InvCatalog p0) { proxy.setCatalog( p0); }
/** * Replace the given dataset if it is a nested dataset. * * @param remove - the dataset element to be removed * @param add - the dataset element to be added * @return true on success */ public boolean replaceDataset(InvDatasetImpl remove, InvDatasetImpl add) { if (topDataset.equals(remove)) { topDataset = add; topDataset.setCatalog(this); } for (int i = 0; i < datasets.size(); i++) { InvDataset dataset = datasets.get(i); if (dataset.equals(remove)) { datasets.set(i, add); removeDatasetByID(remove); addDatasetByID(add); return true; } } return false; }
/** * Replace the given dataset if it is a nested dataset. * * @param remove - the dataset element to be removed * @param add - the dataset element to be added * @return true on success */ public boolean replaceDataset(InvDatasetImpl remove, InvDatasetImpl add) { if (topDataset.equals(remove)) { topDataset = add; topDataset.setCatalog(this); } for (int i = 0; i < datasets.size(); i++) { InvDataset dataset = datasets.get(i); if (dataset.equals(remove)) { datasets.set(i, add); removeDatasetByID(remove); addDatasetByID(add); return true; } } return false; }
/** * Replace the given dataset if it is a nested dataset. * * @param remove - the dataset element to be removed * @param add - the dataset element to be added * @return true on success */ public boolean replaceDataset(InvDatasetImpl remove, InvDatasetImpl add) { if (topDataset.equals(remove)) { topDataset = add; topDataset.setCatalog(this); } for (int i = 0; i < datasets.size(); i++) { InvDataset dataset = datasets.get(i); if (dataset.equals(remove)) { datasets.set(i, add); removeDatasetByID(remove); addDatasetByID(add); return true; } } return false; }
/** * Finish constructing after all elements have been added or modified. * This routine will do any needed internal consistency work. * Its ok to call multiple times. * * @return true if successful. */ public boolean finish() { // make topDataset if needed //if (topDataset == null) { if (datasets.size() == 1) { // already only one; make it top topDataset = (InvDatasetImpl) datasets.get(0); } else { // create one topDataset = new InvDatasetImpl(null, name == null ? "Top Dataset" : name); for (InvDataset dataset : datasets) topDataset.addDataset((InvDatasetImpl) dataset); topDataset.setServicesLocal(services); } //} topDataset.setCatalog(this); // build dataset hash table dsHash = new HashMap<String, InvDataset>(); addDatasetIds(topDataset); // recurse through the datasets and finish them return topDataset.finish(); }
/** * Finish constructing after all elements have been added or modified. * This routine will do any needed internal consistency work. * Its ok to call multiple times. * * @return true if successful. */ public boolean finish() { // make topDataset if needed //if (topDataset == null) { if (datasets.size() == 1) { // already only one; make it top topDataset = (InvDatasetImpl) datasets.get(0); } else { // create one topDataset = new InvDatasetImpl(null, name == null ? "Top Dataset" : name); for (InvDataset dataset : datasets) topDataset.addDataset((InvDatasetImpl) dataset); topDataset.setServicesLocal(services); } //} topDataset.setCatalog(this); // build dataset hash table dsHash = new HashMap<String, InvDataset>(); addDatasetIds(topDataset); // recurse through the datasets and finish them return topDataset.finish(); }
/** * Finish constructing after all elements have been added or modified. * This routine will do any needed internal consistency work. * Its ok to call multiple times. * * @return true if successful. */ public boolean finish() { // make topDataset if needed //if (topDataset == null) { if (datasets.size() == 1) { // already only one; make it top topDataset = (InvDatasetImpl) datasets.get(0); } else { // create one topDataset = new InvDatasetImpl(null, name == null ? "Top Dataset" : name); for (InvDataset dataset : datasets) topDataset.addDataset((InvDatasetImpl) dataset); topDataset.setServicesLocal(services); } //} topDataset.setCatalog(this); // build dataset hash table dsHash = new HashMap<String, InvDataset>(); addDatasetIds(topDataset); // recurse through the datasets and finish them return topDataset.finish(); }
/** * Munge this catalog so the given dataset is the top catalog. * * @param ds make this top; must be existing dataset in this catalog. * * @deprecated in favor of thredds.catalog.util.DeepCopyUtils.subsetCatalogOnDataset */ public void subset(InvDataset ds) { InvDatasetImpl dataset = (InvDatasetImpl) ds; // Make all inherited metadata local. dataset.transferMetadata(dataset, true); topDataset = dataset; datasets.clear(); // throw away the rest datasets.add(topDataset); // parent lookups need to be local //InvService service = dataset.getServiceDefault(); //if (service != null) LOOK // dataset.serviceName = service.getName(); dataset.dataType = dataset.getDataType(); // all properties need to be local // LOOK dataset.setPropertiesLocal( new ArrayList(dataset.getProperties())); // next part requires this before it dataset.setCatalog(this); dataset.parent = null; // any referenced services need to be local List<InvService> services = new ArrayList<InvService>(dataset.getServicesLocal()); findServices(services, dataset); dataset.setServicesLocal(services); finish(); }
/** * Munge this catalog so the given dataset is the top catalog. * * @param ds make this top; must be existing dataset in this catalog. * * @deprecated in favor of thredds.catalog.util.DeepCopyUtils.subsetCatalogOnDataset */ public void subset(InvDataset ds) { InvDatasetImpl dataset = (InvDatasetImpl) ds; // Make all inherited metadata local. dataset.transferMetadata(dataset, true); topDataset = dataset; datasets.clear(); // throw away the rest datasets.add(topDataset); // parent lookups need to be local //InvService service = dataset.getServiceDefault(); //if (service != null) LOOK // dataset.serviceName = service.getName(); dataset.dataType = dataset.getDataType(); // all properties need to be local // LOOK dataset.setPropertiesLocal( new ArrayList(dataset.getProperties())); // next part requires this before it dataset.setCatalog(this); dataset.parent = null; // any referenced services need to be local List<InvService> services = new ArrayList<InvService>(dataset.getServicesLocal()); findServices(services, dataset); dataset.setServicesLocal(services); finish(); }
/** * Munge this catalog so the given dataset is the top catalog. * * @param ds make this top; must be existing dataset in this catalog. * * @deprecated in favor of thredds.catalog.util.DeepCopyUtils.subsetCatalogOnDataset */ public void subset(InvDataset ds) { InvDatasetImpl dataset = (InvDatasetImpl) ds; // Make all inherited metadata local. dataset.transferMetadata(dataset, true); topDataset = dataset; datasets.clear(); // throw away the rest datasets.add(topDataset); // parent lookups need to be local //InvService service = dataset.getServiceDefault(); //if (service != null) LOOK // dataset.serviceName = service.getName(); dataset.dataType = dataset.getDataType(); // all properties need to be local // LOOK dataset.setPropertiesLocal( new ArrayList(dataset.getProperties())); // next part requires this before it dataset.setCatalog(this); dataset.parent = null; // any referenced services need to be local List<InvService> services = new ArrayList<InvService>(dataset.getServicesLocal()); findServices(services, dataset); dataset.setServicesLocal(services); finish(); }
private InvDatasetImpl createDataset(String[] serviceTypeNames) throws URISyntaxException { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, "datasetName", FeatureType.NONE, serviceTypeNames[0], "http://wherever.you.want.bc"); final InvCatalogImpl catalog = new InvCatalogImpl("catalogName", "1.0", new URI("http://x.y")); dapDataset.setCatalog(catalog); for (String serviceName : serviceTypeNames) { final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); final InvAccessImpl invAccess = new InvAccessImpl(dapDataset, "http://y.z", dapService); dapDataset.addAccess(invAccess); } dapDataset.finish(); return dapDataset; }
private InvDatasetImpl createDataset(InvCatalogImpl catalog, String datasetName, final String serviceName) { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, datasetName, FeatureType.NONE, serviceName, "http://wherever.you.want.bc"); dapDataset.setCatalog(catalog); final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); dapDataset.addAccess(new InvAccessImpl(dapDataset, "http://y.z", dapService)); dapDataset.finish(); return dapDataset; }
private InvDataset createDataset(InvCatalog catalog, String datasetName, final String serviceName) { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, datasetName, FeatureType.NONE, serviceName, "http://wherever.you.want.bc"); dapDataset.setCatalog(catalog); final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); dapDataset.addAccess(new InvAccessImpl(dapDataset, "http://y.z", dapService)); dapDataset.finish(); return dapDataset; }
private InvDatasetImpl createDataset(InvCatalogImpl catalog, String datasetName, final String serviceName) { final InvDatasetImpl dapDataset = new InvDatasetImpl(null, datasetName, FeatureType.NONE, serviceName, "http://wherever.you.want.bc"); dapDataset.setCatalog(catalog); final InvService dapService = new InvService(serviceName, serviceName, "irrelevant", "irrelevant", "irrelevant"); dapDataset.addAccess(new InvAccessImpl(dapDataset, "http://y.z", dapService)); dapDataset.finish(); return dapDataset; }