@Test public void getsPreferredUrisWithoutFile() throws Exception { Set<URI> settingsURIs = ImmutableSet.of(LDFusionToolTestUtils.createHttpUri("s1"), LDFusionToolTestUtils.createHttpUri("s2")); Set<String> preferredURIs = ImmutableSet.of(LDFusionToolTestUtils.createHttpUri("p1").stringValue(), LDFusionToolTestUtils.createHttpUri("p2").stringValue()); Set<String> actualUris = LDFusionToolComponentFactory.getPreferredURIs(settingsURIs, null, preferredURIs); Set<String> expectedUris = ImmutableSet.of( LDFusionToolTestUtils.createHttpUri("s1").stringValue(), LDFusionToolTestUtils.createHttpUri("s2").stringValue(), LDFusionToolTestUtils.createHttpUri("p1").stringValue(), LDFusionToolTestUtils.createHttpUri("p2").stringValue()); assertThat(actualUris, is(expectedUris)); }
protected static Set<String> getPreferredURIs( Set<URI> settingsPreferredURIs, File canonicalURIsInputFile, Collection<String> preferredCanonicalURIs) throws IOException { Set<String> preferredURIs = new HashSet<>(settingsPreferredURIs.size()); for (URI uri : settingsPreferredURIs) { preferredURIs.add(uri.stringValue()); } if (canonicalURIsInputFile != null) { new CanonicalUriFileHelper().readCanonicalUris(canonicalURIsInputFile, preferredURIs); } preferredURIs.addAll(preferredCanonicalURIs); return preferredURIs; }
LDFusionToolComponentFactory implements FusionComponentFactory { protected static Set<String> getPreferredURIs( Set<URI> settingsPreferredURIs, File canonicalURIsInputFile, Collection<String> preferredCanonicalURIs) throws IOException { Set<String> preferredURIs = new HashSet<>(settingsPreferredURIs.size()); for (URI uri : settingsPreferredURIs) { preferredURIs.add(uri.stringValue()); } if (canonicalURIsInputFile != null) { new CanonicalUriFileHelper().readCanonicalUris(canonicalURIsInputFile, preferredURIs); } preferredURIs.addAll(preferredCanonicalURIs); return preferredURIs; } }
LDFusionToolComponentFactory implements FusionComponentFactory { protected static Set<String> getPreferredURIs( Set<URI> settingsPreferredURIs, File canonicalURIsInputFile, Collection<String> preferredCanonicalURIs) throws IOException { Set<String> preferredURIs = new HashSet<>(settingsPreferredURIs.size()); for (URI uri : settingsPreferredURIs) { preferredURIs.add(uri.stringValue()); } if (canonicalURIsInputFile != null) { new CanonicalUriFileHelper().readCanonicalUris(canonicalURIsInputFile, preferredURIs); } preferredURIs.addAll(preferredCanonicalURIs); return preferredURIs; } LDFusionToolComponentFactory(Config config); }
LDFusionToolComponentFactory implements FusionComponentFactory { protected static Set<String> getPreferredURIs( Set<URI> settingsPreferredURIs, File canonicalURIsInputFile, Collection<String> preferredCanonicalURIs) throws IOException { Set<String> preferredURIs = new HashSet<>(settingsPreferredURIs.size()); for (URI uri : settingsPreferredURIs) { preferredURIs.add(uri.stringValue()); } if (canonicalURIsInputFile != null) { new CanonicalUriFileHelper().readCanonicalUris(canonicalURIsInputFile, preferredURIs); } preferredURIs.addAll(preferredCanonicalURIs); return preferredURIs; } LDFusionToolComponentFactory(Config config); @Override LDFusionToolExecutor getExecutor(UriMappingIterable uriMapping); @Override InputLoader getInputLoader(); @Override Model getMetadata(); @Override UriMappingIterable getUriMapping(); @Override CloseableRDFWriter getRDFWriter(); @Override ResourceDescriptionConflictResolver getConflictResolver(Model metadata, UriMappingIterable uriMapping); @Override UriMappingWriter getCanonicalUriWriter(UriMappingIterable uriMapping); @Override UriMappingWriter getSameAsLinksWriter(); ProfilingTimeCounter<EnumFusionCounters> getExecutorTimeProfiler(); MemoryProfiler getExecutorMemoryProfiler(); }
LDFusionToolComponentFactory implements FusionComponentFactory { protected static Set<String> getPreferredURIs( Set<URI> settingsPreferredURIs, File canonicalURIsInputFile, Collection<String> preferredCanonicalURIs) throws IOException { Set<String> preferredURIs = new HashSet<>(settingsPreferredURIs.size()); for (URI uri : settingsPreferredURIs) { preferredURIs.add(uri.stringValue()); } if (canonicalURIsInputFile != null) { new CanonicalUriFileHelper().readCanonicalUris(canonicalURIsInputFile, preferredURIs); } preferredURIs.addAll(preferredCanonicalURIs); return preferredURIs; } LDFusionToolComponentFactory(Config config); @Override LDFusionToolExecutor getExecutor(UriMappingIterable uriMapping); @Override InputLoader getInputLoader(); @Override Model getMetadata(); @Override UriMappingIterable getUriMapping(); @Override CloseableRDFWriter getRDFWriter(); @Override ResourceDescriptionConflictResolver getConflictResolver(Model metadata, UriMappingIterable uriMapping); @Override UriMappingWriter getCanonicalUriWriter(UriMappingIterable uriMapping); @Override UriMappingWriter getSameAsLinksWriter(); ProfilingTimeCounter<EnumFusionCounters> getExecutorTimeProfiler(); MemoryProfiler getExecutorMemoryProfiler();  }