|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsdsi.Obj jsdsi.Name
A SDSI name: a principal and a sequence of strings. If the sequence contains just one string, this is a local name; otherwise this is an extended name.
Nested Class Summary |
Nested classes inherited from class jsdsi.Subject |
Subject.Default |
Field Summary |
Fields inherited from class jsdsi.Obj |
_obj |
Constructor Summary | |
Name(Principal i,
java.lang.String n)
Creates a new local name from a given principal and name-string. |
|
Name(Principal i,
java.lang.String[] n)
Creates a new Name for a given principal and an array
of name-strings. |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
Principal |
getIssuer()
Returns the principal of the Name . |
java.lang.String[] |
getNames()
Returns an array of name-strings of this Name (the
array has a length of one in the case of a local name, and
greater then 1 for extended names). |
int |
hashCode()
|
Name |
prefix()
Returns the local name of this name, that is a Name
for this Name s issuer with the first name-string of
the list of names. |
Name |
prefix(int i)
Creates a new Name from this Name using only
the first i name-strings. |
boolean |
prefixOf(Name n)
Checks if a given Name has the same issuer
(principal) as this Name and if the name-strings are
equal to this name's name-strings (a smaller number of
name-strings are okay). |
SexpList |
toSexp()
Creates an SexpList -representation from this SDSI-object. |
SexpList |
toSexp(Principal iss)
Returns an SexpList -representation of the given
Principal . |
Methods inherited from class jsdsi.Obj |
parseObj, parseObj, readResolve, toByteArray, toString, toString, toTransport |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Name(Principal i, java.lang.String[] n)
Name
for a given principal and an array
of name-strings.
i
- principal to create the Name
for.n
- array of string-names for this Name
(if the
length of n
is greater than 1, an extended name
will be created).public Name(Principal i, java.lang.String n)
i
- principal to create the Name
for.n
- name-string to create the Name
for.Method Detail |
public Principal getIssuer()
Name
.
Name
.public java.lang.String[] getNames()
Name
(the
array has a length of one in the case of a local name, and
greater then 1 for extended names).
public boolean prefixOf(Name n)
Name
has the same issuer
(principal) as this Name
and if the name-strings are
equal to this name's name-strings (a smaller number of
name-strings are okay).
n
- Name
to compare with this Name
.
false
if n
has another issuer,
a greater number of name-strings or if one name-string is not
equal if a name-string from this Name
, returns
true
otherwise.public Name prefix(int i)
Name
from this Name
using only
the first i
name-strings.
i
- number of name-strings of this Name
to use for
creating a new Name
.
Name
for the same principal as this
Name
using only the first i
name-strings.public Name prefix()
Name
for this Name
s issuer with the first name-string of
the list of names.
Name
.public boolean equals(java.lang.Object o)
equals
in class Obj
Object.equals(Object)
public int hashCode()
hashCode
in class Obj
Object.hashCode()
public SexpList toSexp()
Obj
SexpList
-representation from this SDSI-object.
toSexp
in interface Subject
toSexp
in class Obj
SexpList
that represents this SDSI-object.public SexpList toSexp(Principal iss)
SexpList
-representation of the given
Principal
.
iss
- the Principal
to create an
SexpList
from.
SexpList
-representation of iss
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |