Package de.julielab.java.utilities.index
Class StringArrayMapProvider
- java.lang.Object
-
- de.julielab.java.utilities.index.StringArrayMapProvider
-
- All Implemented Interfaces:
IStringArrayMapProvider
- Direct Known Subclasses:
PersistentIndexStringArrayMapProvider
public class StringArrayMapProvider extends Object implements IStringArrayMapProvider
Base class for addon terms (i.e. terms to be added to some key term, like synonyms or hypernyms) that uses a HashMap.
Subclasses of this class use other data structures to store and retrieve the addon terms. Useful for large numbers of such terms.
-
-
Constructor Summary
Constructors Constructor Description StringArrayMapProvider(org.slf4j.Logger log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getEligibleKeys()int[]getKeyIndices()Map<String,String[]>getMap()StringgetMultiValueDelimiterRegex()int[]getValueIndices()voidload(InputStream inputStream)voidload(URI uri)protected voidput(String term, String[] addonArray)voidsetEligibleKeys(Set<String> eligibleKeys)voidsetKeyIndices(int... keyIndex)voidsetMultiValueDelimiterRegex(String multiValueDelimiterRegex)voidsetValueIndices(int... valueIndices)
-
-
-
Method Detail
-
getMultiValueDelimiterRegex
public String getMultiValueDelimiterRegex()
-
setMultiValueDelimiterRegex
public void setMultiValueDelimiterRegex(String multiValueDelimiterRegex)
-
load
public void load(URI uri) throws IndexCreationException
- Specified by:
loadin interfaceIStringArrayMapProvider- Throws:
IndexCreationException
-
getValueIndices
public int[] getValueIndices()
-
setValueIndices
public void setValueIndices(int... valueIndices)
- Specified by:
setValueIndicesin interfaceIStringArrayMapProvider
-
getKeyIndices
public int[] getKeyIndices()
-
setKeyIndices
public void setKeyIndices(int... keyIndex)
- Specified by:
setKeyIndicesin interfaceIStringArrayMapProvider
-
load
public void load(InputStream inputStream) throws IndexCreationException
- Specified by:
loadin interfaceIStringArrayMapProvider- Throws:
IndexCreationException
-
getMap
public Map<String,String[]> getMap()
- Specified by:
getMapin interfaceIStringArrayMapProvider
-
-