@Test void testExtMapBuilder() { final RDF rdf = RDFFactory.getInstance(); assertTrue(TrellisExtensions.buildExtensionMap("").isEmpty()); assertTrue(TrellisExtensions.buildExtensionMap(" ").isEmpty()); assertTrue(TrellisExtensions.buildExtensionMap(", , = ,foo= ,, =bar,baz").isEmpty()); final Map<String, IRI> data1 = TrellisExtensions.buildExtensionMap( "ex = https: assertEquals(rdf.createIRI("https: assertEquals(Trellis.PreferAccessControl, data1.get("acl")); }
public static Map<String, IRI> buildExtensionMap(final String extensions) { return stream(extensions.split(",")).map(item -> item.split("=")).filter(kv -> kv.length == 2) .filter(kv -> !kv[0].trim().isEmpty() && !kv[1].trim().isEmpty()) .collect(toMap(kv -> kv[0].trim(), kv -> rdf.createIRI(kv[1].trim()))); }
TrellisExtensions { public static Map<String, IRI> buildExtensionMap(final String extensions) { return stream(extensions.split(",")).map(item -> item.split("=")).filter(kv -> kv.length == 2) .filter(kv -> !kv[0].trim().isEmpty() && !kv[1].trim().isEmpty()) .collect(toMap(kv -> kv[0].trim(), kv -> rdf.createIRI(kv[1].trim()))); } }
TrellisExtensions { public static Map<String, IRI> buildExtensionMap(final String extensions) { return stream(extensions.split(",")).map(item -> item.split("=")).filter(kv -> kv.length == 2) .filter(kv -> !kv[0].trim().isEmpty() && !kv[1].trim().isEmpty()) .collect(toMap(kv -> kv[0].trim(), kv -> rdf.createIRI(kv[1].trim()))); } private  TrellisExtensions(); }
TrellisExtensions { public static Map<String, IRI> buildExtensionMap(final String extensions) { return stream(extensions.split(",")).map(item -> item.split("=")).filter(kv -> kv.length == 2) .filter(kv -> !kv[0].trim().isEmpty() && !kv[1].trim().isEmpty()) .collect(toMap(kv -> kv[0].trim(), kv -> rdf.createIRI(kv[1].trim()))); } private  TrellisExtensions(); static Map<String, IRI> buildExtensionMap(final String extensions); static Map<String, IRI> buildExtensionMapFromConfig(final Config config); }
TrellisExtensions { public static Map<String, IRI> buildExtensionMap(final String extensions) { return stream(extensions.split(",")).map(item -> item.split("=")).filter(kv -> kv.length == 2) .filter(kv -> !kv[0].trim().isEmpty() && !kv[1].trim().isEmpty()) .collect(toMap(kv -> kv[0].trim(), kv -> rdf.createIRI(kv[1].trim()))); } private  TrellisExtensions(); static Map<String, IRI> buildExtensionMap(final String extensions); static Map<String, IRI> buildExtensionMapFromConfig(final Config config);  }