protected InvAccessImpl readAccess(InvDatasetImpl dataset, Element accessElem) { String urlPath = accessElem.getAttributeValue("urlPath"); String serviceName = accessElem.getAttributeValue("serviceName"); String dataFormat = accessElem.getAttributeValue("dataFormat"); return new InvAccessImpl(dataset, urlPath, serviceName, null, dataFormat, readDataSize(accessElem)); }
protected InvAccessImpl readAccess( InvDatasetImpl dataset, Element accessElem) { String urlPath = accessElem.getAttributeValue("urlPath"); String serviceName = accessElem.getAttributeValue("serviceName"); String dataFormat = accessElem.getAttributeValue("dataFormat"); return new InvAccessImpl( dataset, urlPath, serviceName, null, dataFormat, readDataSize( accessElem)); }
protected InvAccessImpl readAccess(InvDatasetImpl dataset, Element accessElem) { String urlPath = accessElem.getAttributeValue("urlPath"); String serviceName = accessElem.getAttributeValue("serviceName"); String dataFormat = accessElem.getAttributeValue("dataFormat"); return new InvAccessImpl(dataset, urlPath, serviceName, null, dataFormat, readDataSize(accessElem)); }
public static InvAccess copyAccess( InvAccess access, InvDataset parentDataset, List<InvService> availableServices ) { if ( parentDataset == null ) throw new IllegalArgumentException( "Parent dataset may not be null."); String serviceName = access.getService().getName(); InvService service = findServiceByName( serviceName, availableServices); if ( service == null ) { logger.warn( "Access service [" + serviceName + "] not in available service list."); return null; // ToDo Support copying service. //service = copyService( access.getService() ); } DataFormatType dataFormatType = access.getDataFormatType(); InvAccessImpl resultAccess = null; if ( dataFormatType == null ) { resultAccess = new InvAccessImpl( parentDataset, access.getUrlPath(), service ); resultAccess.setSize( access.getDataSize() ); } else resultAccess = new InvAccessImpl( parentDataset, access.getUrlPath(), service.getName(), null, dataFormatType.toString(), access.getDataSize() ); return resultAccess; }
private void addExpandedAccess(InvAccessImpl a) { InvService service = a.getService(); if (null == service) { a.check(log, false); // illegal; get error message return; } if (service.getServiceType() == ServiceType.COMPOUND) { // if its a compound service, expand it for (InvService nestedService : service.getServices()) { InvAccessImpl nestedAccess = new InvAccessImpl(this, a.getUrlPath(), nestedService); addExpandedAccess(nestedAccess); // i guess it could recurse } } else { access.add(a); } }
private void addExpandedAccess(InvAccessImpl a) { InvService service = a.getService(); if (null == service) { a.check(log, false); // illegal; get error message return; } if (service.getServiceType() == ServiceType.COMPOUND) { // if its a compound service, expand it for (InvService nestedService : service.getServices()) { InvAccessImpl nestedAccess = new InvAccessImpl(this, a.getUrlPath(), nestedService); addExpandedAccess(nestedAccess); // i guess it could recurse } } else { access.add(a); } }
private void addExpandedAccess(InvAccessImpl a) { InvService service = a.getService(); if (null == service) { a.check(log, false); // illegal; get error message return; } if (service.getServiceType() == ServiceType.COMPOUND) { // if its a compound service, expand it for (InvService nestedService : service.getServices()) { InvAccessImpl nestedAccess = new InvAccessImpl(this, a.getUrlPath(), nestedService); addExpandedAccess(nestedAccess); // i guess it could recurse } } else { access.add(a); } }
public static InvAccess copyAccess( InvAccess access, InvDataset parentDataset, List<InvService> availableServices ) { if ( parentDataset == null ) throw new IllegalArgumentException( "Parent dataset may not be null."); String serviceName = access.getService().getName(); InvService service = findServiceByName( serviceName, availableServices); if ( service == null ) { logger.warn( "Access service [" + serviceName + "] not in available service list."); return null; // ToDo Support copying service. //service = copyService( access.getService() ); } DataFormatType dataFormatType = access.getDataFormatType(); InvAccessImpl resultAccess; if ( dataFormatType == null ) { resultAccess = new InvAccessImpl( parentDataset, access.getUrlPath(), service ); resultAccess.setSize( access.getDataSize() ); } else resultAccess = new InvAccessImpl( parentDataset, access.getUrlPath(), service.getName(), null, dataFormatType.toString(), access.getDataSize() ); return resultAccess; }
InvAccessImpl a = new InvAccessImpl(this, urlPath, getServiceDefault()); a.setSize(size); a.finish();
public static InvAccess copyAccess( InvAccess access, InvDataset parentDataset, List<InvService> availableServices ) { if ( parentDataset == null ) throw new IllegalArgumentException( "Parent dataset may not be null."); String serviceName = access.getService().getName(); InvService service = findServiceByName( serviceName, availableServices); if ( service == null ) { logger.warn( "Access service [" + serviceName + "] not in available service list."); return null; // ToDo Support copying service. //service = copyService( access.getService() ); } DataFormatType dataFormatType = access.getDataFormatType(); InvAccessImpl resultAccess; if ( dataFormatType == null ) { resultAccess = new InvAccessImpl( parentDataset, access.getUrlPath(), service ); resultAccess.setSize( access.getDataSize() ); } else resultAccess = new InvAccessImpl( parentDataset, access.getUrlPath(), service.getName(), null, dataFormatType.toString(), access.getDataSize() ); return resultAccess; }
InvAccessImpl a = new InvAccessImpl(this, urlPath, getServiceDefault()); a.setSize(size); a.finish();
InvAccessImpl a = new InvAccessImpl(this, urlPath, getServiceDefault()); a.setSize(size); a.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; }