Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## spki
Class Tuple

    java.lang.Object
      |
      +--spki.Tuple

Direct Known Subclasses:
  Capability5Tuple, Name4Tuple, Role5Tuple

public abstract class Tuple
extends Object

spki Tuple class.

Version:
  $Id: Tuple.java,v 1.15 2002/08/05 18:55:10 tep Exp $
Author:
  Tep Narula <tep@win.trlabs.ca>
See Also:
  `CertBody`

Field Summary
`private static String` | `__ME` This class's full name.
`private Issuer` | `issuer` The issuer field.
`private Subject` | `subject` The subject field.
`private Validity` | `validity` The validity field.

Constructor Summary
`protected` | `Tuple()` Don't use me.
`protected` | `Tuple(Issuer issuer, Subject subject, Validity validity)` Create a Tuple object from given fields.

Method Summary
`private static boolean` | `contains(Vector list, Principal element)` Check whether the given list already contains the given principal.
`static Empowerment` | `EIntersect(Empowerment e1, Empowerment e2)` An implementation of the EIntersect algorithm.
`static Empowerment` | `EUnion(Empowerment e1, Empowerment e2)` An implementation of the EUnion algorithm.
`Issuer` | `getIssuer()` Get the issuer field.
`Subject` | `getSubject()` Get the subject field.
`Validity` | `getValidity()` Get the validity field.
`private static Date` | `MAX(Date d1, Date d2)` Compare given dates and return the later one.
`private static Date` | `MIN(Date d1, Date d2)` compare given dates and return the earlier one.
`static Sexp` | `NUnion(Sexp nonce1, Sexp nonce2)` An implementation of the NUnion algorithm.
`private static void` | `rSubjObjsExpand(Vector out, Object[] in)` Recursively expand the given array of principals, which may contains n-level of sub-array(s), into a flat vector of principals.
`static Subject` | `SUnion(Subject s1, Subject s2)` An implementation of the SUnion algorithm.
`static Subject` | `tEliminate(Subject subj)` An implementation of the Threshold Elimination Rules.
`abstract String` | `toString()`
`static Validity` | `VIntersect(Validity v1, Validity v2)` An implementation of the VIntersect algorithm.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### __ME

    private static final String __ME

  This class's full name.

### issuer

    private Issuer issuer

  The issuer field.

### subject

    private Subject subject

  The subject field.

### validity

    private Validity validity

  The validity field.

Constructor Detail

### Tuple

    protected Tuple()

  Don't use me. To be called by each subclass' equivalent constructor.
  See Also:
    `Tuple(Issuer,Subject,Validity)`

### Tuple

    protected Tuple(Issuer issuer,
                    Subject subject,
                    Validity validity)
             throws SPKIException

  Create a Tuple object from given fields. To be called by each subclass' equivalent constructor.
  Parameters:
    `issuer` - The issuer field.
    `subjects` - The subject field.
    `validity` - The validity field.
  Throws:
    SPKIException - if something went wrong.

Method Detail

### toString

    public abstract String toString()

  Overrides:
    toString in class Object

### getIssuer

    public Issuer getIssuer()

  Get the issuer field.
  Returns:
    an Issuer object.

### getSubject

    public Subject getSubject()

  Get the subject field.
  Returns:
    a Subject object.

### getValidity

    public Validity getValidity()

  Get the validity field.
  Returns:
    a Validity object.

### VIntersect

    public static final Validity VIntersect(Validity v1,
                                            Validity v2)
                                     throws IntersectionException

  An implementation of the VIntersect algorithm.
  VIntersect(V1, V2) yields one of the followings:
  - (), i.e. always-valid, if V1 == V2 == (), or
  - V1, if V2 == (), or
  - V2, if V1 == (), or
  - Some V3 where:
    not-before3 = MAX(not-before1, not-before2),
    maybe-after3 = MIN(maybe-after1, maybe-after2),
    not-after3 = MIN(not-after1, not-after2), and
  - nonce3 = NUnion(nonce1, nonce2)
    provided:
  - not-before1 < maybe-after1 =< not-after1,
  - not-before2 < maybe-after2 =< not-after2, and
  - not-before3 < maybe-after3 =< not-after3
  - or fails otherwise.
  Parameters:
    `v1` - a Validity object to intersect, maybe `null`.
    `v2` - another Validity object to intersect, maybe `null`.
  Returns:
    the resulting Validity object.
  Throws:
    IntersectionException - if something goes wrong.

