public abstract class QCStatementInfo
extends java.lang.Object
The PKIX
Qualified Certificate Profile specifies the Qualified Certificate Statements
(QCStatements) extension for including defined statements related to Qualified Certificates.
The QCStatements extension simply consists of a ASN.1 SEQUENCE of QC statements:
QCStatements ::= SEQUENCE OF QCStatementEach QC statement itself consists of an object identifier and an optional statement info identified by the object identifier (statement ID):
QCStatement ::= SEQUENCE { statementId OBJECT IDENTIFIER, statementInfo ANY DEFINED BY statementId OPTIONAL }Any class implementing a particular statement info has to extend this class and therefore has to implement the abstract methods
decode
, toASN1Object
and getStatementID
. The statement ID to be returned by method getStatementID
is the one identifying the particular statement info and shall be used for registering
the corresponding class as implementation for this statement info, e.g.:
public class MyQCStatementInfo extends QCStatementInfo { ... // the statement id: public static final ObjectID statementID = ...; ... } ... // register the implementation: QCStatement.register(MyQCStatementInfo.statementID, MyQCStatementInfo.class);Note that the
statementID
used for registering a statementInfo
implementing class belongs to the QCStatement for which the statementInfo is
used. For instance, the Qualified Certificate Profile currently defines one statement info,
SemanticsInformation
,
to may be used for the QCSyntaxV1
and QCSyntaxV2
QC statements.
When implementing a statement info by extending this class please be aware that
methods toASN1Object
and decode
only have to convert the statement info itself (and NOT the statementID) into
respectively from an ASN1Object.
QCStatement
,
QCStatements
Constructor and Description |
---|
QCStatementInfo() |
Modifier and Type | Method and Description |
---|---|
abstract void |
decode(ASN1Object obj)
Decodes a statement info from its ASN.1 representation.
|
java.lang.String |
getName()
Returns the name of the statement info.
|
abstract ObjectID |
getStatementID()
Returns the statement ID identifying this statement info.
|
abstract ASN1Object |
toASN1Object()
Returns an ASN.1 representation of a particular statement info.
|
abstract java.lang.String |
toString()
Returns a String representation of the QCStatementInfo.
|
public abstract void decode(ASN1Object obj) throws CodingException
QCStatement
class when parsing the ASN.1 representation
of a statement info. This method only expects the ASN.1 representation
of the statement info, but not the corresponding statement ID. This
method shall not be explicitly called by an application.obj
- the statement info as ASN1ObjectCodingException
- if the ASN1Object cannot be parsedpublic abstract ASN1Object toASN1Object() throws CodingException
The ASN1Object returned by this method only represents the statement info but does not include the corresponding statement id.
CodingException
- if the statement info cannot be represented as ASN.1 objectpublic abstract ObjectID getStatementID()
public abstract java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()