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

How to use
SetMultimap
in
org.apache.jena.ext.com.google.common.collect

Best Java code snippets using org.apache.jena.ext.com.google.common.collect.SetMultimap (Showing top 4 results out of 315)

origin: org.apache.jena/jena-csv

private void addToReverseMap(final Node p, final Node s, final Node oldValue, final Node value) {
  final SetMultimap<Node, Node> valueToSubjectMap = valueReverseIndex.get(p);
  if ( valueToSubjectMap == null )
    return ; 
  valueToSubjectMap.remove(oldValue, s);
  valueToSubjectMap.put(value, s);
}
origin: org.apache.jena/jena-csv

@Override
public Collection<Row> getMatchingRows(Column column, Node value) {
  if (column == null || column.getColumnKey() == null)
    throw new NullPointerException("column is null");
  
  if (value == null)
    throw new NullPointerException("value is null");
  
  
  Node p = column.getColumnKey();
  final SetMultimap<Node, Node> valueToSubjectMap = valueReverseIndex.get(p);
  if ( valueToSubjectMap == null )
    return Collections.emptyList() ;
  final Set<Node> subjects = valueToSubjectMap.get(value);
  if ( subjects == null )
    return Collections.emptyList() ;
  final ArrayList<Row> matchingRows = new ArrayList<Row>();
  for (Node subject : subjects) {
    matchingRows.add(this.getRow(subject));
  }
  return matchingRows;
}
origin: org.apache.jena/jena-csv

private void removeFromReverseMap(final Node p, final Node s,
    final Node value) {
  final SetMultimap<Node, Node> valueTokeysMap = valueReverseIndex.get(p);
  if ( valueTokeysMap == null )
    return ;
  valueTokeysMap.remove(s, value);
}
origin: org.apache.jena/jena-csv

@Override
public ExtendedIterator<Triple> getTripleIterator(Column column, Node value) {
  
  // use POS index directly (fast)
  
  if (column == null || column.getColumnKey() == null)
    throw new NullPointerException("column is null");
  
  if (value == null)
    throw new NullPointerException("value is null");
  
  
  Node p = column.getColumnKey();
  final SetMultimap<Node, Node> valueToSubjectMap = valueReverseIndex.get(p);
  if ( valueToSubjectMap == null ) 
    return NullIterator.instance() ;
  final Set<Node> subjects = valueToSubjectMap.get(value);
  ArrayList<Triple> triples = new ArrayList<Triple>();
  for (Node subject : subjects) {
    triples.add(Triple.create(subject, p, value));
  }
  return WrappedIterator.create(triples.iterator());
}
org.apache.jena.ext.com.google.common.collectSetMultimap

Most used methods

  • get
  • put
  • remove

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 12 Jupyter Notebook extensions
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