use of org.polymap.core.catalog.resolve.IResourceInfo in project polymap4-core by Polymap4.
the class MetadataContentProvider method updateMetadata.
/**
* @param elm
* @param currentChildCount
*/
protected void updateMetadata(IMetadata elm, int currentChildCount) {
updateChildrenLoading(elm);
UIJob job = new UIJob("Resolve service") {
@Override
protected void runWithException(IProgressMonitor monitor) throws Exception {
IMetadata metadata = (IMetadata) elm;
if (resolver.canResolve(metadata)) {
try {
IServiceInfo service = (IServiceInfo) resolver.resolve(metadata, monitor);
// skip service as it has not more info than metadata record
IResourceInfo[] children = Iterables.toArray(service.getResources(monitor), IResourceInfo.class);
updateChildren(elm, children, currentChildCount);
} catch (Exception e) {
// FIXME handle exceptions
log.warn("", e);
throw new RuntimeException(e);
}
} else {
updateChildren(elm, new Object[] { "Unable to resolve the service." }, currentChildCount);
}
}
};
job.scheduleWithUIUpdate();
}
use of org.polymap.core.catalog.resolve.IResourceInfo in project polymap4-core by Polymap4.
the class WfsServiceInfo method getResources.
@Override
public Iterable<IResourceInfo> getResources(IProgressMonitor monitor) throws Exception {
List<IResourceInfo> result = new ArrayList();
for (Name name : ds.getNames()) {
ResourceInfo info = ds.getFeatureSource(name).getInfo();
result.add(new WfsResourceInfo(this, info));
}
return result;
}
Aggregations