"The entity type can't be null, use Object.class to have the type"
+ " determined by the schema.");
Pair<DatasetRepository, Map<String, String>> pair =
Registration.lookupDatasetUri(URI.create(uri.getRawSchemeSpecificPart()));
DatasetRepository repo = pair.first();
Map<String, String> uriOptions = pair.second();
if (descriptor.getLocation() == null && uriOptions.containsKey("location")) {
descriptor = new DatasetDescriptor.Builder(descriptor)
.location(uriOptions.get("location"))
.build();
}
Dataset<E> dataset = repo.create(
uriOptions.get(URIBuilder.NAMESPACE_OPTION),
uriOptions.get(URIBuilder.DATASET_NAME_OPTION), descriptor, type);
if (isView) {
return Datasets.<E, V> view(dataset, uriOptions);