Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/233#discussion_r110013073
--- Diff:
jena-arq/src/main/java/org/apache/jena/sparql/core/mosaic/Topology.java ---
@@ -0,0 +1,45 @@
+package org.apache.jena.sparql.core.mosaic;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.sparql.core.mem.DatasetGraphInMemory;
+import org.apache.jena.sparql.util.Symbol;
+
+public class Topology {
+
+ protected static final Map<Symbol, Metric> ENTRIES;
+
+ public static Symbol keyFor(final Class<? extends DatasetGraph> c) {
+ return Symbol.create(c.getName());
+ }
+
+ static {
+ final Map<Symbol, Metric> entries = new HashMap<>();
+
+ entries.put(keyFor(DatasetGraph.class), new Metric());
+
+ entries.put(keyFor(DatasetGraphInMemory.class), new Metric());
--- End diff --
Just a style thing, but
`org.apache.jena.ext.com.google.common.collect.ImmutableMap.of(K, V, K, V)`
would let you build this right in the field declaration, no `static` stanza
needed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---