+ seq.size());
}
Enumeration e = seq.getObjects();
DEREncodable o = (DEREncodable)e.nextElement();
if (o instanceof ASN1TaggedObject)
{
if (((ASN1TaggedObject)o).getTagNo() != 0)
{
throw new IllegalArgumentException("Bad tag number: "
+ ((ASN1TaggedObject)o).getTagNo());
}
namingAuthority = NamingAuthority.getInstance((ASN1TaggedObject)o, true);
o = (DEREncodable)e.nextElement();
}
professionItems = ASN1Sequence.getInstance(o);
if (e.hasMoreElements())
{
o = (DEREncodable)e.nextElement();
if (o instanceof ASN1Sequence)
{
professionOIDs = ASN1Sequence.getInstance(o);
}
else if (o instanceof DERPrintableString)
{
registrationNumber = DERPrintableString.getInstance(o).getString();
}
else if (o instanceof ASN1OctetString)
{
addProfessionInfo = ASN1OctetString.getInstance(o);
}
else
{
throw new IllegalArgumentException("Bad object encountered: "
+ o.getClass());
}
}
if (e.hasMoreElements())
{
o = (DEREncodable)e.nextElement();
if (o instanceof DERPrintableString)
{
registrationNumber = DERPrintableString.getInstance(o).getString();
}
else if (o instanceof DEROctetString)
{
addProfessionInfo = (DEROctetString)o;
}
else
{
throw new IllegalArgumentException("Bad object encountered: "
+ o.getClass());
}
}
if (e.hasMoreElements())
{
o = (DEREncodable)e.nextElement();
if (o instanceof DEROctetString)
{
addProfessionInfo = (DEROctetString)o;
}
else
{
throw new IllegalArgumentException("Bad object encountered: "
+ o.getClass());
}
}
}