com.infoengine.object
Class IeAssociationIdentifier

java.lang.Object
  extended bycom.infoengine.object.IeAssociationIdentifier
All Implemented Interfaces:
AssociationIdentifier, AttributeIdentifier, ElementIdentifier, Externalizable, Identifier, Serializable, TypeInstanceIdentifier

public class IeAssociationIdentifier
extends Object
implements AssociationIdentifier, Externalizable

See Also:
Serialized Form

Field Summary
private static String _serialVersion
           
protected  AssociationTypeIdentifier associationTypeId
           
protected  TypeInstanceIdentifier contextId
           
private  String externalForm
           
private  int hashcode
           
protected  InstanceIdentifier instanceId
           
private static String RESOURCE
           
 
Fields inherited from interface com.ptc.core.meta.common.TypeInstanceIdentifier
O_REFERENCE, PERSIST_FORM_SEPARATOR, V_REFERENCE
 
Fields inherited from interface com.ptc.core.meta.common.Identifier
CONTEXT_SEPARATOR, INSTANCE_DATA_SEPARATOR, PROTOCOL_SEPARATOR
 
Constructor Summary
IeAssociationIdentifier()
          default no arg constructor to be used for de-serialization
IeAssociationIdentifier(AssociationTypeIdentifier associationTypeId, InstanceIdentifier instanceId, TypeInstanceIdentifier contextId)
           
 
Method Summary
 int compareFreshness(ElementIdentifier elementId)
          The compareFreshness() method computes the "freshness distance" between the two objects (the one the method is applied on and the one provided in parameters).
 AttributeIdentifier concatenate(AttributeIdentifier attrId)
          

Supported API: false
 boolean equals(Object object)
          Indicates whether some other object is "equal to" this one.
 TypeInstanceIdentifier getContext()
          Gets the object for the association that plays role: context.
 DefinitionIdentifier getDefinitionIdentifier()
          Returns the definition identifier of the instance.
 String getInstanceDataExternalForm()
          Return a string that represents the Instance Data's external form.
 InstanceIdentifier getInstanceIdentifier()
          Returns the instance identifier of the instance.
 AssociationIdentifier getInverse()
          

Supported API: false
 AssociationIdentifier getInverse(AssociationIdentifier context, AssociationTypeIdentifier definition, int depth)
          

Supported API: false
protected  TypeInstanceIdentifier getInverseContext(AssociationIdentifier context)
           
 String getPersistenceIdentifier()
          This method will return a simplified external form which represents the persistence information of this TypeInstanceIdentifier.
 TypeInstanceIdentifier getRootContext()
          

Supported API: false
 TypeInstanceIdentifier getTail()
          

Supported API: false
 TypeInstanceIdentifier getTrueContext()
          

Supported API: false
 AttributeIdentifier getWithNewContext(TypeInstanceIdentifier context)
          

Supported API: false
 ElementIdentifier getWithNewInstanceIdentifier(InstanceIdentifier instanceId)
          Returns a copy of this attribute identifier with a new instance identifier.
 AttributeIdentifier getWithTailContext()
          

Supported API: false
 AttributeIdentifier getWithTrimmedContext(AssociationIdentifier context)
          

Supported API: false
 int hashCode()
          Returns a hash code value for the object.
 void initialize(ElementIdentifier elementId)
           
 boolean isEquivalentAttributeIdentifier(AttributeIdentifier attrId)
          

Supported API: false
 boolean isEquivalentTypeInstanceIdentifier(TypeInstanceIdentifier typeInstanceId)
          

Supported API: false
 boolean isInitialized()
          Returns true when this instance contains an instance identifier.
 boolean isInstanceOf(DefinitionIdentifier defnId)
          This method will return true when this instance is an instance of a specific definition identifier.
 AttributeIdentifier merge(AttributeIdentifier attrId)
          

Supported API: false
 TypeInstance newTypeInstance()
           
 void readExternal(ObjectInput in)
           
 ElementIdentifier replace(TypeInstanceIdentifier old_id, TypeInstanceIdentifier new_id)
          

Supported API: false
 AssociationIdentifier replaceTail(TypeInstanceIdentifier new_tail)
          

