net.sourceforge.nite.nom.nomread.impl
Class NOMReadAttribute

java.lang.Object
  extended by net.sourceforge.nite.nom.nomwrite.impl.NOMWriteAttribute
      extended by net.sourceforge.nite.nom.nomread.impl.NOMReadAttribute
All Implemented Interfaces:
NOMAttribute

public class NOMReadAttribute
extends NOMWriteAttribute

Extends the nomread version with methods for editing attributes

Author:
jonathan

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.nite.nom.nomwrite.impl.NOMWriteAttribute
NOMWriteAttribute.SharedAttribute
 
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
NOMReadAttribute(int type, java.lang.String name, java.lang.String string_value, java.lang.Double double_value)
          generic constructor for creating attributes.
NOMReadAttribute(java.lang.String name, java.lang.Double double_value)
          create a numeric attribute
NOMReadAttribute(java.lang.String name, java.lang.String string_value)
          create a string attribute
 
Method Summary
 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.
 void setComparableValue(java.lang.Comparable value)
          set the Comparable value of the attribute - for the nomread implementation throw an exception!
 void setDoubleValue(java.lang.Double value)
          set the value of the attribute - for the nomread implementation throw an exception!
 void setStringValue(java.lang.String value)
          set the value of the attribute - for the nomread implementation throw an exception!
 
Methods inherited from class net.sourceforge.nite.nom.nomwrite.impl.NOMWriteAttribute
getComparableValue, getDoubleValue, getElement, getName, getStringValue, getType, setElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NOMReadAttribute

public NOMReadAttribute(int type,
                        java.lang.String name,
                        java.lang.String string_value,
                        java.lang.Double double_value)
generic constructor for creating attributes. The first argument is the type of the attribute (NOMATTR_STRING or NOMATTR_NUMBER), the second is the name of the attribute, the third is the string value (or null) and the fourth is the Double value (or null).


NOMReadAttribute

public NOMReadAttribute(java.lang.String name,
                        java.lang.String string_value)
create a string attribute


NOMReadAttribute

public NOMReadAttribute(java.lang.String name,
                        java.lang.Double double_value)
create a numeric attribute

Method Detail

setStringValue

public void setStringValue(java.lang.String value)
                    throws NOMException
set the value of the attribute - for the nomread implementation throw an exception!

Specified by:
setStringValue in interface NOMAttribute
Overrides:
setStringValue in class NOMWriteAttribute
Throws:
NOMException

setDoubleValue

public void setDoubleValue(java.lang.Double value)
                    throws NOMException
set the value of the attribute - for the nomread implementation throw an exception!

Specified by:
setDoubleValue in interface NOMAttribute
Overrides:
setDoubleValue in class NOMWriteAttribute
Throws:
NOMException

setComparableValue

public void setComparableValue(java.lang.Comparable value)
                        throws NOMException
set the Comparable value of the attribute - for the nomread implementation throw an exception!

Specified by:
setComparableValue in interface NOMAttribute
Overrides:
setComparableValue in class NOMWriteAttribute
Throws:
NOMException

getShared

public 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.

Specified by:
getShared in interface NOMAttribute
Overrides:
getShared in class NOMWriteAttribute