Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.isismtt.x509;
  
  
Professions, specializations, disciplines, fields of activity, etc.
               ProfessionInfo ::= SEQUENCE 
               {
                 namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
                 professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
                 professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
                 registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
                 addProfessionInfo OCTET STRING OPTIONAL 
               }
 

See also:
AdmissionSyntax
 
 public class ProfessionInfo 
     extends ASN1Object
 {

    
Rechtsanw�ltin
 
     public static final ASN1ObjectIdentifier Rechtsanwltin = new ASN1ObjectIdentifier(
Rechtsanwalt
 
     public static final ASN1ObjectIdentifier Rechtsanwalt = new ASN1ObjectIdentifier(
Rechtsbeistand
 
     public static final ASN1ObjectIdentifier Rechtsbeistand = new ASN1ObjectIdentifier(
Steuerberaterin
 
     public static final ASN1ObjectIdentifier Steuerberaterin = new ASN1ObjectIdentifier(
Steuerberater
 
     public static final ASN1ObjectIdentifier Steuerberater = new ASN1ObjectIdentifier(
Steuerbevollm�chtigte
 
     public static final ASN1ObjectIdentifier Steuerbevollmchtigte = new ASN1ObjectIdentifier(
Steuerbevollm�chtigter
 
     public static final ASN1ObjectIdentifier Steuerbevollmchtigter = new ASN1ObjectIdentifier(
Notarin
 
     public static final ASN1ObjectIdentifier Notarin = new ASN1ObjectIdentifier(
Notar
 
     public static final ASN1ObjectIdentifier Notar = new ASN1ObjectIdentifier(
Notarvertreterin
 
     public static final ASN1ObjectIdentifier Notarvertreterin = new ASN1ObjectIdentifier(
Notarvertreter
    public static final ASN1ObjectIdentifier Notarvertreter = new ASN1ObjectIdentifier(
Notariatsverwalterin
    public static final ASN1ObjectIdentifier Notariatsverwalterin = new ASN1ObjectIdentifier(
Notariatsverwalter
    public static final ASN1ObjectIdentifier Notariatsverwalter = new ASN1ObjectIdentifier(
Wirtschaftspr�ferin
    public static final ASN1ObjectIdentifier Wirtschaftsprferin = new ASN1ObjectIdentifier(
Wirtschaftspr�fer
    public static final ASN1ObjectIdentifier Wirtschaftsprfer = new ASN1ObjectIdentifier(
Vereidigte Buchpr�ferin
    public static final ASN1ObjectIdentifier VereidigteBuchprferin = new ASN1ObjectIdentifier(
Vereidigter Buchpr�fer
    public static final ASN1ObjectIdentifier VereidigterBuchprfer = new ASN1ObjectIdentifier(
Patentanw�ltin
    public static final ASN1ObjectIdentifier Patentanwltin = new ASN1ObjectIdentifier(
Patentanwalt
    public static final ASN1ObjectIdentifier Patentanwalt = new ASN1ObjectIdentifier(
    private ASN1Sequence professionItems;
    private ASN1Sequence professionOIDs;
    private String registrationNumber;
    public static ProfessionInfo getInstance(Object obj)
    {
        if (obj == null || obj instanceof ProfessionInfo)
        {
            return (ProfessionInfo)obj;
        }
        if (obj instanceof ASN1Sequence)
        {
            return new ProfessionInfo((ASN1Sequence)obj);
        }
        throw new IllegalArgumentException("illegal object in getInstance: "
            + obj.getClass().getName());
    }

    
Constructor from ASN1Sequence.
               ProfessionInfo ::= SEQUENCE
               {
                 namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
                 professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
                 professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
                 registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
                 addProfessionInfo OCTET STRING OPTIONAL
               }
 

Parameters:
seq The ASN.1 sequence.
    private ProfessionInfo(ASN1Sequence seq)
    {
        if (seq.size() > 5)
        {
            throw new IllegalArgumentException("Bad sequence size: "
                + seq.size());
        }
        Enumeration e = seq.getObjects();
        ASN1Encodable o = (ASN1Encodable)e.nextElement();
        if (o instanceof ASN1TaggedObject)
        {
            if (((ASN1TaggedObject)o).getTagNo() != 0)
            {
                throw new IllegalArgumentException("Bad tag number: "
                    + ((ASN1TaggedObject)o).getTagNo());
            }
             = NamingAuthority.getInstance((ASN1TaggedObject)otrue);
            o = (ASN1Encodable)e.nextElement();
        }
         = ASN1Sequence.getInstance(o);
        if (e.hasMoreElements())
        {
            o = (ASN1Encodable)e.nextElement();
            if (o instanceof ASN1Sequence)
            {
                 = ASN1Sequence.getInstance(o);
            }
            else if (o instanceof DERPrintableString)
            {
                 = DERPrintableString.getInstance(o).getString();
            }
            else if (o instanceof ASN1OctetString)
            {
                 = ASN1OctetString.getInstance(o);
            }
            else
            {
                throw new IllegalArgumentException("Bad object encountered: "
                    + o.getClass());
            }
        }
        if (e.hasMoreElements())
        {
            o = (ASN1Encodable)e.nextElement();
            if (o instanceof DERPrintableString)
            {
                 = DERPrintableString.getInstance(o).getString();
            }
            else if (o instanceof DEROctetString)
            {
                 = (DEROctetString)o;
            }
            else
            {
                throw new IllegalArgumentException("Bad object encountered: "
                    + o.getClass());
            }
        }
        if (e.hasMoreElements())
        {
            o = (ASN1Encodable)e.nextElement();
            if (o instanceof DEROctetString)
            {
                 = (DEROctetString)o;
            }
            else
            {
                throw new IllegalArgumentException("Bad object encountered: "
                    + o.getClass());
            }
        }
    }

    
Constructor from given details.

professionItems is mandatory, all other parameters are optional.

Parameters:
namingAuthority The naming authority.
professionItems Directory strings of the profession.
professionOIDs DERObjectIdentfier objects for the profession.
registrationNumber Registration number.
addProfessionInfo Additional infos in encoded form.
    public ProfessionInfo(NamingAuthority namingAuthority,
                          DirectoryString[] professionItemsASN1ObjectIdentifier[] professionOIDs,
                          String registrationNumberASN1OctetString addProfessionInfo)
    {
        this. = namingAuthority;
        ASN1EncodableVector v = new ASN1EncodableVector();
        for (int i = 0; i != professionItems.lengthi++)
        {
            v.add(professionItems[i]);
        }
        this. = new DERSequence(v);
        if (professionOIDs != null)
        {
            v = new ASN1EncodableVector();
            for (int i = 0; i != professionOIDs.lengthi++)
            {
                v.add(professionOIDs[i]);
            }
            this. = new DERSequence(v);
        }
        this. = registrationNumber;
        this. = addProfessionInfo;
    }

    
Produce an object suitable for an ASN1OutputStream.

Returns:

               ProfessionInfo ::= SEQUENCE
               {
                 namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
                 professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
                 professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
                 registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
                 addProfessionInfo OCTET STRING OPTIONAL
               }
 

Returns:
a DERObject
    {
        ASN1EncodableVector vec = new ASN1EncodableVector();
        if ( != null)
        {
            vec.add(new DERTaggedObject(true, 0, ));
        }
        vec.add();
        if ( != null)
        {
            vec.add();
        }
        if ( != null)
        {
            vec.add(new DERPrintableString(true));
        }
        if ( != null)
        {
            vec.add();
        }
        return new DERSequence(vec);
    }

    

Returns:
Returns the addProfessionInfo.
    {
        return ;
    }

    

Returns:
Returns the namingAuthority.
    {
        return ;
    }

    

Returns:
Returns the professionItems.
    {
        DirectoryString[] items = new DirectoryString[.size()];
        int count = 0;
        for (Enumeration e = .getObjects(); e.hasMoreElements();)
        {
            items[count++] = DirectoryString.getInstance(e.nextElement());
        }
        return items;
    }

    

Returns:
Returns the professionOIDs.
    {
        if ( == null)
        {
            return new ASN1ObjectIdentifier[0];
        }
        int count = 0;
        for (Enumeration e = .getObjects(); e.hasMoreElements();)
        {
            oids[count++] = ASN1ObjectIdentifier.getInstance(e.nextElement());
        }
        return oids;
    }

    

Returns:
Returns the registrationNumber.
    public String getRegistrationNumber()
    {
        return ;
    }
New to GrepCode? Check out our FAQ X