Open SiteSearch 4.1.1
Final

ORG.oclc.qparse
Class IndexMap

java.lang.Object
  |
  +--ORG.oclc.qparse.IndexMap

public class IndexMap
extends Object

The IndexMap class maintains all the index information defined for a database including a list of Map objects defining each individual index and the IndexLists that are used by the interface to build html output. The class also provides a set of methods for retrieving index specification information.

See Also:
Map, StopWord

Field Summary
static int ABB_OP_AND
          integer defining the value for search operator 'and'.
static int ABB_OP_NEAR
          integer defining the value for search operator 'near'.
static int ABB_OP_OR
          integer defining the value for search operator 'or'.
static int ABB_OP_WITH
          integer defining the value for search operator 'with'.
static int ANY
          integer data type defining the value for the Z3950 use attribute any.
protected  String globalfilter
           
 String OID
          String data type containing the Z3950 OID for this set of indices.
static int PHRASE
          integer data type defining the value for the Z3950 use attribute phrase.
static int PROX_PARG
          integer data type defining the value for proximity searching using the parg operator.
static int PROX_SEC
          integer data type defining the value for proximity searching using the sec operator.
static int PROX_WITH
          integer data type defining the value for proximity searching using the with operator.
 String sectionName
          String data type containing the name of the section within the inifile that the configuration data is read.
static int WORD
          integer data type defining the value for the Z3950 use attribute word.
 
Constructor Summary
IndexMap()
          Construct an IndexMap object.
IndexMap(String attrSection, IniFile ini)
          Construct an IndexMap object using the data specified in the named section of the input IniFile object.
IndexMap(String attrSection, IniFile ini, boolean liteFlag)
          Construct an IndexMap object using the data in the named section from the input IniFile object and only load information needed by the ZBase server - a lite load to conserve memory.
 
Method Summary
 void addMap(Map map)
          Adds a new Map object to the IndexMap.
 Object clone()
          Clones a copy of the object.
 void deleteMap(Map map)
          Deletes a Map object in the IndexMap.
 int getAlternateIdbyUse(int use)
          Retrieves an integer containing the alternateId value from a Map object base on the input 'use'.
 int getAlternateIdbyUseStructure(int use, int structure)
          Retrieves an integer containing the alternateId value from a Map object base on the input 'use' and 'structure'
 String getAlternateIdStringbyUse(int use)
          Retrieves a String containing the alternateId value from a Map object base on the input 'use'.
 String getAlternateIdStringbyUseStructure(int use, int structure)
          Retrieves a String containing the alternateId value from a Map object base on the input 'use' and 'structure'
 int getDefaultAlternateId(boolean in_scan)
          Retrieves an integer containing the default alternateId for the IndexMap object.
 String getDefaultId(boolean in_scan)
          Retrieves a String containing a formatted use/structure for the default searching indices in the IndexMap object.
 Map getDefaultMap(boolean in_scan)
          Retrieves a Map object for the default searching indices in the IndexMap object.
 int getDefaultOp()
          Retrieves an integer for the default operator for the IndexMap.
 Vector getIndexList(String name)
          Retrieves a Vector containing a list of Map objects for the input list name.
 Map[] getMap()
          Returns an array of Map objects for this IndexMap.
 Map getMapbyAbb(String abb)
          Retrieves a Map object for the input string based on the 'abbrev' field in the Map.
 Map getMapbyAlternateIndex(int index)
          Retrieves a Map object for the input integer based on the 'alternateId' field in the Map.
 Map getMapbyIndex(int index)
          Retrieves a Map object for the input integer based on the 'Use' field in the Map.
 Map getMapbyIndex(String index)
          Retrieves a Map object for the input String based on the 'Use' field in the Map.
 Map getMapbyLongname(String name)
          Retrieves a Map object for the input string based on the 'longName' field in the Map.
 Map getMapbyName(String name)
          Retrieves a Map object for the input string based on the 'name' field in the Map.
 Map getMapbyUse(int use)
          Retrieves a Map object for the input integer based on the 'Use' field in the Map.
 Map getMapbyUseStructure(int use, int structure)
          Retrieves a Map object for the input use and structure based on the 'Use' and 'Structure' fields in the Map.
 String[] getPluralEndings()
          Returns an array of Strings containing the plural endings for plural searching in the database.
 StopWord getStopWords()
          Returns the StopWord object for search stopwords.
 int getUsebyAlternateId(int alternateId)
          Retrieves an integer containing the Use value from a Map object base on the input 'alternateId'.
 String OID()
          Returns a String containing the Z3950 OID for this index specification.
 String opToString(int operator)
          Creates a String representation for a numeric searching operator.
 int prox_num(int prox_type)
          Retrieves an integer for the proximity number from the input proximity type.
 String sectionName()
          Returns a String containing the section within the input IniFile object where this information was read from.
 void setDefaultBrowseMap(Map map)
          Sets the default browse Map object for the database to the input Map object.
 void setDefaultOperator(int operator)
          Sets the default searching operator.
 void setDefaultSearchMap(Map map)
          Sets the default search Map object for the database to the input Map object.
 void setMap(Map[] map)
          Resets the array of Map entries to the input array.
 void setPluralEndings(String endings)
          Sets the plural endings for the database to the input string.
 void setStopWords(StopWord stopwords)
          Sets the StopWord object to the input StopWord object.
 String toIniString()
          Generates an IniFile type String representation of the object.
 String toString()
          Generates a String representation of the object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ABB_OP_AND

