|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.values.ValueDecorator
public class ValueDecorator
Nested Class Summary | |
---|---|
static interface |
ValueDecorator.ValueConstraint
|
Constructor Summary | |
---|---|
ValueDecorator(ValueMaker base,
List constraints)
|
|
ValueDecorator(ValueMaker base,
List constraints,
Translator translator)
|
Method Summary | |
---|---|
Map |
attributeConditions(String value)
Returns a map of database fields and values corresponding to the argument. |
static ValueDecorator.ValueConstraint |
containsConstraint(String containsSubstring)
|
void |
describeSelf(NodeSetFilter c)
|
String |
makeValue(ResultRow row)
Retrieves a value from a database row according to some rule or pattern. |
boolean |
matches(String value)
Checks if a given value fits this source without querying the database. |
static ValueDecorator.ValueConstraint |
maxLengthConstraint(int maxLength)
|
Set |
projectionAttributes()
Returns a set of all columns containing data necessary for this ValueSource. |
static ValueDecorator.ValueConstraint |
regexConstraint(String regex)
|
ValueMaker |
replaceColumns(ColumnRenamer renamer)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValueDecorator(ValueMaker base, List constraints)
public ValueDecorator(ValueMaker base, List constraints, Translator translator)
Method Detail |
---|
public static ValueDecorator.ValueConstraint maxLengthConstraint(int maxLength)
public static ValueDecorator.ValueConstraint containsConstraint(String containsSubstring)
public static ValueDecorator.ValueConstraint regexConstraint(String regex)
public Map attributeConditions(String value)
ValueMaker
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.
attributeConditions
in interface ValueMaker
value
- a non-null value
Attribute
keys, and string values.public String makeValue(ResultRow row)
ValueMaker
makeValue
in interface ValueMaker
row
- the database row
public void describeSelf(NodeSetFilter c)
describeSelf
in interface ValueMaker
public boolean matches(String value)
ValueMaker
matches
in interface ValueMaker
public Set projectionAttributes()
ValueMaker
projectionAttributes
in interface ValueMaker
public ValueMaker replaceColumns(ColumnRenamer renamer)
replaceColumns
in interface ValueMaker
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |