org.hops.dm.tad
Class attrval

java.lang.Object
  extended by org.hops.dm.tad.attrval
All Implemented Interfaces:
java.io.Serializable

public class attrval
extends java.lang.Object
implements java.io.Serializable

A propostion containing an attribute name, and values Could have extension for denying the values, or afirming it. Has an array of objects for storing complex resuls. Stores pagination information when used.

Version:
3.0
Author:
Meritxell Gonzalez
See Also:
Serialized Form

Field Summary
 attrval_ary ary
          aryti
 java.lang.String attr
          attribute name
 java.lang.String def_val
          default value
 attrval_ext ext
          extension
 pagInfo paginfo
          pagionation information
 java.util.ArrayList results
          complex results
protected  java.util.ArrayList val
          list of values
 
Constructor Summary
attrval()
          Creates a new instance of attribute_value
attrval(attrval _a)
          Creates a new instance of attrval and copy the attrval input values
attrval(java.lang.String _name)
          Creates a new instance of attribute_value with the given name
attrval(java.lang.String _name, java.util.ArrayList _values)
          Creates a new instance of attribute_value with the given name and values
 
Method Summary
 void add(java.util.ArrayList values)
           
 void add(java.lang.String value)
          if it is uniary/boolary replace the value in the list by the new value if it multiary adds the value at the end of the list of values
 void clear()
          Remove the values content
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean emptyValues()
          tests if there are no values
 boolean eqname(attrval _w)
          tests if the attribute _w has thesame name as this one
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 boolean equalsTo(attrval _o)
          Indicates whether a attrval is "equal to" this one.
 boolean eqvalues(attrval _w)
          Tests if the attribute _w contains at least the same values than this
 java.lang.String get(int i)
          return the i-st value or empty String if there are not at least i values
 int GetNumOfResults()
          return the number of results
 attrval getresult(java.lang.String name)
          Return the result in the complex array that is named "name"
 java.util.ArrayList getValues()
          Return all the values
 java.util.ArrayList getValues(java.lang.String mark_before, java.lang.String mark_after)
          Return all the values with the marks
 int hashCode()
           
 boolean in(java.lang.String val_in)
          Tests if the the values contains val_in
 boolean is_empty()
          Tests if this object has no values
 boolean noprop()
          Tests if it is a no extension attribute.
 boolean pagprop()
          Tests if it is a pagination extension attribute.
 void remove(java.util.ArrayList arr)
          Remove the value in the list
 void remove(int i)
          Remove the i-st value
 void set(int i, java.lang.String value)
          sets th i-st value if there are at least i values
 void setValues(java.util.ArrayList values)
          set a copy of the values, and remove the old ones.
 int size()
          number of values
 java.lang.String toFriendString()
          Returns a string representation of the object.
 java.lang.String toString()
          Returns a string representation of the object.
 boolean yesnoprop()
          Tests if it is a yes or not extension attribute.
 boolean yesprop()
          Tests if it is a yes extension attribute.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

attr

public java.lang.String attr
attribute name


val

protected java.util.ArrayList val
list of values


ext

public attrval_ext ext
extension


ary

public attrval_ary ary
aryti


results

public java.util.ArrayList results
complex results


def_val

public java.lang.String def_val
default value


paginfo

public pagInfo paginfo
pagionation information

Constructor Detail

attrval

public attrval()
Creates a new instance of attribute_value


attrval

public attrval(java.lang.String _name)
Creates a new instance of attribute_value with the given name


attrval

public attrval(java.lang.String _name,
               java.util.ArrayList _values)
Creates a new instance of attribute_value with the given name and values


attrval

public attrval(attrval _a)
Creates a new instance of attrval and copy the attrval input values

Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object

equalsTo

public boolean equalsTo(attrval _o)
Indicates whether a attrval is "equal to" this one.


is_empty

public boolean is_empty()
Tests if this object has no values


clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

toFriendString

public java.lang.String toFriendString()
Returns a string representation of the object.


size

public int size()
number of values


clear

public void clear()
Remove the values content


remove

public void remove(int i)
Remove the i-st value


remove

public void remove(java.util.ArrayList arr)
Remove the value in the list


add

public void add(java.lang.String value)
if it is uniary/boolary replace the value in the list by the new value if it multiary adds the value at the end of the list of values


add

public void add(java.util.ArrayList values)

set

public void set(int i,
                java.lang.String value)
sets th i-st value if there are at least i values


get

public java.lang.String get(int i)
return the i-st value or empty String if there are not at least i values


emptyValues

public boolean emptyValues()
tests if there are no values


eqname

public boolean eqname(attrval _w)
tests if the attribute _w has thesame name as this one


eqvalues

public boolean eqvalues(attrval _w)
Tests if the attribute _w contains at least the same values than this


in

public boolean in(java.lang.String val_in)
Tests if the the values contains val_in


yesnoprop

public boolean yesnoprop()
Tests if it is a yes or not extension attribute.


yesprop

public boolean yesprop()
Tests if it is a yes extension attribute.


noprop

public boolean noprop()
Tests if it is a no extension attribute.


pagprop

public boolean pagprop()
Tests if it is a pagination extension attribute.


getValues

public java.util.ArrayList getValues()
Return all the values


getValues

public java.util.ArrayList getValues(java.lang.String mark_before,
                                     java.lang.String mark_after)
Return all the values with the marks


setValues

public void setValues(java.util.ArrayList values)
set a copy of the values, and remove the old ones.


getresult

public attrval getresult(java.lang.String name)
Return the result in the complex array that is named "name"


GetNumOfResults

public int GetNumOfResults()
return the number of results