public static final int ABB_OP_AND
integer defining the value for search operator 'and'.

ABB_OP_WITH

public static final int ABB_OP_WITH
integer defining the value for search operator 'with'.

ABB_OP_NEAR

public static final int ABB_OP_NEAR
integer defining the value for search operator 'near'.

ABB_OP_OR

public static final int ABB_OP_OR
integer defining the value for search operator 'or'.

PROX_WITH

public static final int PROX_WITH
integer data type defining the value for proximity searching using the with operator.

PROX_SEC

public static final int PROX_SEC
integer data type defining the value for proximity searching using the sec operator.

PROX_PARG

public static final int PROX_PARG
integer data type defining the value for proximity searching using the parg operator.

WORD

public static final int WORD
integer data type defining the value for the Z3950 use attribute word.

PHRASE

public static final int PHRASE
integer data type defining the value for the Z3950 use attribute phrase.

ANY

public static final int ANY
integer data type defining the value for the Z3950 use attribute any.

OID

public String OID
String data type containing the Z3950 OID for this set of indices.

sectionName

public String sectionName
String data type containing the name of the section within the inifile that the configuration data is read.

globalfilter

protected String globalfilter
Constructor Detail

IndexMap

public IndexMap()
Construct an IndexMap object.

IndexMap

public IndexMap(String attrSection,
                IniFile ini)
Construct an IndexMap object using the data specified in the named section of the input IniFile object.

IndexMap

public IndexMap(String attrSection,
                IniFile ini,
                boolean liteFlag)
Construct an IndexMap object using the data in the named section from the input IniFile object and only load information needed by the ZBase server - a lite load to conserve memory.
Method Detail

toIniString

public String toIniString()
Generates an IniFile type String representation of the object.
Returns:
String

toString

public String toString()
Generates a String representation of the object.
Returns:
String
Overrides:
toString in class Object

OID

public final String OID()
Returns a String containing the Z3950 OID for this index specification.
Returns:
String

sectionName

public final String sectionName()
Returns a String containing the section within the input IniFile object where this information was read from.
Returns:
String

getMap

public final Map[] getMap()
Returns an array of Map objects for this IndexMap.
Returns:
Map[]

setDefaultOperator

public void setDefaultOperator(int operator)
Sets the default searching operator.
Parameters:
operator - the integer value for the operator.

setDefaultSearchMap

public void setDefaultSearchMap(Map map)
Sets the default search Map object for the database to the input Map object.
Parameters:
Map - object.

setDefaultBrowseMap

public void setDefaultBrowseMap(Map map)
Sets the default browse Map object for the database to the input Map object.
Parameters:
Map - object.

setPluralEndings

public void setPluralEndings(String endings)
Sets the plural endings for the database to the input string.

addMap

public final void addMap(Map map)
Adds a new Map object to the IndexMap.

deleteMap

public final void deleteMap(Map map)
Deletes a Map object in the IndexMap.

setMap

public final void setMap(Map[] map)
Resets the array of Map entries to the input array.
Parameters:
map - the array of Map objects

