|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iphrase.onestep.beans.ValueHandler
The ValueHandler
is a helper bean used to make it easier for JSP programmers
to access various properties of OneStep data types. It supports all data types
(both summarized and non-summarized values). The support for all data types
is achieved through the use of multiple sub-classes (one for each data type).
For each of these sub-classes, ValueHandler
has only one member variable with
a non-null value. For example, the boolValue
member variable (the instance of
the ValueHandler.BooleanValue
sub-class) is the only non-null member variable of the
ValueHandler
that contains the FeatureMetaData.BaseTypes.BOOL
data type.
Inner Class Summary | |
class |
ValueHandler.BaseValue
A super class for all xxxValue sub-classes. |
class |
ValueHandler.BooleanValue
A container for the FeatureMetaData.BaseTypes.BOOL OneStep value. |
class |
ValueHandler.CustomValue
A container for the FeatureMetaData.BaseTypes.CUSTOM OneStep value. |
class |
ValueHandler.DateTimeValue
A container for the FeatureMetaData.BaseTypes.DATE_TIME OneStep value. |
class |
ValueHandler.FloatValue
A container for the FeatureMetaData.BaseTypes.FLOAT OneStep value. |
class |
ValueHandler.ImageUrlValue
A container for the FeatureMetaData.BaseTypes.IMAGE_URL OneStep value. |
class |
ValueHandler.IntValue
A container for the FeatureMetaData.BaseTypes.INT OneStep value. |
class |
ValueHandler.LinkValue
A container for the FeatureMetaData.BaseTypes.LINK OneStep value. |
class |
ValueHandler.TaxonomyValue
A container for the FeatureMetaData.BaseTypes.TAXONOMY OneStep value. |
class |
ValueHandler.TextExtractValue
A container for the FeatureMetaData.BaseTypes.TEXT_EXTRACT OneStep value. |
class |
ValueHandler.TextValue
A container for the FeatureMetaData.BaseTypes.TEXT OneStep value. |
Constructor Summary | |
ValueHandler(java.lang.Object value)
Constructs an instance of the ValueHandler class
when its type is not available. |
|
ValueHandler(java.lang.Object obj,
int type,
boolean summarized,
java.lang.String featureId,
boolean logClickThrough)
Constructs an instance of the ValueHandler class. |
Method Summary | |
static ValueHandler |
CreateInstance(com.iphrase.runtime.query.result.FeatureMetaData feature,
java.lang.Object obj)
Creates an instance of the ValueHandler for the specified
FeatureMetaData and OneStep Runtime API object |
static java.lang.String |
escapeHTML(java.lang.String s)
|
ValueHandler.BooleanValue |
getBool()
Gets the ValueHandler.BooleanValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.BOOL type. |
com.iphrase.runtime.query.constraint.Constraint |
getConstraint()
Gets the value's Constraint . |
java.lang.String |
getConstraintLabel()
Gets the (optional) constraint label. |
ValueHandler.CustomValue |
getCustom()
Gets the ValueHandler.CustomValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.CUSTOM type. |
ValueHandler.DateTimeValue |
getDateTime()
Gets the ValueHandler.DateTimeValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.DATE_TIME type. |
java.lang.String |
getFeatureId()
Gets the feature ID for the particular value, or an empty string if it's not available. |
java.lang.Object |
getFeatureValue()
Gets the actual OneStep value |
ValueHandler.FloatValue |
getFloat()
Gets the ValueHandler.FloatValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.FLOAT type. |
ValueHandler.ImageUrlValue |
getImageUrl()
Gets the ValueHandler.ImageUrlValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.IMAGE_URL type. |
ValueHandler.IntValue |
getInt()
Gets the ValueHandler.IntValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.INT type. |
boolean |
getIsNull()
Checks if the object contains a valid value |
boolean |
getIsSummarized()
Checks if the object contains a summarized value |
boolean |
getIsTallied()
Checks if the object is a tallied value. |
ValueHandler.LinkValue |
getLink()
Gets the ValueHandler.LinkValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.LINK type. |
boolean |
getMatchesConstraint()
Returns true if the value's constraint is a one of constraints
used to get the current query results. |
boolean |
getShouldEscape()
Returns true if the attribute 'mimetype' in FeatureMetaData
is not text/html. |
int |
getTallyCount()
Gets the value's tally count. |
ValueHandler.TaxonomyValue |
getTaxonomy()
Gets the ValueHandler.TaxonomyValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.TAXONOMY type. |
ValueHandler.TextValue |
getText()
Gets the ValueHandler.TextValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.TEXT type. |
ValueHandler.TextExtractValue |
getTextExtract()
Gets the ValueHandler.TextExtractValue object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.TEXT_EXTRACT type. |
ValueHandler.BaseValue |
getValue()
Gets the value's ValueHandler.BaseValue member |
void |
InitConstraint(com.iphrase.runtime.query.constraint.Constraint constraint,
boolean matchesConstraint)
Sets the constraint property. |
boolean |
isNull()
Returns true if the OneStep value object is null
Overrides ValueHandler.BaseValue.isNull() . |
void |
setTallyCount(int tallyCount)
Sets the value's tally count. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ValueHandler(java.lang.Object obj, int type, boolean summarized, java.lang.String featureId, boolean logClickThrough)
ValueHandler
class.obj
- OneStep Runtime API objecttype
- one of FeatureMetaData.BaseTypes
summarized
- true
if the value represents a summarized valuefeatureId
- feature IDlogClickThrough
- true
if the clicks-through should be loggedpublic ValueHandler(java.lang.Object value)
ValueHandler
class
when its type is not available. The type of the object is identified using the
Java language's instanceof
operator.value
- OneStep Runtime API objectMethod Detail |
public static ValueHandler CreateInstance(com.iphrase.runtime.query.result.FeatureMetaData feature, java.lang.Object obj)
ValueHandler
for the specified
FeatureMetaData
and OneStep Runtime API objectfeature
- FeatureMetaData
obj
- OneStep Runtime API objectValueHandler
objectpublic int getTallyCount()
tallyCount
propertypublic java.lang.String getFeatureId()
featureId
propertypublic void setTallyCount(int tallyCount)
tallyCount
- value's tally count.public ValueHandler.BaseValue getValue()
ValueHandler.BaseValue
membervalue
propertypublic java.lang.Object getFeatureValue()
featureValue
propertypublic boolean getIsNull()
isNull
propertypublic boolean getIsTallied()
false
public boolean getIsSummarized()
isSummarized
propertypublic ValueHandler.BooleanValue getBool()
ValueHandler.BooleanValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.BOOL
type.bool
propertypublic ValueHandler.DateTimeValue getDateTime()
ValueHandler.DateTimeValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.DATE_TIME
type.dateTime
propertypublic ValueHandler.FloatValue getFloat()
ValueHandler.FloatValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.FLOAT
type.float
propertypublic ValueHandler.IntValue getInt()
ValueHandler.IntValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.INT
type.int
propertypublic ValueHandler.TaxonomyValue getTaxonomy()
ValueHandler.TaxonomyValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.TAXONOMY
type.taxonomy
propertypublic ValueHandler.TextExtractValue getTextExtract()
ValueHandler.TextExtractValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.TEXT_EXTRACT
type.textExtract
propertypublic ValueHandler.TextValue getText()
ValueHandler.TextValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.TEXT
type.text
propertypublic ValueHandler.LinkValue getLink()
ValueHandler.LinkValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.LINK
type.link
propertypublic ValueHandler.ImageUrlValue getImageUrl()
ValueHandler.ImageUrlValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.IMAGE_URL
type.imageUrl
propertypublic ValueHandler.CustomValue getCustom()
ValueHandler.CustomValue
object or returns null if the contained object is not
of the FeatureMetaData.BaseTypes.CUSTOM
type.custom
propertypublic static java.lang.String escapeHTML(java.lang.String s)
public com.iphrase.runtime.query.constraint.Constraint getConstraint()
Constraint
.constraint
propertypublic boolean getMatchesConstraint()
true
if the value's constraint is a one of constraints
used to get the current query results.constraint
propertypublic void InitConstraint(com.iphrase.runtime.query.constraint.Constraint constraint, boolean matchesConstraint)
constraint
- value's Constraint
matchesConstraint
- true
if value has a matching constraintpublic boolean getShouldEscape()
true
if the attribute 'mimetype' in FeatureMetaData
is not text/html.shouldEscape
propertypublic java.lang.String getConstraintLabel()
constraintLabel
propertypublic boolean isNull()
true
if the OneStep value object is null
Overrides ValueHandler.BaseValue.isNull()
.
|
© Copyright 2005, 2006. IBM Corporation. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |