|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--iaik.asn1.structures.RDN
This class implements the ASN.1 type RelativeDistinguishedName.
A Distinguished Name is used to specify a path within a X.500 directory information tree. A distinguished name is defined as a sequence of relative distinguished names, where a relative distinguished name is defined as follows:
RelativeDistinguishedName ::= SET OF AttributeValueAssertion
AttributeValueAssertion ::= SEQUENCE {
AttributeType OBJECT IDENTIFIER,
AttributeValue ANY
}
You may directly supply a AttributeValueAssertion (AVA) when creating a
RelativeDistinguishedName object, or (and) you may use the addAVA
method for later adding some AVA, e.g.:
RDN rel_dis_name = new RDN(ObjectID.country, "AT"); rel_dis_name.addAVA(ObjectID.locality, "Graz");
When specifying issuer or subject within a X.509 certificate by a distinguished name composed of relative distinguished names, it is recommended that each set of AttributeValueAssertions constituting a RelativeDistinguishedName only should contain one element. This class only allows one AVA of a specific type to be added to a RDN object.
Name,
AVA| Field Summary | |
protected java.util.Hashtable |
avas
Repository for AttributeValueAssertion objects. |
| Constructor Summary | |
RDN()
Creates an empty RelativeDistinguishedName. |
|
RDN(ASN1Object obj)
Creates a RelativeDistinguishedName from an ASN1Object. |
|
RDN(ObjectID oid,
java.lang.Object value)
Creates a new RelativeDistinguishedName for one AVA. |
|
RDN(java.lang.String rdn)
Creates a RelativeDistinguishedName from a String. |
|
| Method Summary | |
void |
addAVA(AVA ava)
Adds a AttributeValueAssertion to this RelativeDistinguishedName. |
void |
addAVA(ObjectID oid,
java.lang.Object value)
Creates a new AttributeValueAssertion with given type and value and adds it to this RelativeDistinguishedName. |
void |
decode(ASN1Object obj)
Decodes a RelativeDistinguishedName from the given ASN1Object. |
java.util.Enumeration |
elements()
Returns an enumeration of the AVAs in this RDN. |
boolean |
equals(java.lang.Object obj)
Compares two RelativeDistinguishedNames. |
AVA |
getAVA()
This method returns one AVA. |
AVA |
getAVA(ObjectID oid)
Returns a AttributeValueAssertion of given type from this RelativeDistinguishedName. |
int |
hashCode()
Returns the hashcode for this RDN. |
ASN1Object |
toASN1Object()
Returns the RelativeDistinguishedName as an ASN1Object. |
java.lang.String |
toString()
Returns a string that represents the contents of this RDN. |
java.lang.String |
toString(boolean detailed)
Returns a string that represents the contents of this RDN. |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected java.util.Hashtable avas
| Constructor Detail |
public RDN()
public RDN(ObjectID oid,
java.lang.Object value)
AttributeValueAssertion objects
may be added by using a proper addAVA method.oid - the type (object ID) of the AVA to be addedvalue - the value of the AVA to be added
public RDN(ASN1Object obj)
throws CodingException
The supplied ASN1Object represents an already existing RDN
that may have been created by means of the toASN1Object method.
the - RelativeDistinguishedName as ASN1Objectpublic RDN(java.lang.String rdn)
The supplied String represents an encoded RDN that may
have been created by means of the toString method.
the - RelativeDistinguishedName as String| Method Detail |
public void decode(ASN1Object obj)
throws CodingException
The supplied ASN1Object represents an already existing RDN object that
may have been created by means of the toASN1Object()
method.
obj - the RDN as ASN1Objectpublic ASN1Object toASN1Object()
public void addAVA(ObjectID oid,
java.lang.Object value)
oid - the attribute type of the AVA to be added, as object IDvalue - the attribute valuepublic void addAVA(AVA ava)
ava - the AttributeValueAssertion to addpublic AVA getAVA(ObjectID oid)
oid - the type of the AVA to be searched for, as ObjectIDpublic AVA getAVA()
public java.util.Enumeration elements()
public int hashCode()
public boolean equals(java.lang.Object obj)
obj - the other RelativeDistinguishedNametrue, if the two RelativeDistinguishedNames are equal, false otherwisepublic java.lang.String toString()
public java.lang.String toString(boolean detailed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||