Supported API: true
 String toExternalForm()
          Return the external form of this Identifier.
 TypeInstanceIdentifier trim(AssociationIdentifier context)
          

Supported API: false
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

associationTypeId

protected AssociationTypeIdentifier associationTypeId

contextId

protected TypeInstanceIdentifier contextId

instanceId

protected InstanceIdentifier instanceId

externalForm

private String externalForm

hashcode

private int hashcode

_serialVersion

private static final String _serialVersion
See Also:
Constant Field Values
Constructor Detail

IeAssociationIdentifier

public IeAssociationIdentifier()
default no arg constructor to be used for de-serialization


IeAssociationIdentifier

public IeAssociationIdentifier(AssociationTypeIdentifier associationTypeId,
                               InstanceIdentifier instanceId,
                               TypeInstanceIdentifier contextId)
Parameters:
associationTypeId -
instanceId -
contextId -
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

compareFreshness

public int compareFreshness(ElementIdentifier elementId)
                     throws ComparisonImpossibleException
The compareFreshness() method computes the "freshness distance" between the two objects (the one the method is applied on and the one provided in parameters). The return value is an integer representing this distance. A value of zero means that the objects are equals in terms of freshness. ComparisonImpossibleException will be thrown if the two objects can not be compared.

Specified by:
compareFreshness in interface ElementIdentifier
Parameters:
elementId -
Returns:
int
Throws:
ComparisonImpossibleException

concatenate

public AttributeIdentifier concatenate(AttributeIdentifier attrId)
                                throws IllegalFormatException
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
concatenate in interface AssociationIdentifier
Parameters:
attrId -
Returns:
AttributeIdentifier
Throws:
IllegalFormatException

getInverse

public AssociationIdentifier getInverse()
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
getInverse in interface AssociationIdentifier
Returns:
AssociationIdentifier

getInverse

public AssociationIdentifier getInverse(AssociationIdentifier context,
                                        AssociationTypeIdentifier definition,
                                        int depth)
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
getInverse in interface AssociationIdentifier
Parameters:
context -
definition -
depth -
Returns:
AssociationIdentifier

getTrueContext

public TypeInstanceIdentifier getTrueContext()
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
getTrueContext in interface AssociationIdentifier
Returns:
TypeInstanceIdentifier

getWithNewContext

public AttributeIdentifier getWithNewContext(TypeInstanceIdentifier context)
Description copied from interface: AttributeIdentifier


Supported API: false

Specified by:
getWithNewContext in interface AttributeIdentifier
Parameters:
context -
Returns:
AttributeIdentifier

getWithTrimmedContext

public AttributeIdentifier getWithTrimmedContext(AssociationIdentifier context)
Description copied from interface: AttributeIdentifier


Supported API: false

Specified by:
getWithTrimmedContext in interface AttributeIdentifier
Parameters:
context -
Returns:
AttributeIdentifier

initialize

public void initialize(ElementIdentifier elementId)
Parameters:
elementId -

getWithNewInstanceIdentifier

public ElementIdentifier getWithNewInstanceIdentifier(InstanceIdentifier instanceId)
Returns a copy of this attribute identifier with a new instance identifier.

Specified by:
getWithNewInstanceIdentifier in interface ElementIdentifier
Parameters:
instanceId - The new instance identifier.
Returns:
A new attribute identifier.

isEquivalentAttributeIdentifier

public boolean isEquivalentAttributeIdentifier(AttributeIdentifier attrId)
Description copied from interface: AttributeIdentifier


Supported API: false

Specified by:
isEquivalentAttributeIdentifier in interface AttributeIdentifier
Parameters:
attrId -
Returns:
boolean

isEquivalentTypeInstanceIdentifier

public boolean isEquivalentTypeInstanceIdentifier(TypeInstanceIdentifier typeInstanceId)
Description copied from interface: TypeInstanceIdentifier


Supported API: false

Specified by:
isEquivalentTypeInstanceIdentifier in interface TypeInstanceIdentifier
Parameters:
typeInstanceId -
Returns:
boolean

merge

