|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.ac.AttributeValue
public class AttributeValue
This is a default AttributeValue object used in the Attribute construct. You can derive from this class and register your own AttributeValue decoders using Attribute.registerAttribute method, so they will be used automatically when an AC is decoded.
When you create a subclass, don't forget to override isDecoded method, or derive your class from the DistinctAttribute class (which simply overrides that method to return true). Alternatively, your code can go through the vector of attribute values and replace the default AttributeValue objects with descendants of this class that are aware of their semantics (and can represent the ASN1Object of the value in a programmer-friendly way).
Attribute.registerAttribute(java.lang.String, java.lang.Class)
Field Summary | |
---|---|
protected ASN1Object |
data
This is the data as an ASN1Object that represents the value of the attribute. |
Constructor Summary | |
---|---|
protected |
AttributeValue()
|
|
AttributeValue(ASN1Object data)
This constructor builds an AttributeValue from ASN1Object of the single value. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
void |
decode(ASN1Object ao)
This method decodes the single value of an Attribute. |
ASN1Object |
getRawAttribute()
Returns the raw ASN1Object of the attribute, if it has been taken from the BER-encoded AC. |
boolean |
isDecoded()
This method tells whether the value has been truly decoded, or it is some kind of placeholder and the actual value must be decoded by other means. |
ASN1Object |
toASN1Object()
This method returns the ASN1Object of this value. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String ident)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ASN1Object data
Constructor Detail |
---|
protected AttributeValue()
public AttributeValue(ASN1Object data) throws CodingException
data
- - the ASN1Object of this value
CodingException
Method Detail |
---|
public ASN1Object getRawAttribute()
This value may not be meaningful in some subclasses of AttributeValue.
public boolean isDecoded()
This method should be overridden by the user-defined classes to return true, so when the content of the set of attribute values is examined, the code would know if the class is aware of its semantics.
public ASN1Object toASN1Object() throws CodingException
CodingException
public void decode(ASN1Object ao) throws CodingException
ao
- - the ASN1Object of the single Attribute value
CodingException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String ident)
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |