wt.csm.html.query
Class HTMLQueryUtilities
java.lang.Object
wt.csm.html.query.HTMLQueryUtilities
- public class HTMLQueryUtilities
- extends Object
Method Summary |
private static void |
checkIsClassificationStructure(AbstractNavStructView structure,
AbstractNodeDefaultView node,
AbstractQueryFormView queryForm)
|
static void |
displayHashtableQueryForm(Hashtable qf)
This method is only used for debug purpose |
static QueryResultsIBAHolder[] |
executeQuery(Hashtable queryForms,
int sortDirection,
String sortAttributeID,
int fetchStart,
int fetchCount,
String indirectResultTargetID)
Executes a csm query given a hashtable of query forms indexed by their targets,
sort information, fetch information, and any indirect target. |
private static AbstractQueryFormView |
getCorrectQueryForm(AbstractQueryTargetView target,
AbstractNodeDefaultView node)
|
private static String |
getDisplayUnits(UnitDefView definition,
String measurementSystem)
Return the display units for the specific definition in this measurementSystem |
private static QueryFormElementDefaultView |
getQFElement(Object obj)
|
static Hashtable |
getQueryForms(AbstractNavStructView struct,
AbstractNodeNodeView node,
Hashtable values,
String measurementSystem,
String rankingContext)
Constructs and initializes all query forms for the navigation structure and
node given using the values given within the values hashtable. |
static String |
getRankingContextAttribute(String rankableClassname)
|
static String |
getRankingValueAttribute(String rankableClassname)
|
private static AbstractQueryFormView |
initQueryForm(AbstractQueryFormView queryForm,
Hashtable hashValues,
String rankingContext,
String measurementSystem,
boolean isClassificationNode,
boolean directTarget)
|
private static void |
modifyValueObject(UnitValueDefaultView value,
String str,
String displayUnits)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONSTRAINT_MAPPER_RESOURCE
private static final String CONSTRAINT_MAPPER_RESOURCE
- See Also:
- Constant Field Values
QUERY_RESOURCE
private static final String QUERY_RESOURCE
- See Also:
- Constant Field Values
RANKING_VALUE_KEY_PATTERN
private static final String RANKING_VALUE_KEY_PATTERN
- See Also:
- Constant Field Values
RANKING_CONTEXT_KEY_PATTERN
private static final String RANKING_CONTEXT_KEY_PATTERN
- See Also:
- Constant Field Values
HTMLQueryUtilities
public HTMLQueryUtilities()
getQueryForms
public static Hashtable getQueryForms(AbstractNavStructView struct,
AbstractNodeNodeView node,
Hashtable values,
String measurementSystem,
String rankingContext)
throws CSMQueryException
- Constructs and initializes all query forms for the navigation structure and
node given using the values given within the values hashtable. Returns a
hashtable of those query forms indexed by the query target. Default values
will only be used for elements which have isVisible() return false. If the
hashtable is null, all values will be uninitialized.
Values hashtable format:
index = [|]
value =
- Parameters:
struct
- node
- values
- measurementSystem
-
- Returns:
- Hashtable
- Throws:
CSMQueryException
executeQuery
public static QueryResultsIBAHolder[] executeQuery(Hashtable queryForms,
int sortDirection,
String sortAttributeID,
int fetchStart,
int fetchCount,
String indirectResultTargetID)
throws CSMQueryException
- Executes a csm query given a hashtable of query forms indexed by their targets,
sort information, fetch information, and any indirect target. The array of
QueryResultsIBAHolders which are the result of the query is returned. If the
sortAttr is null, the default sort attribute will be used. If indirectTarget is
used, the results will be upon the direct target.
Values hashtable format:
index =
value =
- Parameters:
queryForms
- sortDirection
- sortAttributeID
- fetchStart
- fetchCount
- indirectResultTargetID
-
- Returns:
- QueryResultsIBAHolder[]
- Throws:
CSMQueryException
initQueryForm
private static AbstractQueryFormView initQueryForm(AbstractQueryFormView queryForm,
Hashtable hashValues,
String rankingContext,
String measurementSystem,
boolean isClassificationNode,
boolean directTarget)
throws CSMQueryException
- Throws:
CSMQueryException
checkIsClassificationStructure
private static void checkIsClassificationStructure(AbstractNavStructView structure,
AbstractNodeDefaultView node,
AbstractQueryFormView queryForm)
throws CSMQueryException
- Throws:
CSMQueryException
modifyValueObject
private static void modifyValueObject(UnitValueDefaultView value,
String str,
String displayUnits)
throws CSMQueryException
- Throws:
CSMQueryException
getDisplayUnits
private static String getDisplayUnits(UnitDefView definition,
String measurementSystem)
- Return the display units for the specific definition in this measurementSystem
displayHashtableQueryForm
public static void displayHashtableQueryForm(Hashtable qf)
- This method is only used for debug purpose
getRankingValueAttribute
public static String getRankingValueAttribute(String rankableClassname)
throws WTException
- Throws:
WTException
getRankingContextAttribute
public static String getRankingContextAttribute(String rankableClassname)
throws WTException
- Throws:
WTException
getCorrectQueryForm
private static AbstractQueryFormView getCorrectQueryForm(AbstractQueryTargetView target,
AbstractNodeDefaultView node)
throws CSMQueryException
- Throws:
CSMQueryException
getQFElement
private static QueryFormElementDefaultView getQFElement(Object obj)
throws CSMClassificationNavigationException
- Throws:
CSMClassificationNavigationException