You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by dick-twocows <gi...@git.apache.org> on 2017/04/05 20:30:17 UTC

[GitHub] jena issue #233: Added mosaic and thrift packages to org.apache.jena.sparql....

Github user dick-twocows commented on the issue:

    https://github.com/apache/jena/pull/233
  
    Well that confirmed the PR worked :-)
    
    Thanks for the pointer and I'm sure there are a few other places where this
    occurs.
    
    That class has an issue as before being ported into the Jena fork it
    referenced jena-tdb for the two commented class definitions. Those i can
    replace with a FQCN but the cast to getWapped() has got me stumped! It
    doesn't stop it working but it needs a fix.
    
    There's a thread on the Jena mail which mentions (to Andy) this was a test
    PR and it needs the Thrift file compiled...
    
    
    On 5 Apr 2017 8:57 pm, "A. Soroka" <no...@github.com> wrote:
    
    *@ajs6f* commented on this pull request.
    ------------------------------
    
    In jena-arq/src/main/java/org/apache/jena/sparql/core/mosaic/Topology.java
    <https://github.com/apache/jena/pull/233#discussion_r110013073>:
    
    > +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());
    
    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.
    
    \u2014
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    <https://github.com/apache/jena/pull/233#pullrequestreview-31153874>, or mute
    the thread
    <https://github.com/notifications/unsubscribe-auth/ARAbAv8iwJSxQ-LIp3hTFQi3yl2KO46Dks5rs_JAgaJpZM4M0qnn>
    .



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---