|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.grid.io.MetaDataCondition
public final class MetaDataCondition
A "meta data condition" describes a conditional expression to be used to guide a metadata query. That expression contains three components:
Legal field names depend upon the meta data group and the file server being talked to.
Operators are in the set:
Each operator is designated by an "operator code", which is a static final integer defined in this class.
A value has a "style" in the set:
| Field Summary | |
|---|---|
static int |
BETWEEN
"between" where the metadata value is between the two conditional values, lexicographical compare for strings. |
static int |
ENUM
The value style for the field. Styles include: SCALAR, RANGEPAIR, ENUM, TABLE. |
static int |
EQUAL
"=" where the metadata value exactly equals the conditional value. |
static int |
GREATER_OR_EQUAL
">=" where the metadata value is greater than or equal to the conditional value, lexicographical compare for strings. |
static int |
GREATER_THAN
">" where the metadata value is greater than the conditional value, lexicographical compare for strings. |
static int |
IN
"in" where the metadata value exactly equals one of the conditional values in the value list. |
static int |
LESS_OR_EQUAL
"<=" where the metadata value is less than or equal to the conditional value, lexicographical compare for strings. |
static int |
LESS_THAN
"<" where the metadata value is less than the conditional value, lexicographical compare for strings. |
static int |
LIKE
"like" where the metadata value contains the conditional value. |
static int |
NOT_BETWEEN
"not between" where the metadata value is not between the two conditional values, lexicographical compare for strings. |
static int |
NOT_EQUAL
"!=" where the metadata value is not exactly equal to the conditional value. |
static int |
NOT_IN
"not in" where the metadata value does not exactly equals one of the conditional values in the value list. |
static int |
NOT_LIKE
"not like" where the metadata value does not contains the conditional value. |
static int |
RANGEPAIR
The value style for the field. Styles include: SCALAR, RANGEPAIR, ENUM, TABLE. |
static int |
SCALAR
The value style for the field. Styles include: SCALAR, RANGEPAIR, ENUM, TABLE. |
static int |
SOUNDS_LIKE
"sounds like", Implement phonetic name searches |
static int |
SOUNDS_NOT_LIKE
"not sounds like", Implement phonetic name searches |
static int |
TABLE
Table represents both a style and type. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this MetaDataCondition object for equality with the given object. |
protected void |
finalize()
Finalizes the object by explicitly letting go of each of its internally held values. |
int |
getCount()
Returns the length of the value list, if the style is an enum. |
MetaDataField |
getField()
Returns the MetaDataGroup's field object describing the field in the condition. |
java.lang.String |
getFieldName()
Returns the field name in the condition. |
int |
getFieldType()
Returns the MetaDataGroup's field data type. |
float |
getFloatValue()
These methods are the same as calling the above list methods, but with an index of 0. |
float |
getFloatValue(int index)
For a 'rangepair' style conditional, there are two values at indexes 0,0 and 0,1. |
int |
getIntValue()
These methods are the same as calling the above list methods, but with an index of 0. |
int |
getIntValue(int index)
For a 'rangepair' style conditional, there are two values at indexes 0,0 and 0,1. |
int |
getOperator()
Returns the operator code for the 'rangepair', 'list' and 'scalar' style conditionals. |
java.lang.String |
getOperatorString()
|
static java.lang.String |
getOperatorString(int operator)
|
static java.lang.String[] |
getOperatorStrings()
|
java.lang.String |
getStringValue()
These methods are the same as calling the above list methods, but with an index of 0. |
java.lang.String |
getStringValue(int index)
For a 'rangepair' style conditional, there are two values at indexes 0 and 1. |
int |
getStyle()
Returns the value style for the conditional. |
MetaDataTable |
getTableValue()
Returns the table stored in this conditional. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EQUAL
public static final int NOT_EQUAL
public static final int LESS_THAN
public static final int GREATER_THAN
public static final int LESS_OR_EQUAL
public static final int GREATER_OR_EQUAL
public static final int IN
public static final int NOT_IN
public static final int BETWEEN
public static final int NOT_BETWEEN
public static final int LIKE
* is the same as %, and ? equals _
note: The characters *,?,%,_ are reserved and may not be used in
the conditional value with the LIKE operator.
public static final int NOT_LIKE
* is the same as %, and ? equals _
note: The characters *,?,%,_ are reserved and may not be used in
the conditional value with the LIKE operator.
public static final int SOUNDS_LIKE
public static final int SOUNDS_NOT_LIKE
public static final int SCALAR
public static final int RANGEPAIR
public static final int ENUM
public static final int TABLE
| Method Detail |
|---|
protected void finalize()
finalize in class java.lang.Objectpublic MetaDataField getField()
public java.lang.String getFieldName()
public int getFieldType()
public int getOperator()
public int getStyle()
public int getCount()
public int getIntValue(int index)
For a 'list' style conditional, there is a list of values at indexes 0,0 to 0,n-1, where n is returned by getCount(). These methods return those values, or throw an IllegalArgumentException when the index is out of range.
For a 'scalar' style conditional, there is only one value at index 0,0. These methods return this value, or throw an IllegalArgumentException if the index is not 0,0.
public float getFloatValue(int index)
For a 'list' style conditional, there is a list of values at indexes 0,0 to 0,n-1, where n is returned by getCount(). These methods return those values, or throw an exception when the index is out of range.
For a 'scalar' style conditional, there is only one value at index 0,0. These methods return this value, or throw an exception if the index is not 0,0.
public java.lang.String getStringValue(int index)
For a 'list' style conditional, there is a list of values at indexes 0 to n-1, where n is returned by getCount(). These methods return those values, or throw an exception when the index is out of range.
For a 'scalar' style conditional, there is only one value at index 0. These methods return this value, or throw an exception if the index is not 0.
public int getIntValue()
public float getFloatValue()
public java.lang.String getStringValue()
public MetaDataTable getTableValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
true if and only if the argument is not
null and both are MetaDataCondition objects with equal
field, operators and values.
equals in class java.lang.Objectobj - The object to be compared with this abstract pathname
true if and only if the objects are the same;
false otherwisepublic static java.lang.String getOperatorString(int operator)
public static java.lang.String[] getOperatorStrings()
public java.lang.String getOperatorString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||