/** * Return the CrawlableDataset for the given path, null if this InvDatasetScan * does not allow (filters out) the requested CrawlableDataset. * * <p>This method can handle requests for regular datasets and proxy datasets. * * @param path the path of the requested CrawlableDataset * @return the CrawlableDataset for the given path or null if the path is not allowed by this InvDatasetScan. * @throws IOException if an I/O error occurs while locating the children datasets. * @throws IllegalArgumentException if the given path is not a descendant of (or the same as) this InvDatasetScan collection level. */ public CrawlableDataset requestCrawlableDataset( String path ) throws IOException { String crDsPath = translatePathToLocation( path ); if ( crDsPath == null ) return null; CatalogBuilder catBuilder = buildCatalogBuilder(); if ( catBuilder == null ) return null; return catBuilder.requestCrawlableDataset( crDsPath ); }
List<DatasetEnhancer> childEnhancerList, CatalogRefExpander catalogRefExpander ) super( parent, name, makeHref(path) ); this.rootPath = path; this.scanLocation = scanLocation; this.crDsConfigObj = configObj; this.scanLocationCrDs = createScanLocationCrDs(); this.isValid = true; if ( this.scanLocationCrDs == null )
public DatasetScanCatalogBuilder( InvDatasetScan datasetScan, CrawlableDataset collectionCrDs, InvService service ) { // Setup for ID String baseID = null; if ( datasetScan.getID() != null ) baseID = datasetScan.getID(); else if ( datasetScan.getPath() != null ) baseID = datasetScan.getPath(); stdCatBuilder = new StandardCatalogBuilder( datasetScan.getPath(), datasetScan.getName(), collectionCrDs, datasetScan.getFilter(), service, baseID, datasetScan.getIdentifier(), datasetScan.getNamer(), datasetScan.getAddDatasetSize(), datasetScan.getSorter(), datasetScan.getProxyDatasetHandlers(), datasetScan.getChildEnhancerList(), datasetScan, datasetScan.getCatalogRefExpander() ); }
dsElem.setAttribute("path", ds.getPath()); dsElem.setAttribute("location", ds.getScanLocation()); if (ds.getCrDsClassName() != null) { Element configElem = new Element("crawlableDatasetImpl", defNS); configElem.setAttribute("className", ds.getCrDsClassName()); if (ds.getCrDsConfigObj() != null) { if (ds.getCrDsConfigObj() instanceof Element) { configElem.addContent((Element) ds.getCrDsConfigObj()); if (ds.getFilter() != null) dsElem.addContent(writeDatasetScanFilter(ds.getFilter())); dsElem.addContent(writeDatasetScanIdentifier(ds.getIdentifier())); if (ds.getNamer() != null) dsElem.addContent(writeDatasetScanNamer(ds.getNamer())); if (ds.getSorter() != null) dsElem.addContent(writeDatasetScanSorter(ds.getSorter())); if (!ds.getProxyDatasetHandlers().isEmpty()) dsElem.addContent(writeDatasetScanAddProxies(ds.getProxyDatasetHandlers())); if (ds.getAddDatasetSize()) dsElem.addContent(new Element("addDatasetSize", defNS)); if (ds.getChildEnhancerList() != null) dsElem.addContent(writeDatasetScanEnhancer(ds.getChildEnhancerList()));
String dsDirPath = translatePathToLocation( path ); if ( dsDirPath == null ) ProxyDatasetHandler pdh = this.getProxyDatasetHandlers().get( dsName ); if ( pdh == null ) CatalogBuilder catBuilder = buildCatalogBuilder(); if ( catBuilder == null ) return null;
datasetScan = new InvDatasetScan( catalog, parent, name, path, scanDir, filter, addDatasetSize, addLatest, sortOrderIncreasing, dsNameMatchPattern, startTimeSubstitutionPattern, duration ); readDatasetInfo( catalog, datasetScan, dsElem, base ); if ( InvCatalogFactory.debugXML ) System.out.println( " Dataset added: " + datasetScan.dump() );
scan = new InvDatasetScan( (InvCatalogImpl) this.getParentCatalog(), this, "File_Access", path+"/"+SCAN, params.location, filter, true, "true", false, null, null, null ); ThreddsMetadata tmi = scan.getLocalMetadataInheritable(); tmi.setServiceName("fileServices"); tmi.addDocumentation("summary", "Individual data file, which comprise the Forecast Model Run Collection."); scan.finish(); datasets.add( scan);
this.scanLocationCrDs = createScanLocationCrDs(); if ( this.scanLocationCrDs == null )
dsElem.setAttribute("path", ds.getPath()); dsElem.setAttribute("location", ds.getScanLocation()); if (ds.getCrDsClassName() != null) { Element configElem = new Element("crawlableDatasetImpl", defNS); configElem.setAttribute("className", ds.getCrDsClassName()); if (ds.getCrDsConfigObj() != null) { if (ds.getCrDsConfigObj() instanceof Element) { configElem.addContent((Element) ds.getCrDsConfigObj()); if (ds.getFilter() != null) dsElem.addContent(writeDatasetScanFilter(ds.getFilter())); dsElem.addContent(writeDatasetScanIdentifier(ds.getIdentifier())); if (ds.getNamer() != null) dsElem.addContent(writeDatasetScanNamer(ds.getNamer())); if (ds.getSorter() != null) dsElem.addContent(writeDatasetScanSorter(ds.getSorter())); if (!ds.getProxyDatasetHandlers().isEmpty()) dsElem.addContent(writeDatasetScanAddProxies(ds.getProxyDatasetHandlers())); if (ds.getAddDatasetSize()) dsElem.addContent(new Element("addDatasetSize", defNS)); if (ds.getChildEnhancerList() != null) dsElem.addContent(writeDatasetScanEnhancer(ds.getChildEnhancerList()));
String dsDirPath = translatePathToLocation( path ); if ( dsDirPath == null ) ProxyDatasetHandler pdh = (ProxyDatasetHandler) this.getProxyDatasetHandlers().get( dsName ); if ( pdh == null ) CatalogBuilder catBuilder = buildCatalogBuilder(); if ( catBuilder == null ) return null;
datasetScan = new InvDatasetScan(catalog, parent, name, path, scanDir, filter, addDatasetSize, addLatest, sortOrderIncreasing, dsNameMatchPattern, startTimeSubstitutionPattern, duration); readDatasetInfo(catalog, datasetScan, dsElem, base); if (InvCatalogFactory.debugXML) System.out.println(" Dataset added: " + datasetScan.dump());
this.scanLocationCrDs = createScanLocationCrDs(); if ( this.scanLocationCrDs == null )
dsElem.setAttribute( "path", ds.getPath() ); dsElem.setAttribute( "location", ds.getScanLocation() ); if ( ds.getCrDsClassName() != null ) configElem.setAttribute( "className", ds.getCrDsClassName() ); if ( ds.getCrDsConfigObj() != null ) if ( ds.getCrDsConfigObj() instanceof Element ) configElem.addContent( (Element) ds.getCrDsConfigObj() ); if ( ds.getFilter() != null ) dsElem.addContent( writeDatasetScanFilter( ds.getFilter() ) ); dsElem.addContent( writeDatasetScanIdentifier( ds.getIdentifier()) ); if ( ds.getNamer() != null) dsElem.addContent( writeDatasetScanNamer( ds.getNamer() )); if ( ds.getSorter() != null ) dsElem.addContent( writeDatasetScanSorter( ds.getSorter() ) ); if ( ! ds.getProxyDatasetHandlers().isEmpty() ) dsElem.addContent( writeDatasetScanAddProxies( ds.getProxyDatasetHandlers() ) ); if ( ds.getAddDatasetSize() ) dsElem.addContent( new Element( "addDatasetSize", defNS ) );
public DatasetScanCatalogBuilder( InvDatasetScan datasetScan, CrawlableDataset collectionCrDs, InvService service ) { // Setup for ID String baseID = null; if ( datasetScan.getID() != null ) baseID = datasetScan.getID(); else if ( datasetScan.getPath() != null ) baseID = datasetScan.getPath(); stdCatBuilder = new StandardCatalogBuilder( datasetScan.getPath(), datasetScan.getName(), collectionCrDs, datasetScan.getFilter(), service, baseID, datasetScan.getIdentifier(), datasetScan.getNamer(), datasetScan.getAddDatasetSize(), datasetScan.getSorter(), datasetScan.getProxyDatasetHandlers(), datasetScan.getChildEnhancerList(), datasetScan, datasetScan.getCatalogRefExpander() ); }
List childEnhancerList, CatalogRefExpander catalogRefExpander ) super( parent, name, makeHref(path) ); this.rootPath = path; this.scanLocation = scanLocation; this.crDsConfigObj = configObj; this.scanLocationCrDs = createScanLocationCrDs(); this.isValid = true; if ( this.scanLocationCrDs == null )
String dsDirPath = translatePathToLocation( path ); if ( dsDirPath == null ) ProxyDatasetHandler pdh = this.getProxyDatasetHandlers().get( dsName ); if ( pdh == null ) CatalogBuilder catBuilder = buildCatalogBuilder(); if ( catBuilder == null ) return null;
/** * Return the CrawlableDataset for the given path, null if this InvDatasetScan * does not allow (filters out) the requested CrawlableDataset. * * <p>This method can handle requests for regular datasets and proxy datasets. * * @param path the path of the requested CrawlableDataset * @return the CrawlableDataset for the given path or null if the path is not allowed by this InvDatasetScan. * @throws IOException if an I/O error occurs while locating the children datasets. * @throws IllegalArgumentException if the given path is not a descendant of (or the same as) this InvDatasetScan collection level. */ public CrawlableDataset requestCrawlableDataset( String path ) throws IOException { String crDsPath = translatePathToLocation( path ); if ( crDsPath == null ) return null; CatalogBuilder catBuilder = buildCatalogBuilder(); if ( catBuilder == null ) return null; return catBuilder.requestCrawlableDataset( crDsPath ); }
datasetScan = new InvDatasetScan(catalog, parent, name, path, scanDir, filter, addDatasetSize, addLatest, sortOrderIncreasing, dsNameMatchPattern, startTimeSubstitutionPattern, duration); readDatasetInfo(catalog, datasetScan, dsElem, base); if (InvCatalogFactory.debugXML) System.out.println(" Dataset added: " + datasetScan.dump());
this.scanLocationCrDs = createScanLocationCrDs(); if ( this.scanLocationCrDs == null )
public DatasetScanCatalogBuilder( InvDatasetScan datasetScan, CrawlableDataset collectionCrDs, InvService service ) { // Setup for ID String baseID = null; if ( datasetScan.getID() != null ) baseID = datasetScan.getID(); else if ( datasetScan.getPath() != null ) baseID = datasetScan.getPath(); stdCatBuilder = new StandardCatalogBuilder( datasetScan.getPath(), datasetScan.getName(), collectionCrDs, datasetScan.getFilter(), service, baseID, datasetScan.getIdentifier(), datasetScan.getNamer(), datasetScan.getAddDatasetSize(), datasetScan.getSorter(), datasetScan.getProxyDatasetHandlers(), datasetScan.getChildEnhancerList(), datasetScan, datasetScan.getCatalogRefExpander() ); }