package com.nailabs.abac.trust; import com.nailabs.abac.process.*; import edu.stanford.peer.rbtm.credential.*; import java.util.*; /** * An instance of this class repsent a trust target of the form:
*
<V: e <-- S >

* where V is on the negotiators; * e is a role expression called the target role; and * S is a role expression called the subject role. S is frequently the * opponent negotiator of V. */ public class TrustTarget extends Goal { /** The target expression of this trust target */ protected EntityExpression targetRole; /** Itemized default constructor */ public TrustTarget(Entity v, EntityExpression e, EntityExpression s) throws TrustTargetParsingException, CredentialParsingException { verifier = v; targetRole = e; subject = s; } /** Construct a new trust target from a string */ public TrustTarget(String s) throws TrustTargetParsingException, CredentialParsingException { StringTokenizer st = new StringTokenizer(s, ":\n"); buff.append("\t"); buff.append(getVerifier().toString()); buff.append("\n"); buff.append("\t"); buff.append(getTargetRole().toString()); buff.append("\n"); buff.append("\t"); buff.append(getSubject().toString()); buff.append("\n"); buff.append("\n"); return buff.toString(); */ return toString().replaceAll("<","<"); } }