@Test public void testDifferentVendors() throws IOException { Map<String, Resource> map = asResourceMap(c100, c101, c110); assertEquals(c100, map.get(getUri(c100))); Overrides.override(map, Arrays.asList(getUri(c101), getUri(c110))); assertEquals(c101, map.get(getUri(c100))); }
@Deprecated public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) { for (Clause override : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) { String overrideRange = override.getAttribute(OVERRIDE_RANGE); T over = resources.get(override.getName()); if (over == null) { continue; } for (String uri : new ArrayList<>(resources.keySet())) { Resource res = resources.get(uri); if (shouldOverride(res, over, overrideRange)) { resources.put(uri, over); } } } }
Overrides { @Deprecated public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) { for (Clause override : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) { String overrideRange = override.getAttribute(OVERRIDE_RANGE); T over = resources.get(override.getName()); if (over == null) { continue; } for (String uri : new ArrayList<>(resources.keySet())) { Resource res = resources.get(uri); if (shouldOverride(res, over, overrideRange)) { resources.put(uri, over); } } } } }
Overrides { @Deprecated public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) { for (Clause override : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) { String overrideRange = override.getAttribute(OVERRIDE_RANGE); T over = resources.get(override.getName()); if (over == null) { continue; } for (String uri : new ArrayList<>(resources.keySet())) { Resource res = resources.get(uri); if (shouldOverride(res, over, overrideRange)) { resources.put(uri, over); } } } } private  Overrides(); }
Overrides { @Deprecated public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) { for (Clause override : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) { String overrideRange = override.getAttribute(OVERRIDE_RANGE); T over = resources.get(override.getName()); if (over == null) { continue; } for (String uri : new ArrayList<>(resources.keySet())) { Resource res = resources.get(uri); if (shouldOverride(res, over, overrideRange)) { resources.put(uri, over); } } } } private  Overrides(); @Deprecated static void override(Map<String, T> resources, Collection<String> overrides); static void override(Map<String, T> resources, Map<String, T> overridenFrom); static Set<String> loadOverrides(String overridesUrl); static String extractUrl(String override); }
Overrides { @Deprecated public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) { for (Clause override : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) { String overrideRange = override.getAttribute(OVERRIDE_RANGE); T over = resources.get(override.getName()); if (over == null) { continue; } for (String uri : new ArrayList<>(resources.keySet())) { Resource res = resources.get(uri); if (shouldOverride(res, over, overrideRange)) { resources.put(uri, over); } } } } private  Overrides(); @Deprecated static void override(Map<String, T> resources, Collection<String> overrides); static void override(Map<String, T> resources, Map<String, T> overridenFrom); static Set<String> loadOverrides(String overridesUrl); static String extractUrl(String override); static final String OVERRIDE_RANGE; }