com.infoengine.object.factory
Class Element

java.lang.Object
  extended by com.infoengine.object.factory.Element
All Implemented Interfaces:
com.ptc.core.meta.common.Element, com.ptc.core.meta.container.common.AttributeContainer, com.ptc.core.meta.type.common.TypeInstance, java.io.Serializable, java.lang.Cloneable

public class Element
extends java.lang.Object
implements com.ptc.core.meta.type.common.TypeInstance, java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String IDENTIFIER_KEY
           
static java.lang.String PERSISTENCE_ID_KEY
           
static java.lang.String SELF_ASSOCIATION_ROLE
           
 
Constructor Summary
Element()
          Constructs an empty element.
Element(com.ptc.core.meta.container.common.AttributeContainer container)
          Constructs an element that wraps an existing attribute container.
Element(IeNode node)
          Constructs an element that wraps an existing IeNode.
Element(java.lang.String name)
          Constructs an element with a name but no initial value.
Element(java.lang.String name, Att data)
          Constructs an element with a name and initial value.
Element(com.ptc.core.meta.type.common.TypeInstance typeInstance)
          Constructs an element from a type instance.
Element(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
          Constructs an instance with a specific type instance identifier.
 
Method Summary
 void acceptChanges()
           
 void acceptDefaultContent()
          Changes all attributes with state of DEFAULT to state of NEW.
 void addAtt(Att attribute)
          Adds an attribute to the element.
 void addContentChangedListener(com.ptc.core.meta.container.common.ContentChangedListener listener)
           
 void addMeta(java.lang.String name, byte[] value)
          Adds a meta item with a byte array value to the element.
 void addMeta(java.lang.String name, java.util.Date value)
          Adds a meta item with a Date value to the element.
 void addMeta(java.lang.String name, java.lang.Number value)
          Adds a meta item with a Number value to the element.
 void addMeta(java.lang.String name, java.lang.String value)
          Adds a meta item with a String value to the element.
 void addReplacement(com.ptc.core.meta.common.ElementIdentifier old_id, com.ptc.core.meta.common.ElementIdentifier new_id)
           
 void clearReplacements()
           
 java.lang.Object clone()
          Returns a shallow copy of the element.
 com.ptc.core.meta.container.common.AttributeContainer clone(com.ptc.core.meta.common.AttributeTypeIdentifier[] filter, boolean compact)
           
 com.ptc.core.meta.container.common.AttributeContainer clone(boolean compact)
           
 com.ptc.core.meta.container.common.AttributeContainer cloneWithNewCenter(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
           
 com.ptc.core.meta.container.common.AttributeContainer cloneWithNewUninitializedIdentifiers(java.util.HashMap map)
           
 int compareFreshness(com.ptc.core.meta.common.Element element)
          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 containsMetaValue(java.lang.String name, java.lang.Object value)
          Determines whether the element contains a meta item with a specific name and value.
 boolean containsTii(com.ptc.core.meta.common.TypeInstanceIdentifier tii)
           
 com.ptc.core.meta.container.common.AttributeContainer[] decompose(boolean compact)
           
 Element deepClone()
          Returns a deep copy of the element.
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 com.ptc.core.meta.container.common.AttributeContainer[] extract(com.ptc.core.meta.common.TypeIdentifier typeId)
           
 com.ptc.core.meta.container.common.AttributeContainer[] extract(com.ptc.core.meta.common.TypeIdentifier typeId, boolean navigate)
           
 com.ptc.core.meta.container.common.AttributeContainer extract(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
           
 com.ptc.core.meta.container.common.AttributeContainer extract(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId, boolean navigate)
           
 com.ptc.core.meta.container.common.AttributeContainer[] extractCopies(com.ptc.core.meta.common.TypeIdentifier typeId, boolean navigate, boolean compact)
           
 com.ptc.core.meta.container.common.AttributeContainer extractCopy(com.ptc.core.meta.common.TypeInstanceIdentifier the_type_instance_identifier, com.ptc.core.meta.common.AttributeTypeIdentifier[] filter, boolean compact)
           
 com.ptc.core.meta.container.common.AttributeContainer extractCopy(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId, boolean navigate, boolean compact)
           
 com.ptc.core.meta.type.common.TypeInstance[] find(com.ptc.core.meta.common.TypeIdentifier target_type, com.ptc.core.meta.container.common.AttributeContainerSet criteria)
           
 java.lang.Object get(com.ptc.core.meta.common.AttributeIdentifier attrId)
          Returns the content associated with a specific attribute identifier.
 java.lang.Object get(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
          Returns the content associated with a specific attribute type identifier.
 com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeIdentifier typeId)
          Returns all Attribute Identifiers that match a specific attribute type identifier as the context from this container.
 com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeIdentifier typeId, com.ptc.core.meta.container.common.State state)
          Returns all Attribute Identifiers that match a specific attribute type identifier and state.
 com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
           
 com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId, com.ptc.core.meta.container.common.State state)
           
 Att getAtt(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
          Returns an attribute by attribute type identifier.
 Att getAtt(java.lang.String name)
          Returns an attribute by name.
 Att getAttByMeta(java.lang.String name, java.lang.Object value)
          Returns the attribute containing a specific metadata name and value.
 com.ptc.core.meta.container.common.AttributeContainer getAttributeContainer()
          Gets the attribute container associated with the instance.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers()
          Returns all AttributeIdentifiers from this container.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId)
          Returns all AttributeIdentifiers that a specific association context.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId, com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId, boolean isAbsolute)
           
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId, com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId, boolean isAbsolute, com.ptc.core.meta.container.common.State state)
           
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId, com.ptc.core.meta.container.common.State state)
           
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
          Returns all attribute identifiers matching this container's attribute type identifier.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId, com.ptc.core.meta.container.common.State state)
          Returns all AttributeIdentifiers that match this state and attribute type from this container.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.container.common.State state)
          Returns all AttributeIdentifiers that match this state from this container.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(java.lang.String logicalForm)
          Returns all AttributeIdentifiers from this container that are associated with a specific logical identifier.
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier the_type_instance_identifier)
           
 com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier the_type_instance_identifier, com.ptc.core.meta.container.common.State the_state)
           
 com.ptc.core.meta.common.AttributeTypeIdentifier[] getAttributeTypeIdentifiers()
          Returns all unique AttributeTypeIdentifiers from this container.
 com.ptc.core.meta.common.AttributeTypeIdentifier[] getAttributeTypeIdentifiers(java.lang.String logicalForm)
          Returns all unique AttributeTypeIdentifiers from this container that are associated with a specific logical identifier.
 com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AssociationIdentifier the_association_identifier, com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute)
           
 com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AssociationIdentifier the_association_identifier, com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute, com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container, com.ptc.core.meta.container.common.DescriptorContainer the_descriptor_container)
           
 com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
          Retrieves the attribute type summary for a specific attribute type identifier.
 com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier, com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container, com.ptc.core.meta.container.common.DescriptorContainer the_descriptor_container)
           
 com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(java.lang.String name)
          Retrieves the attribute type summary for a specific attribute identified by logical identifier.
 java.util.Enumeration getAtts()
          Returns the Info*Engine attribute objects currently assigned to this element.
 java.lang.String getClassName()
          Returns the class name currently assigned to the element.
 com.ptc.core.meta.container.common.ConstraintContainer getConstraintContainer()
          Returns the constraint container associated with this instance.
 com.ptc.core.meta.descriptor.common.DefinitionDescriptor getDescriptor(com.ptc.core.meta.common.DefinitionIdentifier defnId)
          Returns the descriptor for a specific definition identifier.
 com.ptc.core.meta.container.common.DescriptorContainer getDescriptorContainer()
          Returns the descriptor container associated with this instance.
 byte[] getErrorStream()
          Returns the contents of this element's error stream.
 java.lang.String getFti()
          Returns the Federation Type Identifier of the object represented by this element, if any.
 com.ptc.core.meta.common.ElementIdentifier getIdentifier()
          Returns the identifier of this object.
 java.lang.Object getInternal(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier)
           
 java.util.Map<java.lang.String,java.util.List> getMap()
          Makes a snapshot of this element representing it as a map of String to List of values.
 java.lang.Object getMeta(java.lang.String name)
          Returns the value of a meta item by name.
 java.util.Enumeration getMetaNames()
          Returns the names of all meta items associated with the element.
 java.util.Enumeration getMetaValues(java.lang.String name)
          Returns all of the values of a meta item associated with the element.
 java.lang.String getMimeType()
          Returns the MIME content type currently associated with this element.
 java.lang.String getName()
          Returns the name currently assigned to the element.
 IeNode getNode()
          Returns the element's internal node structure.
 java.lang.String getPersistenceIdentifier()
          Returns the persistence identifier associated with the object.
 java.util.HashMap getReplacements()
           
 java.lang.Object getSingle(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
          Returns the single content associated with a specific attribute type identifier.
 java.lang.Object getSingle(java.lang.String logicalForm)
          Returns the single content associated with a specific logical attribute identifier.
 com.ptc.core.meta.container.common.State getState(com.ptc.core.meta.common.AttributeIdentifier attrId)
          Returns the state of the content associated with a specific attribute identifier.
 com.ptc.core.meta.container.common.State getState(java.lang.String name)
          Returns the state of the value of an attribute that is retrieved by name, ignoring the case of the characters in the name.
 com.ptc.core.meta.container.common.State getStateAt(java.lang.String name, int index)
          Returns the state of a value at a specific index position of a multivalued attribute that is retrieved by name, ignoring the case of the characters in the name.
 byte[] getStream()
          Returns the contents of this element's stream.
 java.lang.String getUfid()
          Returns the Unique Federation Identifier of the object represented by this element, if any.
 java.lang.Object getValue(com.ptc.core.meta.common.AttributeIdentifier attrId)
          Returns the value of an attribute that is retrieved by attribute identifier.
 java.lang.Object getValue(java.lang.String name)
          Returns the value of an attribute that is retrieved by name, ignoring the case of the characters in the name.
 java.lang.Object getValueAt(java.lang.String name, int index)
          Returns the value at a specific index position of a multivalued attribute that is retrieved by name, ignoring the case of the characters in the name.
 int getValueCount(java.lang.String name)
          Returns the number of values contained in a possibly multivalued attribute that is identified by name, ignoring the case of the characters in the name.
 java.util.Vector getValues(java.lang.String name)
          Returns all of the values associated with an attribute that is retrieved by name.
 java.util.Vector getValues(java.lang.String name, boolean ignoreCase)
          Deprecated. Use one-argument signature instead.
 java.util.Vector getValuesIc(java.lang.String name)
          Deprecated. Use getValues instead.
 int hashCode()
          Returns a hash code value for the object.
 boolean isContentOfState(com.ptc.core.meta.common.AttributeIdentifier attrId, com.ptc.core.meta.container.common.State state)
          Returns true if the content associated with a specific attribute identifier is considered to be in a specific state.
 boolean isDefinitionEquivalent(com.ptc.core.meta.common.Element element)
          This method will return true when this com.ptc.core.meta.common.Element instance and the element passed from parameter have the same Definition.
 boolean isDirty()
          Returns true if any attributes have been modified, added, or removed.
 boolean isInitialized()
          This method will return true when this object is initialized.
 boolean isInstanceOf(com.ptc.core.meta.common.Definition definition)
          This method will return true when this com.ptc.core.meta.common.Element instance is an instance of the definition passed from the parameter.
 void merge(com.ptc.core.meta.container.common.AttributeContainer container)
          Combines the content of a specific attribute container with the contents of this container.
 void merge(com.ptc.core.meta.container.common.AttributeContainer container, com.ptc.core.meta.common.AssociationIdentifier relationship)
           
 void merge(com.ptc.core.meta.container.common.AttributeContainer container, com.ptc.core.meta.common.AssociationIdentifier relationship, boolean containerHasPriority)
           
 void merge(com.ptc.core.meta.container.common.AttributeContainer container, boolean containerHasPriority)
           
 void printTree()
          Prints the structure of the element to System.out.
 void purge(com.ptc.core.meta.common.AttributeIdentifier attrId)
           
 void purge(com.ptc.core.meta.common.AttributeIdentifier[] ais_to_purge)
           
 void purge(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
           
 void purge(com.ptc.core.meta.common.TypeIdentifier typeId)
           
 void purge(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
           
 void purge(com.ptc.core.meta.common.TypeInstanceIdentifier[] the_type_instance_identifiers)
           
 void purge(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId, com.ptc.core.meta.common.TypeInstanceIdentifier[] preserve)
           
 void purgeAllBut(com.ptc.core.meta.common.AttributeTypeIdentifier[] attrTypeIds)
          Removes all content with attribute types not included in a specific set of attribute types.
 void purgeAllContent()
          Removes all content from the type instance.
 void purgeDefaultContent()
          Removes all content that is considered DEFAULT.
 void purgeDuplicateContent()
           
 void purgeNonDirtyContent()
          Removes all content with state of DEFAULT, UNCHANGED, or UNINITIALIZED.
 com.ptc.core.meta.common.AttributeIdentifier put(com.ptc.core.meta.common.AttributeIdentifier attrId, java.lang.Object content)
          Stores content in the attribute container for a specific attribute identifier.
 com.ptc.core.meta.common.AttributeIdentifier put(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier, java.lang.Object the_content, com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container)
           
 void remove(com.ptc.core.meta.common.AttributeIdentifier attrId)
          Removes a specific attribute identifier and its content from the container.
 void remove(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier, com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container)
           
 void remove(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
          Remove all Attribute Identifiers and their content that have a specific attribute type identifier.
 void remove(com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier, com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container)
           
 void removeAtt(Att attribute)
          Removes a specific attribute from the element.
 void removeAtt(java.lang.String name)
          Removes a specific attribute from the element by name.
 void removeAtts()
          Remove all attributes from the element.
 void removeContentChangedListener(com.ptc.core.meta.container.common.ContentChangedListener listener)
           
 void removeMeta(java.lang.String name)
          Removes a meta item from the element.
 void removeMetaValue(java.lang.String name, java.lang.Object value)
          Removes a specific value of a meta item from the element.
 void replace(java.util.HashMap id_map)
           
 void replace(com.ptc.core.meta.common.TypeInstanceIdentifier old_id, com.ptc.core.meta.common.TypeInstanceIdentifier new_id)
           
 void replaceContent(com.ptc.core.meta.container.common.AttributeContainer newContent)
          Establishes specific content as the content of the type instance.
 void setAtt(Att attribute)
          Sets the attribute associated with the element.
 void setAttributeContainer(com.ptc.core.meta.container.common.AttributeContainer attributeContainer)
          Sets the attribute container associated with the instance.
 void setClassName(java.lang.String name)
          Sets the element's class name.
 void setConstraintContainer(com.ptc.core.meta.container.common.ConstraintContainer container)
          Sets the constraint container for this instance.
 void setDescriptorContainer(com.ptc.core.meta.container.common.DescriptorContainer container)
          Sets the descriptor container for this instance.
 void setErrorStream(byte[] data)
          Sets this element's error stream to the contents of a byte array.
 void setFti(java.lang.String fti)
          Sets the Federated Type Identifier of the object represented by this element.
 void setIdentifier(com.ptc.core.meta.common.ElementIdentifier identifier)
          Sets the identifier of this object.
 void setIdentifier(java.lang.String typeName, java.lang.String ufid)
          Sets the type instance identifier associated with this element.
 void setIdentifier(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
          Sets the type instance identifier associated with this element.
 void setMeta(java.lang.String name, byte[] value)
          Sets a meta item with a byte array value in the element.
 void setMeta(java.lang.String name, java.util.Date value)
          Sets a meta item with a Date value in the element.
 void setMeta(java.lang.String name, java.lang.Number value)
          Sets a meta item with a Number value in the element.
 void setMeta(java.lang.String name, java.lang.String value)
          Sets a meta item with a String value in the element.
 void setMimeType(java.lang.String contentType)
          Sets this element's MIME content type.
 void setName(java.lang.String name)
          Sets the element's name.
 void setPersistenceIdentifier(java.lang.String persistenceId)
          Sets the persistence identifier associated with the object.
 void setState(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier, com.ptc.core.meta.container.common.State the_state)
           
 void setStream(byte[] data)
          Sets this element's stream to the contents of a byte array.
 void setStream(java.io.File file)
          Sets this element's stream to the contents of a file.
 void setStream(java.lang.String data)
          Sets this element's stream to the contents of a string.
 void setUfid(java.lang.String ufid)
          Sets the Unique Federation Identifier of the object represented by this element.
 java.lang.String toString()
           
 void toXML(java.io.PrintWriter output)
          Writes an XML representation of the element to a PrintWriter.
 void toXML(java.io.PrintWriter output, boolean includeMeta)
          Writes an XML representation of the element to a PrintWriter.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IDENTIFIER_KEY

public static final java.lang.String IDENTIFIER_KEY
See Also:
Constant Field Values

PERSISTENCE_ID_KEY

public static final java.lang.String PERSISTENCE_ID_KEY
See Also:
Constant Field Values

SELF_ASSOCIATION_ROLE

public static final java.lang.String SELF_ASSOCIATION_ROLE
See Also:
Constant Field Values
Constructor Detail

Element

public Element()
Constructs an empty element.


Element

public Element(java.lang.String name,
               Att data)
Constructs an element with a name and initial value.

Parameters:
name - The name to be assigned to the element.
data - The initial value of the element.

Element

public Element(java.lang.String name)
Constructs an element with a name but no initial value.

Parameters:
name - The name to be assigned to the element.

Element

public Element(IeNode node)
Constructs an element that wraps an existing IeNode.

Parameters:
node - The IeNode object to be wrapped.

Element

public Element(com.ptc.core.meta.container.common.AttributeContainer container)
Constructs an element that wraps an existing attribute container.

Parameters:
container - The attribute container to be wrapped.

Element

public Element(com.ptc.core.meta.type.common.TypeInstance typeInstance)
Constructs an element from a type instance.

Parameters:
typeInstance - The type instance from which to construct the element.

Element

public Element(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
Constructs an instance with a specific type instance identifier.

Parameters:
typeInstanceId - The type instance identifier.
Method Detail

setIdentifier

public void setIdentifier(java.lang.String typeName,
                          java.lang.String ufid)
Sets the type instance identifier associated with this element.

Parameters:
typeName - The name of the type or class of the object represented by this element.
ufid - The Unique Federation Identifier of the object represented by this element.

getMap

public java.util.Map<java.lang.String,java.util.List> getMap()
Makes a snapshot of this element representing it as a map of String to List of values.

Returns:
Map

setIdentifier

public void setIdentifier(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
Sets the type instance identifier associated with this element.

Parameters:
typeInstanceId - The new type instance identifier

getUfid

public java.lang.String getUfid()
Returns the Unique Federation Identifier of the object represented by this element, if any.

Returns:
The UFID, or null if this object does not have a UFID.

setUfid

public void setUfid(java.lang.String ufid)
Sets the Unique Federation Identifier of the object represented by this element.

Parameters:
ufid - The new UFID.

getFti

public java.lang.String getFti()
Returns the Federation Type Identifier of the object represented by this element, if any.

Returns:
The FTI, or null if this object does not have an FTI.

setFti

public void setFti(java.lang.String fti)
Sets the Federated Type Identifier of the object represented by this element.

Parameters:
fti - The new FTI.

toXML

public void toXML(java.io.PrintWriter output)
Writes an XML representation of the element to a PrintWriter.

Parameters:
output - The PrintWriter on which to write the XML representation of the element.

toXML

public void toXML(java.io.PrintWriter output,
                  boolean includeMeta)
Writes an XML representation of the element to a PrintWriter.

Parameters:
output - The PrintWriter on which to write the XML representation of the element.
includeMeta - Specify true to include meta-information in the XML representation.

printTree

public void printTree()
Prints the structure of the element to System.out.


clone

public java.lang.Object clone()
Returns a shallow copy of the element.

Specified by:
clone in interface com.ptc.core.meta.container.common.AttributeContainer
Overrides:
clone in class java.lang.Object
Returns:
The shallow copy.

deepClone

public Element deepClone()
Returns a deep copy of the element.

Returns:
The deep copy.

getName

public java.lang.String getName()
Returns the name currently assigned to the element.

Returns:
The element's current name.

setName

public void setName(java.lang.String name)
Sets the element's name.

Parameters:
name - The element's new name.

getClassName

public java.lang.String getClassName()
Returns the class name currently assigned to the element.

Returns:
The element's current class name.

setClassName

public void setClassName(java.lang.String name)
Sets the element's class name.

Parameters:
name - The element's new class name.

setStream

public void setStream(byte[] data)
Sets this element's stream to the contents of a byte array.

Parameters:
data - The byte array that becomes the contents of the stream.

setStream

public void setStream(java.lang.String data)
Sets this element's stream to the contents of a string.

Parameters:
data - The string that becomes the contents of the stream.

setStream

public void setStream(java.io.File file)
               throws java.io.IOException
Sets this element's stream to the contents of a file.

Parameters:
file - The file that becomes the contents of the stream.
Throws:
java.io.IOException

getStream

public byte[] getStream()
Returns the contents of this element's stream.

Returns:
The contents of the element's stream.

setErrorStream

public void setErrorStream(byte[] data)
Sets this element's error stream to the contents of a byte array.

Parameters:
data - The byte array that becomes the contents of the error stream.

getErrorStream

public byte[] getErrorStream()
Returns the contents of this element's error stream.

Returns:
The contents of this element's error stream.

setMimeType

public void setMimeType(java.lang.String contentType)
Sets this element's MIME content type.

Parameters:
contentType - The MIME content type to associate with this element.

getMimeType

public java.lang.String getMimeType()
Returns the MIME content type currently associated with this element.

Returns:
The MIME content type

getAtts

public java.util.Enumeration getAtts()
Returns the Info*Engine attribute objects currently assigned to this element.

Returns:
The attribute objects currently associated with this element. Each object will be of type com.infoengine.object.factory.Att.

getAtt

public Att getAtt(java.lang.String name)
Returns an attribute by name.

Parameters:
name - The name of the attribute to be returned.
Returns:
The named attribute, or null if the attribute is not found in the element.

getAtt

public Att getAtt(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
Returns an attribute by attribute type identifier.

Parameters:
attrTypeId - The attribute type identifier of the attribute to be returned.
Returns:
The attribute, or null if the attribute is not found in the element.

getAttByMeta

public Att getAttByMeta(java.lang.String name,
                        java.lang.Object value)
Returns the attribute containing a specific metadata name and value.

Parameters:
name - The name of the metadata.
value - The value of the metadata.
Returns:
The attribute containing the metadata name/value pair, or null if no attribute contains the specified name/value pair.

getValue

public java.lang.Object getValue(java.lang.String name)
Returns the value of an attribute that is retrieved by name, ignoring the case of the characters in the name. If the attribute is multi-valued, the first value is returned.

Parameters:
name - The name of the attribute.
Returns:
The value of the attribute, or null if the attribute is not found in the element.

getValueAt

public java.lang.Object getValueAt(java.lang.String name,
                                   int index)
Returns the value at a specific index position of a multivalued attribute that is retrieved by name, ignoring the case of the characters in the name.

Parameters:
name - The name of the attribute.
index - The index of the value to retrieve.
Returns:
The value of the attribute, or null if the attribute is not found in the element or the index is greater than or equal to the number of values in the attribute.

getValueCount

public int getValueCount(java.lang.String name)
Returns the number of values contained in a possibly multivalued attribute that is identified by name, ignoring the case of the characters in the name.

Parameters:
name - The name of the attribute.
Returns:
The number of values held by the attribute.

getValue

public java.lang.Object getValue(com.ptc.core.meta.common.AttributeIdentifier attrId)
Returns the value of an attribute that is retrieved by attribute identifier. If the attribute is multi-valued, the first value is returned.

Parameters:
attrId - The attribute identifier.
Returns:
The value of the attribute, or null if the attribute is not found in the element.

getValuesIc

public java.util.Vector getValuesIc(java.lang.String name)
Deprecated. Use getValues instead.

Returns all of the values associated with an attribute that is retrieved by name. The name is not case sensitive.

Parameters:
name - The name of the attribute.
Returns:
All of the values associated with the attribute, or an empty vector if the attribute is not found in the element.

getValues

public java.util.Vector getValues(java.lang.String name)
Returns all of the values associated with an attribute that is retrieved by name. The name is not case sensitive.

Parameters:
name - The name of the attribute.
Returns:
All of the values associated with the attribute, or an empty vector if the attribute is not found in the element.

getValues

public java.util.Vector getValues(java.lang.String name,
                                  boolean ignoreCase)
Deprecated. Use one-argument signature instead.

Returns all of the values associated with an attribute that is retrieved by name.

Parameters:
name - The name of the attribute.
ignoreCase - true if attribute name should be matched by comparing in a way that is not case sensitive
Returns:
All of the values associated with the attribute, or an empty vector if the attribute is not found in the element.

setAtt

public void setAtt(Att attribute)
Sets the attribute associated with the element. If any attributes were set on the element previously, they are removed.

Parameters:
attribute - The new attribute to be associated with the element.

addAtt

public void addAtt(Att attribute)
Adds an attribute to the element.

Parameters:
attribute - The attribute to be added to the element.

removeAtt

public void removeAtt(Att attribute)
Removes a specific attribute from the element.

Parameters:
attribute - The attribute to be removed.

removeAtt

public void removeAtt(java.lang.String name)
Removes a specific attribute from the element by name.

Parameters:
name - The name of the attribute to be removed.

removeAtts

public void removeAtts()
Remove all attributes from the element.


containsMetaValue

public boolean containsMetaValue(java.lang.String name,
                                 java.lang.Object value)
Determines whether the element contains a meta item with a specific name and value.

Parameters:
name - The name of the meta.
value - The value of the meta.
Returns:
true if the element contains the specified meta item.

getMetaNames

public java.util.Enumeration getMetaNames()
Returns the names of all meta items associated with the element.

Returns:
The names of the meta items, or an empty enumeration if the element has no meta information associated with it.

getMetaValues

public java.util.Enumeration getMetaValues(java.lang.String name)
Returns all of the values of a meta item associated with the element.

Parameters:
name - The name of the meta item.
Returns:
The values of the meta item, or an empty enumeration if the meta item has no values, or the meta item is not found in the element.

getMeta

public java.lang.Object getMeta(java.lang.String name)
Returns the value of a meta item by name.

Parameters:
name - The name of the meta item to be returned.
Returns:
The value of the meta item, or null if the named item is not found in the element.

addMeta

public void addMeta(java.lang.String name,
                    java.lang.String value)
Adds a meta item with a String value to the element.

Parameters:
name - the name of the meta item.
value - the value of the meta item.

setMeta

public void setMeta(java.lang.String name,
                    java.lang.String value)
Sets a meta item with a String value in the element.

Parameters:
name - The name of the meta item.
value - The value of the meta item.

addMeta

public void addMeta(java.lang.String name,
                    java.util.Date value)
Adds a meta item with a Date value to the element.

Parameters:
name - the name of the meta item.
value - the value of the meta item.

setMeta

public void setMeta(java.lang.String name,
                    java.util.Date value)
Sets a meta item with a Date value in the element.

Parameters:
name - The name of the meta item.
value - The value of the meta item.

addMeta

public void addMeta(java.lang.String name,
                    java.lang.Number value)
Adds a meta item with a Number value to the element.

Parameters:
name - the name of the meta item.
value - the value of the meta item.

setMeta

public void setMeta(java.lang.String name,
                    java.lang.Number value)
Sets a meta item with a Number value in the element.

Parameters:
name - The name of the meta item.
value - The value of the meta item.

addMeta

public void addMeta(java.lang.String name,
                    byte[] value)
Adds a meta item with a byte array value to the element.

Parameters:
name - the name of the meta item.
value - the value of the meta item.

setMeta

public void setMeta(java.lang.String name,
                    byte[] value)
Sets a meta item with a byte array value in the element.

Parameters:
name - The name of the meta item.
value - The value of the meta item.

removeMeta

public void removeMeta(java.lang.String name)
Removes a meta item from the element.

Parameters:
name - The name of the meta item to remove.

removeMetaValue

public void removeMetaValue(java.lang.String name,
                            java.lang.Object value)
Removes a specific value of a meta item from the element.

Parameters:
name - The name of the meta item containing the value to remove.
value - The value to be removed.

getNode

public IeNode getNode()
Returns the element's internal node structure.

Returns:
The internal IeNode object.

getAttributeContainer

public com.ptc.core.meta.container.common.AttributeContainer getAttributeContainer()
Gets the attribute container associated with the instance.

Returns:
The attribute container.

setAttributeContainer

public void setAttributeContainer(com.ptc.core.meta.container.common.AttributeContainer attributeContainer)
Sets the attribute container associated with the instance.

Parameters:
attributeContainer - The attribute container.

getPersistenceIdentifier

public java.lang.String getPersistenceIdentifier()
Returns the persistence identifier associated with the object.

Specified by:
getPersistenceIdentifier in interface com.ptc.core.meta.type.common.TypeInstance
Returns:
The persistence identifier.

setPersistenceIdentifier

public void setPersistenceIdentifier(java.lang.String persistenceId)
Sets the persistence identifier associated with the object.

Parameters:
persistenceId - The new persistence identifier.

compareFreshness

public int compareFreshness(com.ptc.core.meta.common.Element element)
                     throws com.ptc.core.meta.common.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.

Specified by:
compareFreshness in interface com.ptc.core.meta.common.Element
Parameters:
element - The element to compare against this instance.
Returns:
The freshness distance.
Throws:
com.ptc.core.meta.common.ComparisonImpossibleException - if the two objects are not capable to be compared.

isInstanceOf

public boolean isInstanceOf(com.ptc.core.meta.common.Definition definition)
This method will return true when this com.ptc.core.meta.common.Element instance is an instance of the definition passed from the parameter.

Specified by:
isInstanceOf in interface com.ptc.core.meta.common.Element
Parameters:
definition - The definition for which to determine whether this object is an instance
Returns:
true if this object is an instance of the definition.

isDefinitionEquivalent

public boolean isDefinitionEquivalent(com.ptc.core.meta.common.Element element)
This method will return true when this com.ptc.core.meta.common.Element instance and the element passed from parameter have the same Definition.

Specified by:
isDefinitionEquivalent in interface com.ptc.core.meta.common.Element
Parameters:
element - The instance to compare.
Returns:
true if the specified element has a definition equivalent to the definition of this object.

equals

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

Specified by:
equals in interface com.ptc.core.meta.common.Element
Overrides:
equals in class java.lang.Object
Parameters:
the_object - The other object to test for equality with this one.
Returns:
true if the other object equals this one.

hashCode

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

Specified by:
hashCode in interface com.ptc.core.meta.common.Element
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code of this object.

isInitialized

public boolean isInitialized()
This method will return true when this object is initialized. The object is initialized if its identifier is non-null.

Specified by:
isInitialized in interface com.ptc.core.meta.common.Element
Returns:
true if this object is initialized.

getIdentifier

public com.ptc.core.meta.common.ElementIdentifier getIdentifier()
Returns the identifier of this object.

Specified by:
getIdentifier in interface com.ptc.core.meta.common.Element
Specified by:
getIdentifier in interface com.ptc.core.meta.container.common.AttributeContainer
Returns:
The element identifier.

setIdentifier

public void setIdentifier(com.ptc.core.meta.common.ElementIdentifier identifier)
Sets the identifier of this object.

Specified by:
setIdentifier in interface com.ptc.core.meta.common.Element
Parameters:
identifier - The new identifier.

getAttributeTypeIdentifiers

public com.ptc.core.meta.common.AttributeTypeIdentifier[] getAttributeTypeIdentifiers()
Returns all unique AttributeTypeIdentifiers from this container.

Specified by:
getAttributeTypeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Returns:
The unique AttributeTypeIdentifiers

getAttributeTypeIdentifiers

public com.ptc.core.meta.common.AttributeTypeIdentifier[] getAttributeTypeIdentifiers(java.lang.String logicalForm)
Returns all unique AttributeTypeIdentifiers from this container that are associated with a specific logical identifier.

Specified by:
getAttributeTypeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
logicalForm - The logical identifier
Returns:
The unique AttributeTypeIdentifiers

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers()
Returns all AttributeIdentifiers from this container.

Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Returns:
The AttributeIdentifiers

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(java.lang.String logicalForm)
Returns all AttributeIdentifiers from this container that are associated with a specific logical identifier.

Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
logicalForm - The logical identifier
Returns:
The AttributeIdentifiers

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.container.common.State state)
Returns all AttributeIdentifiers that match this state from this container.

Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
state -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
Returns all attribute identifiers matching this container's attribute type identifier.

Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId - The attribute type identifier that identifies the type for the attribute identifier.
Returns:
The matching attribute identifiers.

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId,
                                                                              com.ptc.core.meta.container.common.State state)
Returns all AttributeIdentifiers that match this state and attribute type from this container.

Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId -
state -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId)
Returns all AttributeIdentifiers that a specific association context.

Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
associationId -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId,
                                                                              com.ptc.core.meta.container.common.State state)
Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
associationId -
state -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId,
                                                                              com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId,
                                                                              boolean isAbsolute)
Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
associationId -
attrTypeId -
isAbsolute -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.AssociationIdentifier associationId,
                                                                              com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId,
                                                                              boolean isAbsolute,
                                                                              com.ptc.core.meta.container.common.State state)
Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
associationId -
attrTypeId -
isAbsolute -
state -
Returns:
AttributeIdentifier[]

getAssociationIdentifiers

public com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
Specified by:
getAssociationIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
Returns:
AssociationIdentifier[]

getAssociationIdentifiers

public com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId,
                                                                                  com.ptc.core.meta.container.common.State state)
Specified by:
getAssociationIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
state -
Returns:
AssociationIdentifier[]

getAssociationIdentifiers

public com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeIdentifier typeId)
Returns all Attribute Identifiers that match a specific attribute type identifier as the context from this container.

