edu.nyu.cs.pdsg.drbac
Class Attribute

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.Attribute
All Implemented Interfaces:
java.io.Serializable

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

Each delegation contains several valued attributes. Each such attribute modifies the delegation by accumulating a value as the chain is traversed. The proofs returned by Wallet can be restricted to those which have certain minimal attribute values. Each attribute in a delegation can only make the value worse, not better.

Each attribute is associated with a role, the last character of which must be one of the following

+
Default value = 0; Possible modifiers: x > 0; Final value: sum of all modifiers
*
Default value = 1; Possible modifiers: 0 < x < 1; Final value: product of all modifiers
>
Default value = -inf; Possible modifiers: x > 0; Final value: greatest modifier present
<
Default value = +inf; Possible modifiers: x > 0; Final value: lowest modifier present
! (Constraint on attribute)
Default value = unconstrained; Possible modifiers: none; Final value: presence of constraint in delegation path denies appropriate permission

See Also:
Serialized Form

Field Summary
 char op
           
 Role role
           
private  java.lang.Object value
           
 
Constructor Summary
Attribute(Role _role, java.lang.Object _value)
           
Attribute(Role _role, java.lang.String _value)
          Create an attribute
 
Method Summary
 java.lang.Object apply(Attribute other)
          Modify this attribute by another attribute.
static java.lang.Object defaultValue(char _op)
          Defaults for the various attribute types
static java.lang.Object defaultValue(Role _role)
          Defaults for the various attribute types
private  java.util.ArrayList getRangeIntersection(java.util.ArrayList range1, java.util.ArrayList range2)
           
 Role getRole()
           
 java.lang.Object getValue()
           
private  boolean isSubset(java.util.ArrayList range1, java.util.ArrayList range2)
          Returns true if range2 is a subset of range1
private  void parseRangeString(java.lang.String _value)
           
private  void parseValueString(java.lang.String _value)
           
 boolean satisfies(Attribute constraint)
          Check whether this attreibute satisfies a given constraint
 boolean satisfies(java.lang.Object constraint)
          Check whether this attribute satisfies a given constraint
 DiscoveryTag searchTag()
           
 java.lang.String toString()
           
 java.lang.Object value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

role

public final Role role

value

private java.lang.Object value

op

public char op
Constructor Detail

Attribute

public Attribute(Role _role,
                 java.lang.String _value)
Create an attribute

Parameters:
_role - The role describing the Attribute
_value - The initial value of the Attribute

Attribute

public Attribute(Role _role,
                 java.lang.Object _value)
Method Detail

defaultValue

public static java.lang.Object defaultValue(Role _role)
Defaults for the various attribute types

Parameters:
_role - The role
Returns:
The default value for that operator

defaultValue

public static java.lang.Object defaultValue(char _op)
Defaults for the various attribute types

Parameters:
_op - The operator
Returns:
The default value for that operator

parseRangeString

private void parseRangeString(java.lang.String _value)

parseValueString

private void parseValueString(java.lang.String _value)

value

public java.lang.Object value()
Returns:
the value of this attribute

apply

public java.lang.Object apply(Attribute other)
Modify this attribute by another attribute. Combine the value of this attribute with the value of another, and store the result.

Returns:
the modified value

satisfies

public boolean satisfies(java.lang.Object constraint)
Check whether this attribute satisfies a given constraint

Returns:
true if the attribute satisfies the constraint

getRangeIntersection

private java.util.ArrayList getRangeIntersection(java.util.ArrayList range1,
                                                 java.util.ArrayList range2)

isSubset

private boolean isSubset(java.util.ArrayList range1,
                         java.util.ArrayList range2)
Returns true if range2 is a subset of range1


satisfies

public boolean satisfies(Attribute constraint)
Check whether this attreibute satisfies a given constraint

Returns:
true if the attribute satisfies the constraint

toString

public java.lang.String toString()
Returns:
a human readable representation of this attribute

searchTag

public DiscoveryTag searchTag()
Returns:
the searchTag of the role this attribute is based on

getRole

public Role getRole()

getValue

public java.lang.Object getValue()


Copyright (c) 2002-2003 New York University RLAB