public class LibSearch extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LIB_SEARCH_TABLE_NAME
the name of the table in the database
|
static int |
TYPE_CLASSNAME |
static int |
TYPE_FOLDERNAME |
static int |
TYPE_KARNAME |
static int |
TYPE_LOCALREPO |
static int |
TYPE_NAME
Map of integers for the different types of strings that are stored in the
CACHE_SEARCH table.
|
static int |
TYPE_ONTCLASSNAME |
static int |
TYPE_ONTOLOGY |
Constructor and Description |
---|
LibSearch()
A constructor that creates a new connection to the database.
|
LibSearch(java.sql.Connection conn)
A constructor that is given a connection to the database.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Delete everything from the database table.
|
int |
countItems()
Count how many rows there are in the LIBRARY_SEARCH table.
|
void |
initialize(java.sql.Connection conn)
Initialize the instance.
|
void |
insertRow(int type,
int liid,
java.lang.String searchString)
Convenience method to reduce code redundancy.
|
void |
remove(int liid)
Remove all of the entries from the table that match the given KeplerLSID.
|
java.util.Vector<java.lang.Integer> |
search(java.lang.String value)
Search all search string types in the index for a specific string.
|
java.util.Vector<java.lang.Integer> |
search(java.lang.String value,
int type)
Search a specific search string type in the index for the given value.
|
java.util.Vector<java.lang.Integer> |
search(java.lang.String value,
java.util.Vector<java.lang.Integer> types)
Return all LIID values that match the given string and search types.
|
public static final java.lang.String LIB_SEARCH_TABLE_NAME
public static final int TYPE_NAME
public static final int TYPE_CLASSNAME
public static final int TYPE_ONTCLASSNAME
public static final int TYPE_ONTOLOGY
public static final int TYPE_FOLDERNAME
public static final int TYPE_KARNAME
public static final int TYPE_LOCALREPO
public LibSearch() throws java.lang.Exception
java.lang.Exception
public LibSearch(java.sql.Connection conn)
conn
- public void initialize(java.sql.Connection conn)
conn
- public java.util.Vector<java.lang.Integer> search(java.lang.String value)
value
- public java.util.Vector<java.lang.Integer> search(java.lang.String value, int type)
value
- type
- public java.util.Vector<java.lang.Integer> search(java.lang.String value, java.util.Vector<java.lang.Integer> types)
value
- types
- public void clear() throws java.sql.SQLException
java.sql.SQLException
public void remove(int liid) throws java.sql.SQLException
lsid
- java.sql.SQLException
public int countItems()
public void insertRow(int type, int liid, java.lang.String searchString) throws java.sql.SQLException
type
- lsid
- searchString
- java.lang.Exception
java.sql.SQLException