raccoon.tibco.tibrv.badhnati.descriptors
Class ClassElement

java.lang.Object
  extended by raccoon.tibco.tibrv.badhnati.descriptors.ClassElement

public class ClassElement
extends java.lang.Object

A single prefix element contained within an ActiveEnterprise message.

Since:
Raccoon v0.4, refactored in Raccoon v0.5
Version:
$Id: ClassElement.java,v 1.3 2003/07/01 19:19:56 crouvrais Exp $
Author:
Cedric ROUVRAIS

Constructor Summary
ClassElement()
          Default constructor required as this is just a container
ClassElement(java.lang.String pRadix, java.lang.String pClassName, java.lang.Integer pIndex)
          Convenience constructor, assigns all the elements to this container.
ClassElement(java.lang.String pRadix, java.lang.String pClassName, java.lang.String pCollectionType, java.lang.Integer pIndex)
          Convenience constructor, assigns all the elements to this container.
ClassElement(java.lang.String pRadix, java.lang.String pClassName, java.lang.String pCollectionType, java.lang.Integer pIndex, IRepoGenerator pRepoGenerator)
          Convenience constructor, assigns all the elements to this container.
 
Method Summary
 boolean equals(java.lang.Object pObject)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getClassName()
          The fully qualified name of the class.
 java.lang.String getCollectionType()
          The element type if Object.getClass() is a collection (Vector, ...).
 java.lang.Integer getIndex()
          The position of this class within the prefix list of the Active Enterprise message
 java.lang.String getRadix()
          Retrieve the root element of the path location within the TIB/Repository
 int hashCode()
          Returns a hash code value for the object.
 void setClassName(java.lang.String pClassName)
          Assigns to this instance the name of the class.
 void setCollectionType(java.lang.String pCollectionType)
          The type of the collection element if Object.getClass() is a collection, null otherwise.
 void setIndex(java.lang.Integer pIndex)
          The position of this class within the prefix list of the Active Enterprise message
 void setRadix(java.lang.String pRadix)
          Assign the root element of the path element.
 void setRepoGenerator(IRepoGenerator pRepoGenerator)
          Defines the utility component in relation with the TIB/Repository.
 java.lang.String toRepoObject()
          Converts the name of a java object to the corresponding entry in the TIB/Repository.
 java.lang.String toRepoURL()
          Converts the current information to a contained by this instance to a valid TIB/Repository URL
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassElement

public ClassElement()
Default constructor required as this is just a container


ClassElement

public ClassElement(java.lang.String pRadix,
                    java.lang.String pClassName,
                    java.lang.Integer pIndex)
Convenience constructor, assigns all the elements to this container.

Parameters:
pRadix - the common root for all Active Enterprise class definitions.
pClassName - the offset to apply to the radix to locate the curent element.
pIndex - the index within the list of prefixes of this instance.

ClassElement

public ClassElement(java.lang.String pRadix,
                    java.lang.String pClassName,
                    java.lang.String pCollectionType,
                    java.lang.Integer pIndex)
Convenience constructor, assigns all the elements to this container.

Parameters:
pRadix - the common root for all Active Enterprise calss definitions.
pClassName - the offset to apply to the radix to locate the curent element.
pCollectionType - the type of the element contained within the previous, if it is a collection.
pIndex - the index within the list of prefixes of this instance.

ClassElement

public ClassElement(java.lang.String pRadix,
                    java.lang.String pClassName,
                    java.lang.String pCollectionType,
                    java.lang.Integer pIndex,
                    IRepoGenerator pRepoGenerator)
Convenience constructor, assigns all the elements to this container.

Parameters:
pRadix - the common root for all Active Enterprise calss definitions.
pClassName - the offset to apply to the radix to locate the curent element.
pCollectionType - the type of the element contained within the previous, if it is a collection.
pIndex - the index within the list of prefixes of this instance.
pRepoGenerator - the TIB/Repository URL generator
Method Detail

setRepoGenerator

public void setRepoGenerator(IRepoGenerator pRepoGenerator)
Defines the utility component in relation with the TIB/Repository.

Parameters:
pRepoGenerator - the repository generator instance.

getCollectionType

public java.lang.String getCollectionType()
The element type if Object.getClass() is a collection (Vector, ...).

Returns:
the type of class contained by the main class, if it is a collection

setCollectionType

public void setCollectionType(java.lang.String pCollectionType)
The type of the collection element if Object.getClass() is a collection, null otherwise.

Parameters:
pCollectionType - the type of the collection element

getRadix

public java.lang.String getRadix()
Retrieve the root element of the path location within the TIB/Repository

Returns:
radix for this Active Enterprise component.

setRadix

public void setRadix(java.lang.String pRadix)
Assign the root element of the path element. Currently the following values are known of: AeConstants.CLASS_DIRECTORY, AeConstants.SEQUENCE_DIRECTORY

Parameters:
pRadix - radix for this Active Enterprise component.

getClassName

public java.lang.String getClassName()
The fully qualified name of the class.

Returns:
the value obtained by Class.getName()

setClassName

public void setClassName(java.lang.String pClassName)
Assigns to this instance the name of the class.

Parameters:
pClassName - the fully qualified name of the class

getIndex

public java.lang.Integer getIndex()
The position of this class within the prefix list of the Active Enterprise message

Returns:
the index of this class defined by Message

setIndex

public void setIndex(java.lang.Integer pIndex)
The position of this class within the prefix list of the Active Enterprise message

Parameters:
pIndex - the index of this class defined by Message

equals

public boolean equals(java.lang.Object pObject)
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation:

This implementation of equals compares exclusively the elements className and radix.

Overrides:
equals in class java.lang.Object
Parameters:
pObject - the reference object with which to compare.
Returns:
true if this object is the same as the pObject argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The hashcode is an element generated from the properties className and radix

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.

toRepoURL

public java.lang.String toRepoURL()
                           throws RaccoonException
Converts the current information to a contained by this instance to a valid TIB/Repository URL

Returns:
the TIB/Repository URL excluding the name of the class referenced by this instance.
Throws:
RaccoonException - if the Repository Generator fails for some reason.

toRepoObject

public java.lang.String toRepoObject()
                              throws RaccoonException
Converts the name of a java object to the corresponding entry in the TIB/Repository.

Returns:
the name of java class as found in the TIB/Repository
Throws:
RaccoonException - if the RepoGenerator fails for some reason

toString

public java.lang.String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.


Copyright null null. All Rights Reserved.