@Test public void lookupMappedResourceRelative() throws IOException { Dataset dataset = new DatasetImpl("some/namespace", URI.create("some:uri"), inStream -> inStream); dataset.setConfig(new ObjectMapper().readTree("{\"resources\": { \"previous/path.txt\": \"current/path.txt\" } }")); assertThat(DatasetUtil.mapResourceForDataset(dataset, URI.create("previous/path.txt")).toString(), is("some:uri/current/path.txt")); }
public static URI mapResourceForDataset(Dataset dataset, URI resourceName) throws IOException { URI mappedResource = getNamedResourceURI(dataset, resourceName); return ResourceUtil.getAbsoluteResourceURI(dataset.getArchiveURI(), mappedResource); }
DatasetUtil { public static URI mapResourceForDataset(Dataset dataset, URI resourceName) throws IOException { URI mappedResource = getNamedResourceURI(dataset, resourceName); return ResourceUtil.getAbsoluteResourceURI(dataset.getArchiveURI(), mappedResource); } }
DatasetUtil { public static URI mapResourceForDataset(Dataset dataset, URI resourceName) throws IOException { URI mappedResource = getNamedResourceURI(dataset, resourceName); return ResourceUtil.getAbsoluteResourceURI(dataset.getArchiveURI(), mappedResource); }  }
DatasetUtil { public static URI mapResourceForDataset(Dataset dataset, URI resourceName) throws IOException { URI mappedResource = getNamedResourceURI(dataset, resourceName); return ResourceUtil.getAbsoluteResourceURI(dataset.getArchiveURI(), mappedResource); }  static URI getNamedResourceURI(Dataset dataset, URI resourceName); static String getValueOrDefault(JsonNode config, String key, String defaultValue); static boolean shouldResolveReferences(Dataset dataset); static URI mapResourceNameIfRequested(URI resourceName, JsonNode config); static URI mapResourceForDataset(Dataset dataset, URI resourceName); }
DatasetUtil { public static URI mapResourceForDataset(Dataset dataset, URI resourceName) throws IOException { URI mappedResource = getNamedResourceURI(dataset, resourceName); return ResourceUtil.getAbsoluteResourceURI(dataset.getArchiveURI(), mappedResource); }  static URI getNamedResourceURI(Dataset dataset, URI resourceName); static String getValueOrDefault(JsonNode config, String key, String defaultValue); static boolean shouldResolveReferences(Dataset dataset); static URI mapResourceNameIfRequested(URI resourceName, JsonNode config); static URI mapResourceForDataset(Dataset dataset, URI resourceName);  }