fi.hut.tcm.spki.impl
Class SpkiMakerVisitor

java.lang.Object
  |
  +--fi.hut.tcm.spki.impl.SpkiMakerVisitor

public class SpkiMakerVisitor
extends java.lang.Object
implements ComponentVisitor

SpkiMakerVisitor Traverses GenericFormat and creates a SPKI Canonical Format on the way.


Field Summary
private  CanonicalSpki spooky
           
private static long version
           
 
Constructor Summary
SpkiMakerVisitor()
           
 
Method Summary
 void at(java.lang.Object node)
           
 void att(ByteString node)
           
 void att(Cert node)
           
 void att(Comment node)
           
 void att(Deleg node)
           
 void att(GeneralOp node)
           
 void att(Gte node)
           
 void att(Hash node)
           
 void att(HashAlgName node)
           
 void att(HashOfKey node)
           
 void att(HashOp node)
           
 void att(HashValue node)
           
 void att(Issuer node)
           
 void att(Keyholder node)
           
 void att(KVal node)
           
 void att(LowLim node)
           
 void att(Lte node)
           
 void att(Name node)
           
 void att(NotAfter node)
           
 void att(NotBefore node)
           
 void att(ObjHash node)
           
 void att(OnlineTest node)
           
 void att(OnlineType node)
           
 void att(PubKey node)
           
 void att(PubSigAlgId node)
           
 void att(RangeOrdering node)
           
 void att(SecKey node)
           
 void att(SecSigAlgId node)
           
 void att(Sequence node)
           
 void att(SExpr node)
           
 void att(Sig node)
           
 void att(SigVal node)
           
 void att(SPart node)
           
 void att(Subject node)
           
 void att(Tag node)
           
 void att(TagExpr node)
           
 void att(TagPrefix node)
           
 void att(TagRange node)
           
 void att(TagSet node)
           
 void att(TagSimple node)
           
 void att(TagStar node)
           
 void att(TagString node)
           
 void att(ThresholdSubj node)
           
 void att(Time node)
           
 void att(UpLim node)
           
 void att(Uri node)
           
 void att(Valid node)
           
private  int doAllInOrder(Composite node, int min, int max)
          Goes through the children of the node and writes the result to CanonicalSpki.
 CanonicalSpki run(Component startAt)
          Does the job.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

version

private static final long version

spooky

private CanonicalSpki spooky
Constructor Detail

SpkiMakerVisitor

public SpkiMakerVisitor()
Method Detail

run

public CanonicalSpki run(Component startAt)
                  throws java.lang.IllegalArgumentException
Does the job. Even if CanonicalSpki is successfully returned, it does not mean that it is meaningful. The maker of GenericFormat is responsible for the semantic content.

att

public void att(Sequence node)
Specified by:
att in interface ComponentVisitor

att

public void att(SPart node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(Hash node)
Specified by:
att in interface ComponentVisitor

att

public void att(SExpr node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(HashAlgName node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(Issuer node)
Specified by:
att in interface ComponentVisitor

att

public void att(Subject node)
Specified by:
att in interface ComponentVisitor

att

public void att(GeneralOp node)
Specified by:
att in interface ComponentVisitor

att

public void att(HashOp node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(Name node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(Keyholder node)
Specified by:
att in interface ComponentVisitor

att

public void att(ThresholdSubj node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(SecKey node)
Specified by:
att in interface ComponentVisitor

att

public void att(PubKey node)
Specified by:
att in interface ComponentVisitor

att

public void att(PubSigAlgId node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(SecSigAlgId node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(OnlineTest node)
Specified by:
att in interface ComponentVisitor

att

public void att(ObjHash node)
Specified by:
att in interface ComponentVisitor

att

public void att(Tag node)
Specified by:
att in interface ComponentVisitor

att

public void att(Sig node)
Specified by:
att in interface ComponentVisitor

att

public void att(Cert node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(Valid node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(NotBefore node)
Specified by:
att in interface ComponentVisitor

att

public void att(NotAfter node)
Specified by:
att in interface ComponentVisitor

att

public void att(Deleg node)
Specified by:
att in interface ComponentVisitor

att

public void att(Comment node)
Specified by:
att in interface ComponentVisitor

att

public void att(KVal node)
Specified by:
att in interface ComponentVisitor

att

public void att(Uri node)
Specified by:
att in interface ComponentVisitor

att

public void att(OnlineType node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(HashValue node)
Specified by:
att in interface ComponentVisitor

att

public void att(Time node)
Specified by:
att in interface ComponentVisitor

att

public void att(HashOfKey node)
Specified by:
att in interface ComponentVisitor

att

public void att(SigVal node)
Specified by:
att in interface ComponentVisitor

att

public void att(ByteString node)
Specified by:
att in interface ComponentVisitor

att

public void att(Lte node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(Gte node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(RangeOrdering node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(TagStar node)
Specified by:
att in interface ComponentVisitor

att

public void att(UpLim node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(LowLim node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(TagRange node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(TagPrefix node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(TagSet node)
Specified by:
att in interface ComponentVisitor

att

public void att(TagString node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(TagSimple node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

att

public void att(TagExpr node)
         throws java.lang.IllegalArgumentException
Specified by:
att in interface ComponentVisitor

at

public void at(java.lang.Object node)

doAllInOrder

private int doAllInOrder(Composite node,
                         int min,
                         int max)
                  throws java.lang.IllegalArgumentException,
                         java.util.NoSuchElementException
Goes through the children of the node and writes the result to CanonicalSpki. Returns the number of children done. Throws IllegalArgumentException if the number of children was not in the range defined by min and max. If max is zero, there is no upper limit. Min and max belong to the successful values. Throws NoSuchElementException if class identifier string was not found in CanonicalSpki.associations.