|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.nom.nomwrite.impl.NOMWriteAttribute
public class NOMWriteAttribute
A simple implementation of an attribute in a NOM corpus allowing for either numerical or string attributes and teh standard get and set methods.
Nested Class Summary | |
---|---|
class |
NOMWriteAttribute.SharedAttribute
This inner class provides a utility functions for shared NOM users |
Nested classes/interfaces inherited from interface net.sourceforge.nite.nom.nomwrite.NOMAttribute |
---|
NOMAttribute.SharedAtt |
Field Summary |
---|
Fields inherited from interface net.sourceforge.nite.nom.nomwrite.NOMAttribute |
---|
NOMATTR_NUMBER, NOMATTR_STRING |
Constructor Summary | |
---|---|
NOMWriteAttribute(int type,
java.lang.String name,
java.lang.String string_value,
java.lang.Double double_value)
generic constructor for creating attributes. |
|
NOMWriteAttribute(java.lang.String name,
java.lang.Double double_value)
create a numeric attribute |
|
NOMWriteAttribute(java.lang.String name,
java.lang.String string_value)
create a string attribute |
Method Summary | |
---|---|
java.lang.Comparable |
getComparableValue()
get the Comparable value of the attribute (for either String or Number type attributes) |
java.lang.Double |
getDoubleValue()
get the value of the attribute (for a 'number' type attribute only) |
NOMElement |
getElement()
get the Element to which this attribute belongs |
java.lang.String |
getName()
returns the (q)name of the attribute |
NOMAttribute.SharedAtt |
getShared()
return a shared view of this attribute which simply provides utility functions for editing the attribute without thinking about locking and unlocking the corpus. |
java.lang.String |
getStringValue()
get the value of the attribute (for a String type attribute only) |
int |
getType()
returns a pre-defined integer value: NOMATTR_STRING or NOMATTR_NUMBER. |
void |
setComparableValue(java.lang.Comparable value)
set the Comparable value of the attribute (for either String or Number type attributes) |
void |
setDoubleValue(java.lang.Double value)
set the value of the attribute (for a 'Number' type attribute only) |
void |
setElement(NOMElement element)
set the element to which this attribute belongs |
void |
setStringValue(java.lang.String value)
set the value of the attribute (for a String type attribute only) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NOMWriteAttribute(int type, java.lang.String name, java.lang.String string_value, java.lang.Double double_value)
public NOMWriteAttribute(java.lang.String name, java.lang.String string_value)
public NOMWriteAttribute(java.lang.String name, java.lang.Double double_value)
Method Detail |
---|
public void setStringValue(java.lang.String value) throws NOMException
setStringValue
in interface NOMAttribute
NOMException
public void setDoubleValue(java.lang.Double value) throws NOMException
setDoubleValue
in interface NOMAttribute
NOMException
public java.lang.String getStringValue()
getStringValue
in interface NOMAttribute
public java.lang.Double getDoubleValue()
getDoubleValue
in interface NOMAttribute
public java.lang.Comparable getComparableValue()
getComparableValue
in interface NOMAttribute
public void setComparableValue(java.lang.Comparable value) throws NOMException
setComparableValue
in interface NOMAttribute
NOMException
public java.lang.String getName()
getName
in interface NOMAttribute
public int getType()
getType
in interface NOMAttribute
public NOMElement getElement()
getElement
in interface NOMAttribute
public void setElement(NOMElement element)
setElement
in interface NOMAttribute
public NOMAttribute.SharedAtt getShared()
getShared
in interface NOMAttribute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |