|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--spki.BaseObj
|
+--spki.Name
SPKI Name abstract class.
FQName,
LocalName,
RelativeName| Field Summary | |
private static String |
__ME
This class's full name. |
private boolean |
dirty
Do we need to re-build the SExpression? |
private boolean |
isFQName
Is this a fully-qualified name? true if principal is not null. |
private boolean |
isLocalName
Is this a local name? true if this is a fully-qualified name with one-level name. |
private boolean |
isRelativeName
Is this a relative name? true if principal is null and the name is onle-level deep. |
private Vector |
names
The list of names. |
private Principal |
principal
The principal anchoring this name, may be null. |
static String |
SEXP_NAME
This class S-Expression type name, used by toSExpression() and other methods. |
| Fields inherited from class spki.BaseObj |
__ME,
cache_sexp,
cached_sexp,
DEFAULT_HASH_ALG,
locked,
SEXP_NAME |
| Constructor Summary | |
protected |
Name()
Don't use me. |
protected |
Name(SExpression sexp)
Create an immutable Name object from an S-Expression. |
| Method Summary | |
(package private) void |
addName(byte[] name)
Add a name byte array. |
(package private) void |
addName(Sexp name)
Add a name Sexp. |
(package private) void |
addName(String name)
Add a name String. |
static Name |
getInstance(SExpression sexp)
Get an instance of a Name from given S-Expression. |
Sexp |
getName(int index)
Get a name with specified index. |
int |
getNameDepth()
Get the number of level of names in this object. |
Principal |
getPrincipal()
Get the principal anchoring this object, if available. |
boolean |
isFQName()
Is this a fully-qualified name? |
boolean |
isLocalName()
Is this a local name? |
boolean |
isRelativeName()
Is this a relative name? |
(package private) void |
setPrincipal(Principal principal)
Set the principal anchoring this object. |
SExpression |
toSExpression()
Build an SExpression representing this object, with the hash principal anchoring the name, if available. |
(package private) void |
verify()
|
| Methods inherited from class spki.BaseObj |
disableSExpressionCaching,
enableSExpressionCaching,
extractHashAlgId,
getCachedSExpression,
isLocked,
isSListOfType,
lock,
providerToSPKI,
setCachedSExpression,
spkiToProvider,
toString |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String __ME
public static final String SEXP_NAME
toSExpression()private Principal principal
private Vector names
private boolean isFQName
principal,
FQNameprivate boolean isLocalName
isFQName,
LocalNameprivate boolean isRelativeName
principal,
RelativeNameprivate boolean dirty
addName(Sexp),
addName(String),
addName(byte[]),
toSExpression()| Constructor Detail |
protected Name()
Name(SExpression)
protected Name(SExpression sexp)
throws SPKIException,
ParseException
BaseObj.BaseObj(SExpression)| Method Detail |
public SExpression toSExpression()
throws SPKIException
principal,
BaseObj.toSExpression()public boolean isFQName()
public boolean isLocalName()
public boolean isRelativeName()
public Principal getPrincipal()
public int getNameDepth()
public Sexp getName(int index)
throws SPKIException
index - index of the name required.
public static final Name getInstance(SExpression sexp)
throws SPKIException,
ParseException
sexp - SExpression containing a Name.FQName,
LocalName,
RelativeName
void verify()
throws SPKIException
void setPrincipal(Principal principal)
throws IllegalStateException,
SPKIException
principal - a Principal object anchoring this name,
maybe null.
void addName(Sexp name)
throws IllegalStateException,
SPKIException
name - a byte-string (Sexp) object containing a name.
void addName(String name)
throws IllegalStateException,
SPKIException
name - String containing a name.addName(Sexp)
void addName(byte[] name)
throws IllegalStateException,
SPKIException
name - byte-array containing a name.addName(Sexp)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||