Class semper.archive.AccessName
All Packages Class Hierarchy This Package Previous Next Index
Class semper.archive.AccessName
java.lang.Object
|
+----semper.archive.AccessName
- public class AccessName
- extends Object
- implements Streamable
This class implements handles associated with archived objects.
It Includes the following attributes wich are used to index the
objects in the database:
- a name (String)
- optional : a serial number (long)
It is up to the archive users to construct the name
to be used within the AccessName.
It is also up to the archive users to decide if they want
to integrate a serial number into the access name of their
stored objects. Use ArchiveMan.getSerialNumber().
Examples:
AccessName a_n_1 = new AccessName("MyPurse");
AccessName a_n_2 =
new AccessName(("Certificate" + _caName + _userId"), _serialNr);
System.out.println("flattened access name : " + a_n_2.toString());
AccessName a_n_3 =
new AccessName(a_n_2.name, ArchiveMan.getSerialNumber());
- Version:
- $Revision: 1.9 $ $Date: 1997/01/27 18:12:10 $
- Author:
- Marc Mazoue ([email protected])
-
AccessName()
- Constructor without args
-
AccessName(String)
- Creates an AccessName object from the given name without a serial number
-
AccessName(String, long)
- Creates an AccessName object from the given name and serial number.
-
getName()
- Returns the name attribute of the access name.
-
getSN()
- Returns the serial number when the access name has one.
Returns 0 otherwise.
-
inString()
- Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the
delimiter "%"
-
myStreamSize()
- Returns the size of the AccessName object when externalized.
-
readObject(StreamInputInterface)
- Internalizes an AccessName object.
-
toString()
- Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the
delimiter "%"
Overrides the toString() method of the Object class.
-
writeObject(StreamOutputInterface)
- Externalizes an AccessName object.
AccessName
public AccessName() throws ArchiveManException
- Constructor without args
- Throws: ArchiveManException
- (for the polymorphic variant below)
AccessName
public AccessName(String s) throws ArchiveManException
- Creates an AccessName object from the given name without a serial number
- Parameters:
- s - the string used for the access name
- Throws: ArchiveManException
- if the String argument is null
AccessName
public AccessName(String s,
long l) throws ArchiveManException
- Creates an AccessName object from the given name and serial number.
- Parameters:
- s - the string used for the access name
- l - the serial number
- Throws: ArchiveManException
- if the name String is null
getName
public String getName()
- Returns the name attribute of the access name.
- Returns:
- the name String
getSN
public long getSN()
- Returns the serial number when the access name has one.
Returns 0 otherwise.
- Returns:
- the serial number as a long integer. 0 if none.
inString
public String inString()
- Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the
delimiter "%"
- Returns:
- the flattened access name String
This is an old-fashioned method. Please use the toString method below.
toString
public String toString()
- Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the
delimiter "%"
Overrides the toString() method of the Object class.
- Returns:
- the flattened access name String
- Overrides:
- toString in class Object
writeObject
public void writeObject(StreamOutputInterface s) throws StreamIOException
- Externalizes an AccessName object. By calling this method the access name
will be written to the IO stream.
- Parameters:
- s - is the StreamOutputInterface onto which the object is written
- Returns:
- no return value
- Throws: StreamIOException
- If the output data is corrupt.
readObject
public void readObject(StreamInputInterface s) throws StreamIOException
- Internalizes an AccessName object. By calling this method the access name
will be read from the IO stream.
- Parameters:
- s - is the StreamOutputInterface from which the object is read
- Returns:
- no return value
- Throws: StreamIOException
- If the input data is corrupt.
myStreamSize
public int myStreamSize() throws StreamIOException
- Returns the size of the AccessName object when externalized.
- Parameters:
- s - is the StreamOutputInterface relative to which the size is computed
- Returns:
- the size of the externalized object
- Throws: StreamIOException
- if the size could not be computed
All Packages Class Hierarchy This Package Previous Next Index