|
|
This is the idl using which a query can be constructed. The query is used by various Data Manager components, essentially to specify the datasets of interest.
See Also
netsys.datacollection.baseframework.DCBFWQuerySet
The following are Attribute Type constants . The query will be performed against these attributes.
Usage
enum AttributeType
{
EndOfList,
CatalogTypeName,
StartTime,
EndTime,
MonthOfYear,
WeekOfYear,
WeekOfMonth,
DayOfYear,
DayOfMonth,
DayOfWeek,
HourOfDay,
MinuteOfHour,
CollectionStatus,
Id,
MediatorId,
NumEntries,
PrivateToBaseline,
SourceType,
NumConversations,
NumPackets,
NumBytes,
DeviceId,
NetworkName,
UserName,
ConjunctionOperator
};
Enumerators
EndOfList indicate end of the sequence
CataLogTypeName Catalog type
StartTime Collection start time
EndTime Collection end time
MonthOfYear particular month of the year. Valid values are 1 to 12.
WeekOfYear particular week of the year. Valid values are 1 to 52.
WeekOfMonth particular week of the month. Valid values are 1 to 6.
DayOfYear particular day of the year. Valid values are 1 to 366.
DayOfMonth particular day of the month. Valid values are 1 to 31.
DayOfWeek particular day of the week. Valid values are 1 to 7.
HourOfDay particular hour of the day. Valid values are 0 to 23.
MinuteOfHour particular minute of an hour. Valid values are 0 to 59.
CollectionStatus status of the data collection action.
Id unique id for the data set in the catalog.
MediatorId identify the specific mediator.
NumEntries identify the specific mediator.
PrivateToBaseline privateToBaseline flag of data catalog item
SourceType source type for the data set.
NumConversations # of entries in the data set
NumPackets # of packets in the data set
NumBytes # of bytes in the data set
DeviceId id of the device from which data is collected.
NetworkName name of the network to which the dataset is associated.
UserName name of the user.
ConjunctionOperator just a conjunction operator entry. To create a conjuction QueryPrimitive set the attrType to ConjunctionOperator and the operType to either of the two conjunction operator, AND or OR.
Various days of the week. Constant to be used while specifying the value for 'Day of Week' attribute.
Usage
enum Day
{
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
};
Enumerators
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Various months of the year. Constant to be used while specifying the value for 'Month' attribute.
Usage
enum Month
{
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
};
Enumerators
January
February
March
April
May
June
July
August
September
October
November
December
The operators supported by the query expression.
Usage
enum Operator
{
None,
And,
Or,
Eq,
Neq,
Leq,
Lt,
Geq,
Gt
};
Enumerators
None No operator specified. Just a place holder if we need it later.
And Logical AND operation. Used to form a conjunction.
Or Logical OR operation. Used to form a conjunction.
Eq Equals operator.
Neq Not equals operator.
Leq Less than or equal operator.
Lt Less than operator.
Geq Greater than or equal operator.
Gt Greater than operator.
Client needs to create a sequence of the QueryPrimitive structure that will be passed to the DataManager's query operation.
The sequence of QueryPrimitive structure should be in postfix notation. All IDL APIs accept a QueryPrimitive sequence. On the backend the sequence will be converted into a Stack before passing it on to the Collection repository.
Look at the createQueryStack method in QuerySetUtil.java. It is a convenient method that every manager can reuse to create a Stack from a QueryPrimitive sequence.
Another important point to note is to determine the # of elements in the sequence. If any QueryPrimitive attrType is set to EndOfList, following elements in the sequence are ignored. Otherwise the end of the sequence will mark the end of the query expression.
Usage
struct QueryPrimitive
{
AttributeType attrType
Operator operType
string value
};
A sequence of query primitive objects. Each query primitive object is potentially a simple expression. These expression are combined together by conjunction operators AND and OR.
Usage
typedef sequence<QueryPrimitive> QueryPrimitiveSeq
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Wed May 17 17:52:16 PDT 2000
Copyright 1989 - 2000©Cisco Systems Inc.