Specified by:
getAssociationIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeId -
Returns:
AssociationIdentifier[]

getAssociationIdentifiers

public com.ptc.core.meta.common.AssociationIdentifier[] getAssociationIdentifiers(com.ptc.core.meta.common.TypeIdentifier typeId,
                                                                                  com.ptc.core.meta.container.common.State state)
Returns all Attribute Identifiers that match a specific attribute type identifier and state.

Specified by:
getAssociationIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeId -
state -
Returns:
AssociationIdentifier[]

get

public java.lang.Object get(com.ptc.core.meta.common.AttributeIdentifier attrId)
Returns the content associated with a specific attribute identifier. The return type should be one of the data content wrappers.

Specified by:
get in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrId - The identifier of the attribute to be returned.
Returns:
The attribute value.

get

public java.lang.Object get(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
Returns the content associated with a specific attribute type identifier. If there's only one attribute identifier associated with this attribute type identifier, the return type should be one of the data content wrappers. Otherwise, if more than one attribute identifier is associated, the return type should be an array of the data content wrappers.

Specified by:
get in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId - The identifier of the attribute type to be returned.
Returns:
The attribute value.

getSingle

public java.lang.Object getSingle(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
Returns the single content associated with a specific attribute type identifier. This will return only a single Object, even if there is more than one content for the attribute type identifier.

Specified by:
getSingle in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId - The identifier of the attribute to be returned.
Returns:
The attribute value.

getSingle

public java.lang.Object getSingle(java.lang.String logicalForm)
Returns the single content associated with a specific logical attribute identifier. This will return only a single Object, even if there is more than one content for the attribute type identifier.

Specified by:
getSingle in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
logicalForm - The logical identifier of the attribute to be returned.
Returns:
The attribute value.

put

public com.ptc.core.meta.common.AttributeIdentifier put(com.ptc.core.meta.common.AttributeIdentifier attrId,
                                                        java.lang.Object content)
                                                 throws com.ptc.core.meta.container.common.IllegalContentException,
                                                        com.ptc.core.meta.container.common.ConstraintException
Stores content in the attribute container for a specific attribute identifier.

Specified by:
put in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrId - The identifier of the attribute.
content - The value of the attribute.
Returns:
The identifier of the attribute.
Throws:
com.ptc.core.meta.container.common.IllegalContentException
com.ptc.core.meta.container.common.ConstraintException

remove

public void remove(com.ptc.core.meta.common.AttributeIdentifier attrId)
            throws com.ptc.core.meta.container.common.ConstraintException
Removes a specific attribute identifier and its content from the container.

Specified by:
remove in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrId - The identifier of the attribute to be removed.
Throws:
com.ptc.core.meta.container.common.ConstraintException

remove

public void remove(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
            throws com.ptc.core.meta.container.common.ConstraintException
Remove all Attribute Identifiers and their content that have a specific attribute type identifier.

Specified by:
remove in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId - The attribute type identifier of the attrributes to be removed
Throws:
com.ptc.core.meta.container.common.ConstraintException

getDescriptor

public com.ptc.core.meta.descriptor.common.DefinitionDescriptor getDescriptor(com.ptc.core.meta.common.DefinitionIdentifier defnId)
Returns the descriptor for a specific definition identifier. If there's no descriptor container associated, null is returned.

Specified by:
getDescriptor in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
defnId - The identifier of the descriptor to be returned.
Returns:
The descriptor.

getAttributeTypeSummary

public com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
Retrieves the attribute type summary for a specific attribute type identifier.

Specified by:
getAttributeTypeSummary in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId - The attribute type identifier for which to retrieve a summary.
Returns:
The summary.

getAttributeTypeSummary

public com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(java.lang.String name)
Retrieves the attribute type summary for a specific attribute identified by logical identifier.

Parameters:
name - The attribute name for which to retrieve a summary.
Returns:
The summary.

isDirty

public boolean isDirty()
Returns true if any attributes have been modified, added, or removed.

Specified by:
isDirty in interface com.ptc.core.meta.container.common.AttributeContainer
Returns:
true if any attributes have been modified, added, or removed.

isContentOfState

public boolean isContentOfState(com.ptc.core.meta.common.AttributeIdentifier attrId,
                                com.ptc.core.meta.container.common.State state)
Returns true if the content associated with a specific attribute identifier is considered to be in a specific state.

Specified by:
isContentOfState in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrId - The identifier of the attribute to be tested.
state - The state to test the attribute against.
Returns:
true if the attribute content is in the specified state.

getState

public com.ptc.core.meta.container.common.State getState(com.ptc.core.meta.common.AttributeIdentifier attrId)
Returns the state of the content associated with a specific attribute identifier.

Specified by:
getState in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrId - The identifier of the attribute for which to return state.
Returns:
The state of the attribute.

getState

public com.ptc.core.meta.container.common.State getState(java.lang.String name)
Returns the state of the value of an attribute that is retrieved by name, ignoring the case of the characters in the name. If the attribute is multi-valued, the state of the first value is returned.

Parameters:
name - The name of the attribute.
Returns:
The state of the attribute value

getStateAt

public com.ptc.core.meta.container.common.State getStateAt(java.lang.String name,
                                                           int index)
Returns the state of a value at a specific index position of a multivalued attribute that is retrieved by name, ignoring the case of the characters in the name.

Parameters:
name - The name of the attribute.
index - The index of the value for which to retrieve state.
Returns:
The state of the value, or null if the attribute is not found in the element or the index is greater than or equal to the number of values in the attribute.

acceptDefaultContent

public void acceptDefaultContent()
Changes all attributes with state of DEFAULT to state of NEW.

Specified by:
acceptDefaultContent in interface com.ptc.core.meta.container.common.AttributeContainer

clone

public com.ptc.core.meta.container.common.AttributeContainer clone(boolean compact)
Specified by:
clone in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
compact -
Returns:
AttributeContainer

cloneWithNewCenter

public com.ptc.core.meta.container.common.AttributeContainer cloneWithNewCenter(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
Specified by:
cloneWithNewCenter in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
Returns:
AttributeContainer

merge

public void merge(com.ptc.core.meta.container.common.AttributeContainer container)
Combines the content of a specific attribute container with the contents of this container.

Specified by:
merge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
container - The container whose contents will be combined with the contents of this one.

merge

public void merge(com.ptc.core.meta.container.common.AttributeContainer container,
                  com.ptc.core.meta.common.AssociationIdentifier relationship)
Specified by:
merge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
container -
relationship -

merge

public void merge(com.ptc.core.meta.container.common.AttributeContainer container,
                  boolean containerHasPriority)
Specified by:
merge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
container -
containerHasPriority -

merge

public void merge(com.ptc.core.meta.container.common.AttributeContainer container,
                  com.ptc.core.meta.common.AssociationIdentifier relationship,
                  boolean containerHasPriority)
Specified by:
merge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
container -
relationship -
containerHasPriority -

extract

public com.ptc.core.meta.container.common.AttributeContainer extract(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
Specified by:
extract in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
Returns:
AttributeContainer

extract

public com.ptc.core.meta.container.common.AttributeContainer[] extract(com.ptc.core.meta.common.TypeIdentifier typeId)
Specified by:
extract in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeId -
Returns:
AttributeContainer[]

extract

public com.ptc.core.meta.container.common.AttributeContainer extract(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId,
                                                                     boolean navigate)
Specified by:
extract in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
navigate -
Returns:
AttributeContainer

extract

public com.ptc.core.meta.container.common.AttributeContainer[] extract(com.ptc.core.meta.common.TypeIdentifier typeId,
                                                                       boolean navigate)
Specified by:
extract in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeId -
navigate -
Returns:
AttributeContainer[]

extractCopy

public com.ptc.core.meta.container.common.AttributeContainer extractCopy(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId,
                                                                         boolean navigate,
                                                                         boolean compact)
Specified by:
extractCopy in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
navigate -
compact -
Returns:
AttributeContainer

extractCopies

public com.ptc.core.meta.container.common.AttributeContainer[] extractCopies(com.ptc.core.meta.common.TypeIdentifier typeId,
                                                                             boolean navigate,
                                                                             boolean compact)
Specified by:
extractCopies in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeId -
navigate -
compact -
Returns:
AttributeContainer[]

purge

public void purge(com.ptc.core.meta.common.AttributeIdentifier attrId)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrId -

purge

public void purge(com.ptc.core.meta.common.AttributeTypeIdentifier attrTypeId)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeId -

purge

public void purge(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -

purge

public void purge(com.ptc.core.meta.common.TypeInstanceIdentifier typeInstanceId,
                  com.ptc.core.meta.common.TypeInstanceIdentifier[] preserve)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeInstanceId -
preserve -

purge

public void purge(com.ptc.core.meta.common.TypeIdentifier typeId)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
typeId -

purgeDefaultContent

public void purgeDefaultContent()
Removes all content that is considered DEFAULT.

Specified by:
purgeDefaultContent in interface com.ptc.core.meta.container.common.AttributeContainer

purgeNonDirtyContent

public void purgeNonDirtyContent()
Removes all content with state of DEFAULT, UNCHANGED, or UNINITIALIZED.

Specified by:
purgeNonDirtyContent in interface com.ptc.core.meta.container.common.AttributeContainer

purgeDuplicateContent

public void purgeDuplicateContent()
Specified by:
purgeDuplicateContent in interface com.ptc.core.meta.container.common.AttributeContainer

purgeAllContent

public void purgeAllContent()
Removes all content from the type instance.

Specified by:
purgeAllContent in interface com.ptc.core.meta.container.common.AttributeContainer

purgeAllBut

public void purgeAllBut(com.ptc.core.meta.common.AttributeTypeIdentifier[] attrTypeIds)
Removes all content with attribute types not included in a specific set of attribute types.

Specified by:
purgeAllBut in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
attrTypeIds - The attribute types to be retained.

replaceContent

public void replaceContent(com.ptc.core.meta.container.common.AttributeContainer newContent)
Establishes specific content as the content of the type instance.

Specified by:
replaceContent in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
newContent - The new content.

addContentChangedListener

public void addContentChangedListener(com.ptc.core.meta.container.common.ContentChangedListener listener)
Specified by:
addContentChangedListener in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
listener -

removeContentChangedListener

public void removeContentChangedListener(com.ptc.core.meta.container.common.ContentChangedListener listener)
Specified by:
removeContentChangedListener in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
listener -

decompose

public com.ptc.core.meta.container.common.AttributeContainer[] decompose(boolean compact)
Specified by:
decompose in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
compact -
Returns:
AttributeContainer[]

getConstraintContainer

public com.ptc.core.meta.container.common.ConstraintContainer getConstraintContainer()
Returns the constraint container associated with this instance.

Specified by:
getConstraintContainer in interface com.ptc.core.meta.container.common.AttributeContainer
Returns:
The current constraint container.

setConstraintContainer

public void setConstraintContainer(com.ptc.core.meta.container.common.ConstraintContainer container)
Sets the constraint container for this instance.

Specified by:
setConstraintContainer in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
container - The new constraint container.

getDescriptorContainer

public com.ptc.core.meta.container.common.DescriptorContainer getDescriptorContainer()
Returns the descriptor container associated with this instance.

Specified by:
getDescriptorContainer in interface com.ptc.core.meta.container.common.AttributeContainer
Returns:
The current descriptor container.

setDescriptorContainer

public void setDescriptorContainer(com.ptc.core.meta.container.common.DescriptorContainer container)
Sets the descriptor container for this instance.

Specified by:
setDescriptorContainer in interface com.ptc.core.meta.container.common.AttributeContainer
Parameters:
container - The new descriptor container.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public com.ptc.core.meta.container.common.AttributeContainer clone(com.ptc.core.meta.common.AttributeTypeIdentifier[] filter,
                                                                   boolean compact)
Specified by:
clone in interface com.ptc.core.meta.container.common.AttributeContainer

cloneWithNewUninitializedIdentifiers

public com.ptc.core.meta.container.common.AttributeContainer cloneWithNewUninitializedIdentifiers(java.util.HashMap map)
Specified by:
cloneWithNewUninitializedIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer

extractCopy

public com.ptc.core.meta.container.common.AttributeContainer extractCopy(com.ptc.core.meta.common.TypeInstanceIdentifier the_type_instance_identifier,
                                                                         com.ptc.core.meta.common.AttributeTypeIdentifier[] filter,
                                                                         boolean compact)
Specified by:
extractCopy in interface com.ptc.core.meta.container.common.AttributeContainer

replace

public void replace(com.ptc.core.meta.common.TypeInstanceIdentifier old_id,
                    com.ptc.core.meta.common.TypeInstanceIdentifier new_id)
Specified by:
replace in interface com.ptc.core.meta.container.common.AttributeContainer

addReplacement

public void addReplacement(com.ptc.core.meta.common.ElementIdentifier old_id,
                           com.ptc.core.meta.common.ElementIdentifier new_id)
Specified by:
addReplacement in interface com.ptc.core.meta.container.common.AttributeContainer

getReplacements

public java.util.HashMap getReplacements()
Specified by:
getReplacements in interface com.ptc.core.meta.container.common.AttributeContainer

clearReplacements

public void clearReplacements()
Specified by:
clearReplacements in interface com.ptc.core.meta.container.common.AttributeContainer

getInternal

public java.lang.Object getInternal(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier)
Specified by:
getInternal in interface com.ptc.core.meta.container.common.AttributeContainer

put

public com.ptc.core.meta.common.AttributeIdentifier put(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier,
                                                        java.lang.Object the_content,
                                                        com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container)
                                                 throws com.ptc.core.meta.container.common.IllegalContentException,
                                                        com.ptc.core.meta.container.common.ConstraintException
Specified by:
put in interface com.ptc.core.meta.container.common.AttributeContainer
Throws:
com.ptc.core.meta.container.common.IllegalContentException
com.ptc.core.meta.container.common.ConstraintException

remove

public void remove(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier,
                   com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container)
            throws com.ptc.core.meta.container.common.ConstraintException
Specified by:
remove in interface com.ptc.core.meta.container.common.AttributeContainer
Throws:
com.ptc.core.meta.container.common.ConstraintException

remove

public void remove(com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier,
                   com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container)
            throws com.ptc.core.meta.container.common.ConstraintException
Specified by:
remove in interface com.ptc.core.meta.container.common.AttributeContainer
Throws:
com.ptc.core.meta.container.common.ConstraintException

getAttributeTypeSummary

public com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier,
                                                                                       com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container,
                                                                                       com.ptc.core.meta.container.common.DescriptorContainer the_descriptor_container)
Specified by:
getAttributeTypeSummary in interface com.ptc.core.meta.container.common.AttributeContainer

getAttributeTypeSummary

public com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AssociationIdentifier the_association_identifier,
                                                                                       com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier,
                                                                                       boolean is_absolute)
Specified by:
getAttributeTypeSummary in interface com.ptc.core.meta.container.common.AttributeContainer

getAttributeTypeSummary

public com.ptc.core.meta.container.common.AttributeTypeSummary getAttributeTypeSummary(com.ptc.core.meta.common.AssociationIdentifier the_association_identifier,
                                                                                       com.ptc.core.meta.common.AttributeTypeIdentifier the_attribute_type_identifier,
                                                                                       boolean is_absolute,
                                                                                       com.ptc.core.meta.container.common.ConstraintContainer the_constraint_container,
                                                                                       com.ptc.core.meta.container.common.DescriptorContainer the_descriptor_container)
Specified by:
getAttributeTypeSummary in interface com.ptc.core.meta.container.common.AttributeContainer

acceptChanges

public void acceptChanges()
Specified by:
acceptChanges in interface com.ptc.core.meta.container.common.AttributeContainer

setState

public void setState(com.ptc.core.meta.common.AttributeIdentifier the_attribute_identifier,
                     com.ptc.core.meta.container.common.State the_state)
Specified by:
setState in interface com.ptc.core.meta.container.common.AttributeContainer

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier the_type_instance_identifier)
Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer

getAttributeIdentifiers

public com.ptc.core.meta.common.AttributeIdentifier[] getAttributeIdentifiers(com.ptc.core.meta.common.TypeInstanceIdentifier the_type_instance_identifier,
                                                                              com.ptc.core.meta.container.common.State the_state)
Specified by:
getAttributeIdentifiers in interface com.ptc.core.meta.container.common.AttributeContainer

find

public com.ptc.core.meta.type.common.TypeInstance[] find(com.ptc.core.meta.common.TypeIdentifier target_type,
                                                         com.ptc.core.meta.container.common.AttributeContainerSet criteria)
Specified by:
find in interface com.ptc.core.meta.type.common.TypeInstance

purge

public void purge(com.ptc.core.meta.common.TypeInstanceIdentifier[] the_type_instance_identifiers)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer

containsTii

public boolean containsTii(com.ptc.core.meta.common.TypeInstanceIdentifier tii)
Specified by:
containsTii in interface com.ptc.core.meta.container.common.AttributeContainer

purge

public void purge(com.ptc.core.meta.common.AttributeIdentifier[] ais_to_purge)
Specified by:
purge in interface com.ptc.core.meta.container.common.AttributeContainer

replace

public void replace(java.util.HashMap id_map)
Specified by:
replace in interface com.ptc.core.meta.container.common.AttributeContainer