|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.ucsb.adl.bucket99.DatabaseCodedVocabulary
A vocabulary that is stored in a database, and which translates terms to sets of integer codes.
This class reads the following properties from Bucket99
configuration files given property name prefix X. Property
values may be indirectly specified using the notation
@P where P is the name of another
property (see ExtendedProperties
for more information).
.name
ADL Feature Type
Thesaurus".
.bucket
types".
.vocabulary_database_driver_class
com.informix.jdbc.IfxDriver".
.vocabulary_database_url
.vocabulary_database_properties
none".
If the filename is not absolute, it is interpreted relative to the
directory containing the Bucket99 configuration file.
.term_code_query
select term, code from
table" in which term, a non-null string, is a
vocabulary term and code, a non-null integer, is a
code associated with the term. The relationship between terms and
codes may be many to many.
.code_graph_query
none" or an SQL query of the
form "select code, subcode from table" in which
code and subcode, both non-null integers,
are vocabulary codes. If a query is specified, the returned rows
define a directed graph of codes, and the graph is used to
recursively augment the term-code associations established by
X.term_code_query above. Specifically, if term
T is associated with code C, and if S is a
subcode of C, then T is also associated with
S.
.code_usage_query
none" or an SQL query of the
form "select code from table" in which
code, a non-null integer, is a vocabulary code. If a
query is specified, it defines the codes that actually occur in the
collection, and term-code associations are limited to these codes.
.usage_database_driver_class
.code_usage_query is not
"none", the fully-qualified name of the usage
database's driver class, e.g.,
"com.informix.jdbc.IfxDriver".
.usage_database_url
.code_usage_query is not
"none", the usage database's connection URL.
.usage_database_properties
.code_usage_query is not
"none", the name of a Java properties file containing
usage database connection properties, or the string
"none". If the filename is not absolute, it is
interpreted relative to the directory containing the Bucket99
configuration file.
$Log: DatabaseCodedVocabulary.java,v $
Revision 1.4 2004/09/23 17:25:44 gjanee
Rewrite to use class
edu.ucsb.adl.middleware.ExtendedProperties.
Revision 1.3 2002/09/28 21:14:13 gjanee
Configuration file renames. Renamed the Bucket99 configuration
file to bucket99.conf.
Revision 1.2 2002/09/26 16:38:26 gjanee
Added support for a separate Java properties file containing
database connection properties. Added properties
X.vocabulary_database_properties and
X.usage_database_properties.
Revision 1.1 2000/10/17 05:08:23 gjanee
Initial revision
| Method Summary | |
static edu.ucsb.adl.bucket99.DatabaseCodedVocabulary |
createVocabulary(edu.ucsb.adl.middleware.ExtendedProperties propertyList,
java.lang.String prefix)
Creates a DatabaseCodedVocabulary. |
void |
destroy()
Frees all resources held by the vocabulary. |
java.lang.String |
getBucket()
Returns the bucket the vocabulary is used for. |
java.lang.String |
getName()
Returns the vocabulary's name. |
boolean |
isValidTerm(java.lang.String term)
Tests if a term is a valid term in the vocabulary. |
static void |
main(java.lang.String[] args)
Test driver. |
java.lang.Object |
translateTerm(java.lang.String term)
Translates a term into an array of zero or more integer codes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static edu.ucsb.adl.bucket99.DatabaseCodedVocabulary createVocabulary(edu.ucsb.adl.middleware.ExtendedProperties propertyList,
java.lang.String prefix)
throws InternalErrorException
DatabaseCodedVocabulary.
propertyList - The source for the above-mentioned properties.prefix - The property name prefix.
DatabaseCodedVocabulary.
InternalErrorException - If any error occurs.public java.lang.String getName()
getName in interface VocabularyADL Feature Type
Thesaurus".public java.lang.String getBucket()
getBucket in interface Vocabularytypes".public boolean isValidTerm(java.lang.String term)
isValidTerm in interface Vocabularyterm - The term.
true if the term is valid.public java.lang.Object translateTerm(java.lang.String term)
translateTerm in interface Vocabularyterm - The term.
null if the term is invalid.public void destroy()
destroy in interface Vocabulary
public static void main(java.lang.String[] args)
throws java.io.IOException,
InternalErrorException
java.io.IOException
InternalErrorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||