/** * Read NcML from a JDOM Document, and pass in the name of the dataset. Used to augment datasetScan with NcML * * @param ncmlLocation the URL location string of the NcML document, used as a unique name for caching purposes. * @param netcdfElem the JDOM Document's root (netcdf) element * @param referencedDatasetUri the URL location string of the underlying dataset, which overrides anything in netcdfElem. * prepend with "file:" to eliminate reletive resolving against ncmlLocation * @param cancelTask allow user to cancel the task; may be null * @return the resulting NetcdfDataset * @throws IOException on read error, or bad referencedDatasetUri URI */ static public NetcdfDataset readNcML(String ncmlLocation, Element netcdfElem, String referencedDatasetUri, CancelTask cancelTask) throws IOException { NcMLReader reader = new NcMLReader(); return reader._readNcML(ncmlLocation, referencedDatasetUri, netcdfElem, cancelTask); }
/** * Read NcML from a JDOM Document, and pass in the name of the dataset. Used to augment datasetScan with NcML * * @param ncmlLocation the URL location string of the NcML document, used as a unique name for caching purposes. * @param netcdfElem the JDOM Document's root (netcdf) element * @param referencedDatasetUri the URL location string of the underlying dataset, which overrides anything in netcdfElem. * prepend with "file:" to eliminate reletive resolving against ncmlLocation * @param cancelTask allow user to cancel the task; may be null * @return the resulting NetcdfDataset * @throws IOException on read error, or bad referencedDatasetUri URI */ static public NetcdfDataset readNcML(String ncmlLocation, Element netcdfElem, String referencedDatasetUri, CancelTask cancelTask) throws IOException { NcMLReader reader = new NcMLReader(); return reader._readNcML(ncmlLocation, referencedDatasetUri, netcdfElem, cancelTask); }
NetcdfDataset ncd = reader._readNcML(ncmlLocation, referencedDatasetUri, netcdfElem, cancelTask); if (debugOpen) System.out.println("***NcMLReader.readNcML result= \n" + ncd); return ncd;
NetcdfDataset ncd = reader._readNcML(ncmlLocation, referencedDatasetUri, netcdfElem, cancelTask); if (debugOpen) System.out.println("***NcMLReader.readNcML result= \n" + ncd); return ncd;
/** * Read NcML from a JDOM Document, and construct a NetcdfDataset. * * @param ncmlLocation the URL location string of the NcML document, used to resolve reletive path of the referenced dataset, * or may be just a unique name for caching purposes. * @param netcdfElem the JDOM Document's root (netcdf) element * @param cancelTask allow user to cancel the task; may be null * @return the resulting NetcdfDataset * @throws IOException on read error, or bad referencedDatasetUri URI */ static public NetcdfDataset readNcML(String ncmlLocation, Element netcdfElem, CancelTask cancelTask) throws IOException { // the ncml probably refers to another dataset, but doesnt have to String referencedDatasetUri = netcdfElem.getAttributeValue("location"); if (referencedDatasetUri == null) referencedDatasetUri = netcdfElem.getAttributeValue("url"); NcMLReader reader = new NcMLReader(); return reader._readNcML(ncmlLocation, referencedDatasetUri, netcdfElem, cancelTask); }
/** * Read NcML from a JDOM Document, and construct a NetcdfDataset. * * @param ncmlLocation the URL location string of the NcML document, used to resolve reletive path of the referenced dataset, * or may be just a unique name for caching purposes. * @param netcdfElem the JDOM Document's root (netcdf) element * @param cancelTask allow user to cancel the task; may be null * @return the resulting NetcdfDataset * @throws IOException on read error, or bad referencedDatasetUri URI */ static public NetcdfDataset readNcML(String ncmlLocation, Element netcdfElem, CancelTask cancelTask) throws IOException { // the ncml probably refers to another dataset, but doesnt have to String referencedDatasetUri = netcdfElem.getAttributeValue("location"); if (referencedDatasetUri == null) referencedDatasetUri = netcdfElem.getAttributeValue("url"); if (referencedDatasetUri != null) referencedDatasetUri = AliasTranslator.translateAlias(referencedDatasetUri); NcMLReader reader = new NcMLReader(); return reader._readNcML(ncmlLocation, referencedDatasetUri, netcdfElem, cancelTask); }