return null;
}
}
protected IServiceInfo createInfo( IProgressMonitor monitor ) throws IOException {
try {
return new IServiceInfo("Testing 1", "", "", getIdentifier().toURI(), (URI) null, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
(URI) null, (new String[]{"Test"}), (ImageDescriptor) null); //$NON-NLS-1$
} catch (URISyntaxException e) {
throw (RuntimeException) new RuntimeException( ).initCause( e );
}
}
});
instance.add(new IService(){
public <T> T resolve( Class<T> adaptee, IProgressMonitor monitor ) throws IOException {
return null;
}
public List< ? extends IGeoResource> resources( IProgressMonitor monitor )
throws IOException {
ArrayList<IGeoResource> list = new ArrayList<IGeoResource>();
list.add( new IGeoResource(){
@Override
public <T> T resolve(Class<T> adaptee, IProgressMonitor monitor) throws IOException {
return super.resolve(adaptee, monitor);
}
protected IGeoResourceInfo createInfo( IProgressMonitor monitor ) throws IOException {
return new IGeoResourceInfo("Test Title", "Test Name", "description", null, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new Envelope(20,30,0,40), DefaultGeographicCRS.WGS84, new String[0],
null);
}
public <T> boolean canResolve(Class<T> adaptee) {
return super.canResolve(adaptee);
}
public Status getStatus() {
return null;
}
public Throwable getMessage() {
return null;
}
public URL getIdentifier() {
return null;
}
});
return list;
}
public Map<String, Serializable> getConnectionParams() {
return null;
}
public <T> boolean canResolve( Class<T> adaptee ) {
return false;
}
public Status getStatus() {
return null;
}
public Throwable getMessage() {
return null;
}
public URL getIdentifier() {
try {
return new URL("http://localhost:1234/testing/2"); //$NON-NLS-1$
} catch (MalformedURLException e) {
return null;
}
}
protected IServiceInfo createInfo( IProgressMonitor monitor ) throws IOException {
try {
return new IServiceInfo("Testing 2", "", "", getIdentifier().toURI(), (URI) null, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
(URI) null, (new String[]{"Test"}), (ImageDescriptor) null); //$NON-NLS-1$
} catch (URISyntaxException e) {
throw (RuntimeException) new RuntimeException( ).initCause( e );
}
}