ca.infoway.messagebuilder.xml
Class TypeName

Package class diagram package TypeName
java.lang.Object
  extended by ca.infoway.messagebuilder.xml.TypeName

public class TypeName
extends Object

The type name.

A typical name looks like this: REPC_IN002620.ControlActProcess . The parent of this name would be REPC_IN002620

Author:
Intelliware Development

Field Summary
static String PART_SEPARATOR
           
 
Constructor Summary
TypeName(String name)
          Standard constructor.
 
Method Summary
 boolean equals(Object obj)
          Standard equals method.
 String getName()
          Get the name.
 TypeName getParent()
          Get the name of the parent type.
 int getPartCount()
          The number of parts (separated by the period character) in the name.
 TypeName getRootName()
          Get the name of the top-level type.
 String getUnqualifiedName()
          Gets the unqualified part name.
 int hashCode()
          Standard hash code method.
 boolean isInteraction()
          Get a flag indicating whether or not a type name is an interaction.
 boolean isRoot()
          Get a flag indicating whether or not the type name represents a top-most type.
 String toString()
          Standard toString method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PART_SEPARATOR

public static final String PART_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

TypeName

public TypeName(String name)

Standard constructor.

Parameters:
name - - the name of the type
Method Detail

getPartCount

public int getPartCount()

The number of parts (separated by the period character) in the name.

Returns:
- the number of parts

isRoot

public boolean isRoot()

Get a flag indicating whether or not the type name represents a top-most type.

Returns:
true if the relationship is a top-level type; false otherwise.

getRootName

public TypeName getRootName()

Get the name of the top-level type. For example the root name of "PRPA_MT101103CA.ParameterList" is "PRPA_MT101103CA". The root name of "PRPA_MT101103CA" is "PRPA_MT101103CA".

Returns:
the root name.

getParent

public TypeName getParent()

Get the name of the parent type. For example the parent name of "PRPA_MT101103CA.ParameterList" is "PRPA_MT101103CA". The parent name of "PRPA_MT101103CA" is "".

Returns:
- the parent name

equals

public boolean equals(Object obj)

Standard equals method.

Overrides:
equals in class Object
Parameters:
obj - - the other object
Returns:
true if this object equals the parameter; false otherwise.

hashCode

public int hashCode()

Standard hash code method.

Overrides:
hashCode in class Object
Returns:
the hash code

getName

public String getName()

Get the name.

Returns:
the name

getUnqualifiedName

public String getUnqualifiedName()

Gets the unqualified part name. For example the unqualified name of "PRPA_MT101103CA.ParameterList" is "ParameterList". The unqualified name of "PRPA_MT101103CA" is "PRPA_MT101103CA".

Returns:
the unqualified name

toString

public String toString()

Standard toString method.

Overrides:
toString in class Object
Returns:
the type name

isInteraction

public boolean isInteraction()

Get a flag indicating whether or not a type name is an interaction. Interactions tend to have '_IN' in the middle of the name. For example, "PRPA_IN101103CA" is an interaction name.

Returns:
true if the type name is an interaction; false otherwise.


Copyright © 2013. All Rights Reserved.