com.infoengine.object
Class IeAttributeIdentifier

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

public class IeAttributeIdentifier
extends Object
implements AttributeIdentifier, Externalizable

See Also:
Serialized Form

Field Summary
private static String _serialVersion
           
protected  TypeInstanceIdentifier context
           
protected  DefinitionIdentifier definitionIdentifier
           
private  String externalForm
           
private  int hashcode
           
protected  InstanceIdentifier instanceIdentifier
           
private static String RESOURCE
           
 
Fields inherited from interface com.ptc.core.meta.common.Identifier
CONTEXT_SEPARATOR, INSTANCE_DATA_SEPARATOR, PROTOCOL_SEPARATOR
 
Constructor Summary
IeAttributeIdentifier()
          default no arg constructor to be used for de-serialization
IeAttributeIdentifier(TypeInstanceIdentifier context, AttributeTypeIdentifier defnId, InstanceIdentifier instanceId)
          Constructor.
 
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).
 boolean equals(Object object)
          Indicates whether some other object is "equal to" this one.
 TypeInstanceIdentifier getContext()
          Returns the type instance identifier associated with this attribute identifier.
 DefinitionIdentifier getDefinitionIdentifier()
          Returns the definition identifier associated with this attribute identifier.
 String getInstanceDataExternalForm()
          Return a string that represents the Instance Data's external form.
 InstanceIdentifier getInstanceIdentifier()
          Returns the instance identifier associated with this attribute identifier.
 TypeInstanceIdentifier getRootContext()
          

Supported API: false
 AttributeIdentifier getWithNewContext(TypeInstanceIdentifier ctx)
          

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 isInitialized()
          This method will return true when this ElementIdentifier instance contains a InstanceIdentifier.
 boolean isInstanceOf(DefinitionIdentifier defnId)
          Returns true if this attribute identifier is an instance of a specific definition identifier.
 void readExternal(ObjectInput in)
           
 ElementIdentifier replace(TypeInstanceIdentifier old_id, TypeInstanceIdentifier new_id)
          

Supported API: false
 String toExternalForm()
          Return the external form of this Identifier.
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

context

protected TypeInstanceIdentifier context

definitionIdentifier

protected DefinitionIdentifier definitionIdentifier

instanceIdentifier

protected InstanceIdentifier instanceIdentifier

externalForm

private String externalForm

hashcode

private int hashcode

_serialVersion

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

IeAttributeIdentifier

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


IeAttributeIdentifier

public IeAttributeIdentifier(TypeInstanceIdentifier context,
                             AttributeTypeIdentifier defnId,
                             InstanceIdentifier instanceId)
Constructor.

Parameters:
context -
defnId -
instanceId -
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

isEquivalentAttributeIdentifier

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


Supported API: false

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

getWithNewContext

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


Supported API: false

Specified by:
getWithNewContext in interface AttributeIdentifier
Parameters:
ctx -
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.

getWithTrimmedContext

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


Supported API: false

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

getContext

public TypeInstanceIdentifier getContext()
Returns the type instance identifier associated with this attribute identifier.

Specified by:
getContext in interface AttributeIdentifier
Returns:
The type instance identifier.

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 are not capable to be compared.

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

isInstanceOf

public boolean isInstanceOf(DefinitionIdentifier defnId)
Returns true if this attribute identifier is an instance of a specific definition identifier.

Specified by:
isInstanceOf in interface ElementIdentifier
Parameters:
defnId - The definition identifier.
Returns:
true if this attribute identifier is an instance of the specified definition identifier.

isInitialized

public boolean isInitialized()
This method will return true when this ElementIdentifier instance contains a InstanceIdentifier.

Specified by:
isInitialized in interface ElementIdentifier
Returns:
boolean

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

getDefinitionIdentifier

public DefinitionIdentifier getDefinitionIdentifier()
Returns the definition identifier associated with this attribute identifier.

Specified by:
getDefinitionIdentifier in interface ElementIdentifier
Returns:
The definition identifier.

getInstanceIdentifier

public InstanceIdentifier getInstanceIdentifier()
Returns the instance identifier associated with this attribute identifier.

Specified by:
getInstanceIdentifier in interface ElementIdentifier
Returns:
The instance identifier.

toExternalForm

public String toExternalForm()
Return the external form of this Identifier.

Specified by:
toExternalForm in interface Identifier
Returns:
String

equals

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

Specified by:
equals in interface Identifier
Parameters:
object -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code value for the object.

Specified by:
hashCode in interface Identifier
Returns:
int

toString

public String toString()

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