|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A PhysicalDataRecord represents a
record as a set of name-value pairs and enables
singleton record scoring. Users can set specific
values for PhysicalAttribute
instances. It is a light-weight object that
performs no validation of inputs, e.g., attribute
name uniqueness or value type checking.
| Method Summary | |
int |
getAttributeCount()
Returns the number of attributes contained. |
java.util.Collection |
getAttributeNames()
Returns a collection of attribute names present in the physical record. |
java.lang.Object |
getValue(java.lang.String attributeName)
Returns the object value of the specified attribute. |
void |
removeAllAttributes()
Removes all attribute-value pairs currently associated with the PhysicalDataRecord instance. |
void |
removeAttribute(java.lang.String attributeName)
Removes the specified attribute from the physical record. |
void |
resetValues()
Resets all values associated with the attributes to null. |
void |
setValue(java.lang.String attributeName,
java.lang.Object value)
Sets the value of the named attribute with the specified object value. |
| Method Detail |
public int getAttributeCount()
public java.util.Collection getAttributeNames()
public java.lang.Object getValue(java.lang.String attributeName)
throws JDMException
The object will be of type Integer, String, Double, or null for missing value.
attributeName - The name of the physical attribute whose value in the record is to be returned.
JDMExceptionpublic void removeAllAttributes()
PhysicalDataRecord instance.
public void removeAttribute(java.lang.String attributeName)
throws JDMException
If name is not found, an exception is thrown.
attributeName - The name of the attribute to be removed.
JDMExceptionpublic void resetValues()
public void setValue(java.lang.String attributeName,
java.lang.Object value)
throws JDMException
If the specified attribute is not found in the list of attributes, it is added to the list.
Valid object types are Integer, String, Double, and null.
attributeName - The name of the attribute whose value is to be assigned.value - The value of the attribute.
JDMException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||