Package org.rcsb.strucmotif.io
Class StateRepositoryImpl
java.lang.Object
org.rcsb.strucmotif.io.StateRepositoryImpl
- All Implemented Interfaces:
StateRepository
A file-system-based state repository.
-
Constructor Summary
ConstructorsConstructorDescriptionStateRepositoryImpl(MotifSearchConfig motifSearchConfig) Construct a state repository instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteDirty(Collection<String> removals) Remove from 'dirty' collection.voiddeleteKnown(Collection<String> removals) Remove from 'known' collection.protected StructureInformationhandleKnownSplit(String[] split) Split a line into a structure information object.voidinsertDirty(Collection<String> additions) Insert into 'dirty' collection.voidinsertKnown(Collection<StructureInformation> additions) Insert into 'known' collection.selectAssemblyMap(String structureIdentifier) Provides assembly information.The set of currently 'dirty' ids.Returns all registered revisions.
-
Constructor Details
-
StateRepositoryImpl
Construct a state repository instance.- Parameters:
motifSearchConfig- the config
-
-
Method Details
-
selectAssemblyMap
Description copied from interface:StateRepositoryProvides assembly information.- Specified by:
selectAssemblyMapin interfaceStateRepository- Parameters:
structureIdentifier- the structure of interest- Returns:
- a map with operator expressions as key and a collection of all corresponding assembly ids as value
-
selectKnown
Description copied from interface:StateRepositoryReturns all registered revisions.- Specified by:
selectKnownin interfaceStateRepository- Returns:
- a collection of ids and their corresponding revision
-
handleKnownSplit
Split a line into a structure information object.- Parameters:
split- the raw line- Returns:
- a structure information container
-
selectDirty
Description copied from interface:StateRepositoryThe set of currently 'dirty' ids. Will be populated when update starts and emptied upon successful completion. Problematic if not the empty set after an update.- Specified by:
selectDirtyin interfaceStateRepository- Returns:
- a collection of ids
-
insertKnown
Description copied from interface:StateRepositoryInsert into 'known' collection.- Specified by:
insertKnownin interfaceStateRepository- Parameters:
additions- a collection of ids
-
insertDirty
Description copied from interface:StateRepositoryInsert into 'dirty' collection.- Specified by:
insertDirtyin interfaceStateRepository- Parameters:
additions- a collection of ids
-
deleteKnown
Description copied from interface:StateRepositoryRemove from 'known' collection.- Specified by:
deleteKnownin interfaceStateRepository- Parameters:
removals- a collection of ids
-
deleteDirty
Description copied from interface:StateRepositoryRemove from 'dirty' collection.- Specified by:
deleteDirtyin interfaceStateRepository- Parameters:
removals- a collection of ids
-