public AttributeIdentifier merge(AttributeIdentifier attrId)
                          throws IllegalFormatException
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
merge in interface AssociationIdentifier
Parameters:
attrId -
Returns:
AttributeIdentifier
Throws:
IllegalFormatException

newTypeInstance

public TypeInstance newTypeInstance()
Returns:
TypeInstance

trim

public TypeInstanceIdentifier trim(AssociationIdentifier context)
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
trim in interface AssociationIdentifier
Parameters:
context -
Returns:
TypeInstanceIdentifier

getInverseContext

protected TypeInstanceIdentifier getInverseContext(AssociationIdentifier context)
Parameters:
context -
Returns:
TypeInstanceIdentifier

getPersistenceIdentifier

public String getPersistenceIdentifier()
This method will return a simplified external form which represents the persistence information of this TypeInstanceIdentifier. The format will be either "OR:class:oid" or "VR:class:branchid".

Specified by:
getPersistenceIdentifier in interface TypeInstanceIdentifier
Returns:
String

getContext

public TypeInstanceIdentifier getContext()
Gets the object for the association that plays role: context.

Specified by:
getContext in interface AttributeIdentifier
Returns:
TypeInstanceIdentifier

getDefinitionIdentifier

public DefinitionIdentifier getDefinitionIdentifier()
Returns the definition identifier of the instance.

Specified by:
getDefinitionIdentifier in interface ElementIdentifier
Returns:
DefinitionIdentifier

getInstanceIdentifier

public InstanceIdentifier getInstanceIdentifier()
Returns the instance identifier of the instance.

Specified by:
getInstanceIdentifier in interface ElementIdentifier
Returns:
InstanceIdentifier

isInitialized

public boolean isInitialized()
Returns true when this instance contains an instance identifier.

Specified by:
isInitialized in interface ElementIdentifier
Returns:
boolean

isInstanceOf

public boolean isInstanceOf(DefinitionIdentifier defnId)
This method will return true when this instance is an instance of a specific definition identifier.

Specified by:
isInstanceOf in interface ElementIdentifier
Parameters:
defnId -
Returns:
boolean

equals

public boolean equals(Object object)
Description copied from interface: Identifier
Indicates whether some other object is "equal to" this one.

Supported API: false

Specified by:
equals in interface Identifier

getInstanceDataExternalForm

public String getInstanceDataExternalForm()
Return a string that represents the Instance Data's external form. This is not a valid external form since it only contains the instance data portion of the whole chain.

Specified by:
getInstanceDataExternalForm in interface ElementIdentifier
Returns:
String

toExternalForm

public String toExternalForm()
Description copied from interface: Identifier
Return the external form of this Identifier.

Supported API: false

Specified by:
toExternalForm in interface Identifier
Returns:
String

hashCode

public int hashCode()
Description copied from interface: Identifier
Returns a hash code value for the object.

Supported API: false

Specified by:
hashCode in interface Identifier

getRootContext

public TypeInstanceIdentifier getRootContext()
Description copied from interface: AttributeIdentifier


Supported API: false

Specified by:
getRootContext in interface AttributeIdentifier
Returns:
TypeInstanceIdentifier

getWithTailContext

public AttributeIdentifier getWithTailContext()
Description copied from interface: AttributeIdentifier


Supported API: false

Specified by:
getWithTailContext in interface AttributeIdentifier
Returns:
AttributeIdentifier

replace

public ElementIdentifier replace(TypeInstanceIdentifier old_id,
                                 TypeInstanceIdentifier new_id)
                          throws IllegalFormatException
Description copied from interface: AttributeIdentifier


Supported API: false

Specified by:
replace in interface AttributeIdentifier
Parameters:
old_id -
new_id -
Returns:
ElementIdentifier
Throws:
IllegalFormatException

getTail

public TypeInstanceIdentifier getTail()
Description copied from interface: AssociationIdentifier


Supported API: false

Specified by:
getTail in interface AssociationIdentifier
Returns:
TypeInstanceIdentifier

replaceTail

public AssociationIdentifier replaceTail(TypeInstanceIdentifier new_tail)
Description copied from interface: AssociationIdentifier


Supported API: true

Specified by:
replaceTail in interface AssociationIdentifier
Parameters:
new_tail -
Returns:
AssociationIdentifier