class MyPresentationPolicy {

  public boolean isSatisfiedBy(PresentationTokenDescription ptd, TokenManager tk, KeyManager km) {
    if (!ptd.getPolicyUID().equals(policy.getPolicyUID())) {
      logger.warning("Different policyUIDs.");
      return false;
    }
    if (!messageEquals(ptd.getMessage(), policy.getMessage())) {
      logger.warning("Messages don't match.");
      return false;
    }
    if (!pseudonymListEquals(ptd.getPseudonym(), policy.getPseudonym())) {
      logger.warning("Pseudonyms don't match");
      return false;
    }
    if (!credentialsEquals(ptd.getCredential(), policy.getCredential(), km)) {
      logger.warning("Credentials don't match");
      return false;
    }
    if (!predicatesEquals(ptd.getAttributePredicate(), policy.getAttributePredicate())) {
      logger.warning("Predicates don't match.");
      return false;
    }
    if (!verifierDrivenRevocationListEquals(ptd.getVerifierDrivenRevocation(),
        policy.getVerifierDrivenRevocation())) {
      logger.warning("Verifier Driven Revocation don't match");
      return false;
    }
    if(policy.isAllowSimpleProof() == false && ptd.isUsesSimpleProof()){
      logger.warning("Policy does not allow simple proofs.");
      return false;
    }
    if(ptd.isUsesSimpleProof() && ! checkIfSimpleProofAdmissible()) {
      logger.warning("Policy is too complex for simple proof flag.");
    }
    
    if (tk != null) {
      return checkEstablishedPseudonyms(ptd, tk);
    } else {
      return true;
    }
  }

  public  MyPresentationPolicy(PresentationPolicy policy);

}