Package org.rcsb.strucmotif.io
Interface InvertedIndex
- All Known Implementing Classes:
InvertedIndexImpl
public interface InvertedIndex
The specification on how to insert and select residue pair occurrences. Update operate is not directly supported
(rather invalid/obsolete identifiers have to be removed manually and subsequently the new data can be inserted).
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(Collection<String> structureIdentifiers) Removes all information on a set of structures from the index.voidinsert(ResiduePairDescriptor residuePairDescriptor, Map<String, Collection<ResiduePairIdentifier>> residuePairOccurrences) Insert operation for new data.select(ResiduePairDescriptor residuePairDescriptor) Perform lookup for a particular bin.
-
Method Details
-
insert
void insert(ResiduePairDescriptor residuePairDescriptor, Map<String, Collection<ResiduePairIdentifier>> residuePairOccurrences) Insert operation for new data.- Parameters:
residuePairDescriptor- the bin for which new data should be writtenresiduePairOccurrences- the data to append to this bin - keys are pdbIds, values are all words of this descriptor
-
select
Stream<Pair<String,InvertedIndexResiduePairIdentifier[]>> select(ResiduePairDescriptor residuePairDescriptor) Perform lookup for a particular bin.- Parameters:
residuePairDescriptor- the bin for which occurrences should the lookup be performed- Returns:
- a
Streamof all occurrences, grouped by their structure identifier
-
delete
Removes all information on a set of structures from the index.- Parameters:
structureIdentifiers- what to remove
-