OptionBuilder<DatasetRepository> managedBuilder = new ManagedBuilder();
OptionBuilder<DatasetRepository> externalBuilder = new ExternalBuilder();
Registration.register(
new URIPattern("hive"),
new URIPattern("hive::namespace/:dataset"),
managedBuilder);
Registration.register(
new URIPattern("hive"),
new URIPattern("hive::dataset?namespace=default"),
managedBuilder);
Registration.register(
new URIPattern("hive"),
new URIPattern("hive?namespace=default"),
managedBuilder);
Registration.register(
new URIPattern("hive://" + NOT_SET),
new URIPattern("hive:/:namespace/:dataset"),
managedBuilder);
Registration.register(
new URIPattern("hive://" + NOT_SET),
new URIPattern("hive:/:dataset?namespace=default"),
managedBuilder);
Registration.register(
new URIPattern("hive://" + NOT_SET),
new URIPattern("hive://" + NOT_SET + "?namespace=default"),
managedBuilder);
Registration.register(
new URIPattern("hive:/*path?absolute=true"),
new URIPattern("hive:/*path/:namespace/:dataset?absolute=true"),
externalBuilder);
Registration.register(
new URIPattern("hive:*path"),
new URIPattern("hive:*path/:namespace/:dataset"),
externalBuilder);
}