Example usage for org.apache.commons.collections15 MultiMap remove

List of usage examples for org.apache.commons.collections15 MultiMap remove

Introduction

In this page you can find the example usage for org.apache.commons.collections15 MultiMap remove.

Prototype

public V remove(Object key, Object item);

Source Link

Document

Removes a specific value from map.

Usage

From source file:org.openanzo.rdf.MemQuadStore.java

/**
 * Remove indexes for this statement//from  ww w .  j  a  va 2 s  .com
 * 
 * @param stmt
 *            statement to deindex
 */
private void removeMaps(Statement stmt) {
    Resource c = stmt.getNamedGraphUri();
    Resource s = stmt.getSubject();
    URI p = stmt.getPredicate();
    Value o = stmt.getObject();
    subjectMap.remove(s, stmt);
    predMap.remove(p, stmt);
    objMap.remove(o, stmt);
    namedGraphMap.remove(c, stmt);
    MultiMap<Value, Statement> poIndexMap = poIndex.get(p);
    if (poIndexMap != null) {
        poIndexMap.remove(o, stmt);
        if (poIndexMap.size() == 0) {
            poIndex.remove(p);
        }
    }
    MultiMap<Resource, Statement> psIndexMap = psIndex.get(p);
    if (psIndexMap != null) {
        psIndexMap.remove(s, stmt);
        if (psIndexMap.size() == 0) {
            psIndex.remove(p);
        }
    }
}