|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectschemajic.model.ASN1Value
schemajic.model.ASN1ObjectIdentifier
public class ASN1ObjectIdentifier
Models the abstract concept of the value of
ASN.1 type OBJECT IDENTIFIER.
An object identifier is the name of an object. It is sometimes referred
to as an "information object identifier" or "OID". This object name,
a value of ASN.1 type OBJECT IDENTIFIER, is a globally unique
ordered list of integers. Each integer in the list is an "object
identifier component", and there must be at least two components to
form a valid object identifier.
Universal class tag assignment is UNIVERSAL 6.
XML ASN.1 type name is OBJECT_IDENTIFIER.
The object identifier type is a built-in ASN.1 type and has UNIVERSAL
class tag number 6. This type is defined in ASN.1 standard X.680 as:
ObjectIdentifierType ::= OBJECT IDENTIFIER
There are several different formats that can be used in with the ASN.1 Basic
Value Notation and the ASN.1 XML Value Notation to create object identifier
values. For example, consider these object identifiers that form the name
"id-set-Griffin" which uniquely identifies the object Griffin Consulting:
id-set OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) internationalRA(23) set(42) }
id-set-vendor OBJECT IDENTIFIER ::= { id-set 9 }
id-set-Griffin OBJECT IDENTIFIER ::= { id-set-vendor 10 }
Here three object identifiers are defined using the basic value notation,
id-set, id-set-vendor and id-set-Griffin. The object
name id-set is used to define id-set-vendor, and the object
name id-set-vendor is used to define id-set-Griffin. This
value notation format which uses identifier names as components to create
new object identifier values is called the "NameForm". The
object identifier components 9 and 10 are in "NumberForm"
format, and the components joint-iso-itu-t(2), internationalRA(23),
and set(42) are in "NameAndNumberForm" format.
Each "Name" used in this format is required to be a valid ASN.1 identifier name, and must begin with a lowercase alphabetic character. Since valid types, not identifiers, begin with uppercase characters, identifier components such as US(840), which are commonly found in practice, are not valid. Such usage may sometimes be seen in older specifications and should be corrected to us(840).
| Constructor Summary | |
|---|---|
ASN1ObjectIdentifier()
Constructor for ASN1ObjectIdentifier
with array of integer values parameter. |
|
ASN1ObjectIdentifier(ASN1ObjectIdentifier oid)
Constructor for ASN1ObjectIdentifier
with information object identifier parameter. |
|
ASN1ObjectIdentifier(int[] arcs)
Constructor for ASN1ObjectIdentifier
with array of integer object identifier arc elements
parameter. |
|
ASN1ObjectIdentifier(java.lang.String value)
Constructor for ASN1ObjectIdentifier
with string initialization values parameter. |
|
| Method Summary | |
|---|---|
java.lang.Object |
accept(ValueVisitor visitor,
java.lang.Object object)
Accepts a visit from the ValueVisitor |
boolean |
equals(java.lang.Object o)
Returns boolean true if the value of
the provided object is equal to the current value. |
int[] |
getArcs()
Returns the current object identifier arc elements. |
Type |
getAsn1Type()
Returns an ASN.1 OBJECT IDENTIFIER type. |
java.lang.String |
getCXEREncoding()
Returns the current information object identifier encoded using the Canonical XML Encoding Rules (cXER) of ASN.1. |
int |
getLastArc()
Get the last arc in the information object identifier. |
java.lang.String |
getName()
Returns the current name. |
java.lang.String |
getStringValue()
Gets the string value of a set of one or mor information object identifier arcs |
int |
hashCode()
Override Object.hashCode() to ensure
that it can be used as a valid key in a hash map. |
void |
setArcs(int[] arcs)
Sets the provided information object identifier arcs as the current arcs. |
void |
setStringValue(java.lang.String value)
Sets an information object identifier string value to the current set of one or more information object identifier arcs. |
boolean |
startsWith(ASN1ObjectIdentifier other)
Returns true if the first other.length arcs of this oid match the arcs of the 'other' oid. |
boolean |
startsWith(int[] otherArcs)
Returns true if the first other.length arcs of this oid match the arcs of the 'other' oid. |
java.lang.String |
toString()
Returns an information object identifier value as a formatted string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ASN1ObjectIdentifier()
ASN1ObjectIdentifier
with array of integer values parameter.
public ASN1ObjectIdentifier(ASN1ObjectIdentifier oid)
ASN1ObjectIdentifier
with information object identifier parameter.
public ASN1ObjectIdentifier(int[] arcs)
ASN1ObjectIdentifier
with array of integer object identifier arc elements
parameter.
public ASN1ObjectIdentifier(java.lang.String value)
throws java.text.ParseException
ASN1ObjectIdentifier
with string initialization values parameter.
java.text.ParseException| Method Detail |
|---|
public java.lang.String getName()
public int[] getArcs()
public void setArcs(int[] arcs)
arcs - a set of one or more information object identifier arcspublic int getLastArc()
public java.lang.String getStringValue()
public void setStringValue(java.lang.String value)
throws java.text.ParseException
value - a provided information object identifier string
java.text.ParseExceptionpublic boolean startsWith(int[] otherArcs)
public boolean startsWith(ASN1ObjectIdentifier other)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
Object.hashCode() to ensure
that it can be used as a valid key in a hash map.
hashCode in class java.lang.Objectpublic java.lang.String getCXEREncoding()
public boolean equals(java.lang.Object o)
boolean true if the value of
the provided object is equal to the current value. Otherwise,
returns false.
equals in class java.lang.Object
public java.lang.Object accept(ValueVisitor visitor,
java.lang.Object object)
throws VisitorException
visit from the ValueVisitor
accept in class ASN1Valuevisitor - the function applicator (mapper), which knows how to
process the given object type and apply appropriate operations to
the elements of this type of objectobject - an object to be visited
VisitorExceptionpublic Type getAsn1Type()
OBJECT IDENTIFIER type.
getAsn1Type in class ASN1Value
|
XCMS Toolkit | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||