getMapbyAbb

public final Map getMapbyAbb(String abb)
Retrieves a Map object for the input string based on the 'abbrev' field in the Map.
Returns:
Map

getMapbyName

public final Map getMapbyName(String name)
Retrieves a Map object for the input string based on the 'name' field in the Map.
Returns:
Map.

getMapbyLongname

public final Map getMapbyLongname(String name)
Retrieves a Map object for the input string based on the 'longName' field in the Map.
Returns:
Map.

getMapbyIndex

public final Map getMapbyIndex(int index)
Retrieves a Map object for the input integer based on the 'Use' field in the Map.
Returns:
Map.

getMapbyIndex

public final Map getMapbyIndex(String index)
Retrieves a Map object for the input String based on the 'Use' field in the Map.
Returns:
Map.

getMapbyUseStructure

public final Map getMapbyUseStructure(int use,
                                      int structure)
Retrieves a Map object for the input use and structure based on the 'Use' and 'Structure' fields in the Map.
Returns:
Map.

getMapbyUse

public final Map getMapbyUse(int use)
Retrieves a Map object for the input integer based on the 'Use' field in the Map.
Returns:
Map.

getMapbyAlternateIndex

public final Map getMapbyAlternateIndex(int index)
Retrieves a Map object for the input integer based on the 'alternateId' field in the Map.
Returns:
Map.

getAlternateIdbyUse

public final int getAlternateIdbyUse(int use)
Retrieves an integer containing the alternateId value from a Map object base on the input 'use'.
Returns:
int

getAlternateIdStringbyUse

public final String getAlternateIdStringbyUse(int use)
Retrieves a String containing the alternateId value from a Map object base on the input 'use'.
Returns:
String or null

getAlternateIdbyUseStructure

public final int getAlternateIdbyUseStructure(int use,
                                              int structure)
Retrieves an integer containing the alternateId value from a Map object base on the input 'use' and 'structure'
Returns:
int

getAlternateIdStringbyUseStructure

public final String getAlternateIdStringbyUseStructure(int use,
                                                       int structure)
Retrieves a String containing the alternateId value from a Map object base on the input 'use' and 'structure'
Returns:
String or null

getUsebyAlternateId

public final int getUsebyAlternateId(int alternateId)
Retrieves an integer containing the Use value from a Map object base on the input 'alternateId'.
Returns:
int

getDefaultAlternateId

public final int getDefaultAlternateId(boolean in_scan)
Retrieves an integer containing the default alternateId for the IndexMap object.
Parameters:
in_scan - indicates whether to return the default for search(false) or browse(true)
Returns:
int

getDefaultId

public final String getDefaultId(boolean in_scan)
Retrieves a String containing a formatted use/structure for the default searching indices in the IndexMap object.
Parameters:
in_scan - indicates whether to return the default for search(false) or browse(true)
Returns:
String

getDefaultMap

public final Map getDefaultMap(boolean in_scan)
Retrieves a Map object for the default searching indices in the IndexMap object.
Parameters:
in_scan - indicates whether to return the default for search(false) or browse(true)
Returns:
String

prox_num

public final int prox_num(int prox_type)
Retrieves an integer for the proximity number from the input proximity type.
Returns:
int

getDefaultOp

public final int getDefaultOp()
Retrieves an integer for the default operator for the IndexMap.
Returns:
int.

getPluralEndings

public final String[] getPluralEndings()
Returns an array of Strings containing the plural endings for plural searching in the database.
Returns:
String[]

getStopWords

public final StopWord getStopWords()
Returns the StopWord object for search stopwords.
Returns:
StopWord

setStopWords

public final void setStopWords(StopWord stopwords)
Sets the StopWord object to the input StopWord object.
Parameters:
StopWord -  

getIndexList

public final Vector getIndexList(String name)
Retrieves a Vector containing a list of Map objects for the input list name.
Parameters:
name - the name of the indexlist to retrieve.

opToString

public final String opToString(int operator)
Creates a String representation for a numeric searching operator.
Parameters:
operator -  
Returns:
String "and", "or", "not", "with"

clone

public Object clone()
Clones a copy of the object.
Returns:
Object
Overrides:
clone in class Object

Open SiteSearch 4.1.1
Final