private String wrap(String url) { if (service.getServiceType() == ServiceType.THREDDS) return ucar.nc2.thredds.ThreddsDataFactory.SCHEME + url; if (service.getServiceType() == ServiceType.CdmRemote) return CdmRemote.SCHEME + url; return url; } }
private String wrap(String url) { if (service.getServiceType() == ServiceType.THREDDS) return ucar.nc2.thredds.ThreddsDataFactory.SCHEME + url; if (service.getServiceType() == ServiceType.CdmRemote) return CdmRemote.SCHEME + url; return url; } }
private String wrap(String url) { if (service.getServiceType() == ServiceType.THREDDS) return ucar.nc2.thredds.ThreddsDataFactory.SCHEME + url; if (service.getServiceType() == ServiceType.CdmRemote) return CdmRemote.SCHEME + url; return url; } }
/** * See if the service Base is reletive * @return true if the service Base is reletive */ public boolean isRelativeBase() { if (getServiceType() == ServiceType.COMPOUND) return true; if (uri == null) { try { uri = new java.net.URI(base); } catch (java.net.URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } } return !uri.isAbsolute(); } }
/** * See if the service Base is reletive * @return true if the service Base is reletive */ public boolean isRelativeBase() { if (getServiceType() == ServiceType.COMPOUND) return true; if (uri == null) { try { uri = new java.net.URI(base); } catch (java.net.URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } } return !uri.isAbsolute(); } }
/** * See if the service Base is reletive * @return true if the service Base is reletive */ public boolean isRelativeBase() { if (getServiceType() == ServiceType.COMPOUND) return true; if (uri == null) { try { uri = new java.net.URI(base); } catch (java.net.URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } } return !uri.isAbsolute(); } }
private void findDODSService(List<InvService> services) { for (InvService service : services) { if ((dodsService == null) && (service.getServiceType() == ServiceType.OPENDAP)) { dodsService = service.getName(); return; } if (service.getServiceType() == ServiceType.COMPOUND) findDODSService(service.getServices()); } }
public int accept( InvDataset d) { // check all access for any that has this servicee for (InvAccess a : d.getAccess()) { if (a.getService().getServiceType() == type) return 1; } // cant tell about DQC and resolvers !! for (InvAccess a : d.getAccess()) { if (a.getService().getServiceType() == ServiceType.QC) return 0; if (a.getService().getServiceType() == ServiceType.RESOLVER) return 0; } return -1; } }
public int accept( InvDataset d) { // check all access for any that has this servicee for (InvAccess a : d.getAccess()) { if (a.getService().getServiceType() == type) return 1; } // cant tell about DQC and resolvers !! for (InvAccess a : d.getAccess()) { if (a.getService().getServiceType() == ServiceType.QC) return 0; if (a.getService().getServiceType() == ServiceType.RESOLVER) return 0; } return -1; } }
public int accept( InvDataset d) { // check all access for any that has this servicee for (InvAccess a : d.getAccess()) { if (a.getService().getServiceType() == type) return 1; } // cant tell about DQC and resolvers !! for (InvAccess a : d.getAccess()) { if (a.getService().getServiceType() == ServiceType.QC) return 0; if (a.getService().getServiceType() == ServiceType.RESOLVER) return 0; } return -1; } }
protected InvService makeServiceVirtual(InvService org) { if (org.getServiceType() != ServiceType.COMPOUND) return org; InvService result = new InvService(Virtual_Services, ServiceType.COMPOUND.toString(), null, null, null); for (InvService service : org.getServices()) { if (service.getServiceType() != ServiceType.HTTPServer) { result.addService(service); } } return result; }
protected InvService makeVirtualService(InvService org) { if (org.getServiceType() != ServiceType.COMPOUND) return org; InvService result = new InvService(Virtual_Services, ServiceType.COMPOUND.toString(), null, null, null); for (InvService service : org.getServices()) { if (service.getServiceType() != ServiceType.HTTPServer) { result.addService(service); } } return result; }
private InvAccess findAccessByServiceType(List<InvAccess> accessList, ServiceType type) { for (InvAccess a : accessList) { if (type.toString().equalsIgnoreCase(a.getService().getServiceType().toString())) return a; } return null; }
/** * Get access element of the specified service type for this dataset. * If more than one, get the first one. * * @param type find this ServiceType * @return InvAccess or null if there is not one. */ public InvAccess getAccess(thredds.catalog.ServiceType type) { for (InvAccess a : getAccess()) { InvService s = a.getService(); if (s.getServiceType() == type) return a; } return null; }
private InvAccess findAccessByServiceType(List<InvAccess> accessList, ServiceType type) { for (InvAccess a : accessList) { if (type.toString().equalsIgnoreCase(a.getService().getServiceType().toString())) return a; } return null; }
private InvAccess findAccessByServiceType(List<InvAccess> accessList, ServiceType type) { for (InvAccess a : accessList) { if (type.toString().equalsIgnoreCase(a.getService().getServiceType().toString())) return a; } return null; }
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 InvService copyService( InvService service ) { if ( service == null ) throw new IllegalArgumentException( "Service may not be null."); InvService resultService = new InvService( service.getName(), service.getServiceType().toString(), service.getBase(), service.getSuffix(), service.getDescription() ); for ( InvService curService : service.getServices()) { resultService.addService( copyService( curService ) ); } for ( InvProperty curProperty : service.getProperties()) { resultService.addProperty( copyProperty( curProperty ) ); } for ( InvProperty curDatasetRoot : service.getDatasetRoots()) { resultService.addDatasetRoot( copyProperty( curDatasetRoot) ); } return resultService; }