Package jadex.bridge
Class ComponentIdentifier
- java.lang.Object
- 
- jadex.bridge.ComponentIdentifier
 
- 
- All Implemented Interfaces:
- IComponentIdentifier,- java.io.Serializable,- java.lang.Cloneable
 
 public class ComponentIdentifier extends java.lang.Object implements IComponentIdentifier, java.lang.Cloneable, java.io.Serializable A component identifier. Name is unique and has the form- See Also:
- Serialized Form
 - 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringnameThe component name.protected java.lang.StringrootCache for platform name for getRoot() calls.- 
Fields inherited from interface jadex.bridge.IComponentIdentifierEMPTY_COMPONENTIDENTIFIERS, LOCAL, RESULTCID
 
- 
 - 
Constructor SummaryConstructors Constructor Description ComponentIdentifier()Create a new component identifier.ComponentIdentifier(IComponentIdentifier cid)Copy a component identifier.ComponentIdentifier(java.lang.String name)Create a new component identifier with a global name and given addresses.ComponentIdentifier(java.lang.String name, IComponentIdentifier parent)Create component identifier.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Clone this component identifier.booleanequals(java.lang.Object obj)Test if two component identifiers are equal.java.lang.StringgetDotName()Get the name without @ replaced by dot.java.lang.StringgetLocalName()Get the local component name.java.lang.StringgetName()Get the component name.IComponentIdentifiergetParent()Get the parent identifier.java.lang.StringgetPlatformName()Get the platform name.java.lang.StringgetPlatformPrefix()Get the platform name without the suffix for name uniqueness.static java.lang.StringgetPlatformPrefix(java.lang.String name)Get the stripped platform name.IComponentIdentifiergetRoot()Get the root identifier.inthashCode()The hash code of the object.booleanhasSameRoot(IComponentIdentifier cid)Test if this identifier has the same root as the cid.voidsetName(java.lang.String name)Set the component name.java.lang.StringtoString()Return a string representation.
 
- 
 - 
- 
Constructor Detail- 
ComponentIdentifierpublic ComponentIdentifier() Create a new component identifier. Bean constructor
 - 
ComponentIdentifierpublic ComponentIdentifier(java.lang.String name) Create a new component identifier with a global name and given addresses.- Parameters:
- name- A global name (e.g. "cms@lars").
 
 - 
ComponentIdentifierpublic ComponentIdentifier(java.lang.String name, IComponentIdentifier parent)Create component identifier.- Parameters:
- name- The local name.
- parent- The parent.
- addresses- The addresses.
 
 - 
ComponentIdentifierpublic ComponentIdentifier(IComponentIdentifier cid) Copy a component identifier.- Parameters:
- cid- The id to copy from.
 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the component name.- Specified by:
- getNamein interface- IComponentIdentifier
- Returns:
- The name of an component.
 
 - 
setNamepublic void setName(java.lang.String name) Set the component name.- Parameters:
- name- The component name.
 
 - 
getParentpublic IComponentIdentifier getParent() Get the parent identifier.- Specified by:
- getParentin interface- IComponentIdentifier
- Returns:
- The parent identifier (if any).
 
 - 
getRootpublic IComponentIdentifier getRoot() Get the root identifier.- Specified by:
- getRootin interface- IComponentIdentifier
- Returns:
- The root identifier.
 
 - 
clonepublic java.lang.Object clone() Clone this component identifier. Does a deep copy.- Overrides:
- clonein class- java.lang.Object
 
 - 
getLocalNamepublic java.lang.String getLocalName() Description copied from interface:IComponentIdentifierGet the local component name.- Specified by:
- getLocalNamein interface- IComponentIdentifier
- Returns:
- the local name of a component
 
 - 
getPlatformNamepublic java.lang.String getPlatformName() Get the platform name.- Specified by:
- getPlatformNamein interface- IComponentIdentifier
- Returns:
- The platform name.
 
 - 
getDotNamepublic java.lang.String getDotName() Get the name without @ replaced by dot.- Specified by:
- getDotNamein interface- IComponentIdentifier
- Returns:
- The dot name.
 
 - 
hasSameRootpublic boolean hasSameRoot(IComponentIdentifier cid) Test if this identifier has the same root as the cid.- Specified by:
- hasSameRootin interface- IComponentIdentifier
- Parameters:
- cid- The component id.
- Returns:
- True, if the root is equal.
 
 - 
getPlatformPrefixpublic java.lang.String getPlatformPrefix() Get the platform name without the suffix for name uniqueness.- Specified by:
- getPlatformPrefixin interface- IComponentIdentifier
- Returns:
- The platform name without suffix.
 
 - 
hashCodepublic int hashCode() The hash code of the object.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hashcode.
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if two component identifiers are equal.- Overrides:
- equalsin class- java.lang.Object
- Returns:
- True, if equal.
 
 - 
toStringpublic java.lang.String toString() Return a string representation.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- The string representation.
 
 - 
getPlatformPrefixpublic static java.lang.String getPlatformPrefix(java.lang.String name) Get the stripped platform name.- Parameters:
- name- The platform name.
- Returns:
- the stripped platform name.
 
 
- 
 
-