|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Describes a set of strings that are obtained in some way from one or more database columns.
Typical implementations are Column
(describing the set
of strings contained in one database column), Pattern
(describing the set of strings that is obtained by sticking
the values of several database fields into a string pattern),
and BlankNodeIdentifier
(similar).
There are several other ValueSources that modify the behaviour
of another underlying ValueSource, implementing the Decorator
pattern. This includes TranslationTable
.TranslatingValueSource
(translates values using a translation table or translation class)
and the various value restrictions (@link RegexRestriction et. al.).
ValueSources are used by NodeMaker
s. A node maker
wraps the strings into Jena nodes, thus creating a description
of a set of RDF nodes.
TODO: Better name for ValueSource: ValueSetDescription?
History:
2004-08-02: Initial version.
Method Summary | |
boolean |
couldFit(java.lang.String value)
Checks if a given value fits this source without querying the database. |
java.util.Set |
getColumns()
Returns a set of all columns containing data necessary for this ValueSource. |
java.util.Map |
getColumnValues(java.lang.String value)
Returns a map of database fields and values corresponding to the argument. |
java.lang.String |
getValue(java.lang.String[] row,
java.util.Map columnNameNumberMap)
Retrieves a value from a database row according to some rule or pattern. |
Method Detail |
public boolean couldFit(java.lang.String value)
public java.util.Map getColumnValues(java.lang.String value)
For example, a ValueSource that corresponds directly to a single DB column would return a single-entry map with that column as the key, and value as the value.
value
- a non-null value
Column
keys, and string values.public java.util.Set getColumns()
public java.lang.String getValue(java.lang.String[] row, java.util.Map columnNameNumberMap)
row
- the database rowcolumnNameNumberMap
- a map from Table.Column style column
names to Integer indices into the row array
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |