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.10 $ $Date: 1997/02/07 10:15:52 $
Author:
Marc Mazoue (mazoue@sept.fr)

Constructor Index

 o AccessName()
Constructor without args
 o AccessName(String)
Creates an AccessName object from the given name without a serial number
 o AccessName(String, long)
Creates an AccessName object from the given name and serial number.

Method Index

 o getName()
Returns the name attribute of the access name.
 o getSN()
Returns the serial number when the access name has one.
Returns 0 otherwise.
 o 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 "%"
 o myStreamSize()
Returns the size of the AccessName object when externalized.
 o readObject(StreamInputInterface)
Internalizes an AccessName object.
 o 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.
 o writeObject(StreamOutputInterface)
Externalizes an AccessName object.

Constructors

 o AccessName
  public AccessName() throws ArchiveManException
Constructor without args
Throws: ArchiveManException
(for the polymorphic variant below)
 o 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
 o 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

Methods

 o getName
  public String getName()
Returns the name attribute of the access name.
Returns:
the name String
 o 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.
 o 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.
 o 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
 o 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.
 o 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.
 o 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