### NUnion

    public static Sexp NUnion(Sexp nonce1,
                              Sexp nonce2)
                       throws IntersectionException

  An implementation of the NUnion algorithm.
  NUnion(nonce1, nonce2) yields one of the followings:
  - nonce1, if only nonce1 is present, or
  - nonce2, if only nonce2 is present, or
  - {nonce1, nonce2}, if both nonce1 and nonce2 are present.
    TODO: deal with unequal nonces.

### EIntersect

    public static final Empowerment EIntersect(Empowerment e1,
                                               Empowerment e2)
                                        throws IntersectionException

  An implementation of the EIntersect algorithm.
  EIntersect(E1, E2) yields one of the followings:
  - E1, if E1 == (grant, transferable) and E2 == (transfer), or
  - (E1.type, E2.propagation), if E1 == (grant/delegate, delegateable) and E2 == (delegate, no-propagation/delegateable), or
  - Fails otherwise.
  Parameters:
    `e1` - a Empowerment object to intersect.
    `e2` - another Empowerment object to intersect.
  Returns:
    the resulting Empowerment object.
  Throws:
    IntersectionException - if something goes wrong.

### EUnion

    public static final Empowerment EUnion(Empowerment e1,
                                           Empowerment e2)
                                    throws IntersectionException

  An implementation of the EUnion algorithm.
  EUnion(E1, E2) yields one of the followings:
  - E1, if E2 == E1, or
  - (E1.type.no-propagation), if E2.type == E1.type and E2.propagation != E1.propagation, or
  - Fails otherwise.
  Parameters:
    `e1` - a Empowerment object to unionize.
    `e2` - another Empowerment object to unionize.
  Returns:
    the resulting Empowerment object.
  Throws:
    IntersectionException - if something goes wrong.

### SUnion

    public static final Subject SUnion(Subject s1,
                                       Subject s2)
                                throws IntersectionException

  An implementation of the SUnion algorithm.
  SUnion((k1 SID1) S1, (k2 SID2) S2) yields
  ((k1 SID1) {S1, S2}) provided:
  - k2 == k1, and
  - SID2 == SID1
  Parameters:
    `s1` - a Subject object to unionize.
    `s2` - another Subject object to unionize.
  Returns:
    the resulting Subject object.
  Throws:
    IntersectionException - if something goes wrong.

### tEliminate

    public static final Subject tEliminate(Subject subj)
                                    throws ReductionException

  An implementation of the Threshold Elimination Rules.
  tEliminate((k SID) {S1, ..., Sm}) yields
  ({S1, ..., Sn}), where:
  - n >= 1, and
  - any internal set, e.g. {S1, ...,{Sa, ..., Sx}, ..., Sm}, are expanded into the outermost set, e.g. {s1, ..., Sa, ..., Sx, ..., Sm}
    and provided:
  - k > 1, and
  - m >= k
  Parameters:
    `s1` - a Subject object to unionize.
    `s2` - another Subject object to unionize.
  Returns:
    the resulting Subject object.
  Throws:
    ReductionException - if something goes wrong.

### MIN

    private static Date MIN(Date d1,
                            Date d2)

  compare given dates and return the earlier one.
  Parameters:
    `d1` - a date object to compare, maybe `null`.
    `d2` - another date object to compare, maybe `null`.
  Returns:
    the earlier date object, or `null` if both given dates are `null`.

### MAX

    private static Date MAX(Date d1,
                            Date d2)

  Compare given dates and return the later one.
  Parameters:
    `d1` - a Date object to compare.
    `d2` - another Date object to compare.
  Returns:
    the later Date object, or `null` if both given dates are `null`.

### contains

    private static boolean contains(Vector list,
                                    Principal element)

  Check whether the given list already contains the given principal.
  See Also:
    `tEliminate(spki.Subject)`

### rSubjObjsExpand

    private static void rSubjObjsExpand(Vector out,
                                        Object[] in)
                                 throws SPKIException

  Recursively expand the given array of principals, which may contains n-level of sub-array(s), into a flat vector of principals.
  See Also:
    `tEliminate(Subject)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD