Tabnine Logo
TripleComparator
Code IndexAdd Tabnine to your IDE (free)

How to use
TripleComparator
in
org.apache.jena.sparql.util

Best Java code snippets using org.apache.jena.sparql.util.TripleComparator (Showing top 8 results out of 315)

origin: SmartDataAnalytics/jena-sparql-api

public static Map<Node, Set<Triple>> indexSorted(Iterable<Quad> quads)
{
  Map<Node, Set<Triple>> result = new TreeMap<Node, Set<Triple>>(new NodeComparator());
  for(Quad q : quads) {
    Set<Triple> triples = result.get(q.getGraph());
    if(triples == null) {
      triples = new TreeSet<Triple>(new TripleComparator());
      result.put(q.getGraph(), triples);
    }
    triples.add(q.asTriple());
  }
  return result;
}
origin: SmartDataAnalytics/DL-Learner

        @Override
        public int compare(Triple o1, Triple o2) {
          boolean same = o1.subjectMatches(o2.getSubject())
              && o2.predicateMatches(o2.getPredicate())
              && o1.getObject().isVariable() && o2.getObject().isVariable();
//                            && !var2OutgoingTPs.containsKey(o1.getObject());
          if (same) return 0;
          return comp.compare(o1, o2);
        }
      });
origin: SmartDataAnalytics/DL-Learner

        @Override
        public int compare(Triple o1, Triple o2) {
          boolean same = o1.subjectMatches(o2.getSubject())
              && o2.predicateMatches(o2.getPredicate())
              && o1.getObject().isVariable() && o2.getObject().isVariable();
//                            && !var2IncomingTPs.containsKey(o1.getObject());
          if (same) return 0;
          return comp.compare(o1, o2);
        }
      });
origin: apache/jena

  @Override
  protected DataBag<Triple> createDataBag()
  {
    return BagFactory.newDistinctBag(getThresholdPolicy(), SerializationFactoryFinder.tripleSerializationFactory(), new TripleComparator()) ;
  }
}
origin: SmartDataAnalytics/DL-Learner

        @Override
        public int compare(Triple o1, Triple o2) {
          boolean same = o1.objectMatches(o2.getObject())
              && o2.predicateMatches(o2.getPredicate())
              && o1.getSubject().isVariable() && o2.getSubject().isVariable();
//                            && !var2IncomingTPs.containsKey(o1.getObject());
          if (same) return 0;
          return comp.compare(o1, o2);
        }
      });
origin: SmartDataAnalytics/DL-Learner

  fixedTriplePatterns.add(tp);
} else {
  Set<Triple> cluster = new TreeSet<>(new TripleComparator());
  cluster.add(tp);
  clusters.add(cluster);
  TripleComparator comp = new TripleComparator();
origin: SmartDataAnalytics/DL-Learner

TripleComparator comp = new TripleComparator();
origin: SmartDataAnalytics/DL-Learner

TripleComparator comp = new TripleComparator();
org.apache.jena.sparql.utilTripleComparator

Most used methods

  • <init>
  • compare

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Notification (javax.management)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now