com.infoengine.object.factory
Class Element

java.lang.Object
  extended bycom.infoengine.object.factory.Element
All Implemented Interfaces:
AttributeContainer, Cloneable, Element, Serializable, TypeInstance

public class Element
extends Object
implements TypeInstance, Cloneable, Serializable

See Also:
Serialized Form

Field Summary
private  ElementIdentifier identifier
           
static String IDENTIFIER_KEY
           
private  IeNode myNode
           
static String PERSISTENCE_ID_KEY
           
static String SELF_ASSOCIATION_ROLE
           
 
Constructor Summary
Element()
          Constructs an empty element.
Element(AttributeContainer container)
          Constructs an element that wraps an existing attribute container.
Element(IeNode node)
          Constructs an element that wraps an existing IeNode.
Element(String name)
          Constructs an element with a name but no initial value.
Element(String name, Att data)
          Constructs an element with a name and initial value.
Element(TypeInstance typeInstance)
          Constructs an element from a type instance.
Element(TypeInstanceIdentifier typeInstanceId)
          Constructs an instance with a specific type instance identifier.
 
Method Summary
 void acceptChanges()
          

Supported API: false
 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(ContentChangedListener listener)
          

Supported API: false
 void addMeta(String name, byte[] value)
          Adds a meta item with a byte array value to the element.
 void addMeta(String name, Date value)
          Adds a meta item with a Date value to the element.
 void addMeta(String name, Number value)
          Adds a meta item with a Number value to the element.
 void addMeta(String name, String value)
          Adds a meta item with a String value to the element.
 void addReplacement(ElementIdentifier old_id, ElementIdentifier new_id)
          

Supported API: false
 void clearReplacements()
          

Supported API: false
 Object clone()
          Returns a shallow copy of the element.
 AttributeContainer clone(AttributeTypeIdentifier[] filter, boolean compact)
          

Supported API: false
 AttributeContainer clone(boolean compact)
          

Supported API: true
 AttributeContainer cloneWithNewCenter(TypeInstanceIdentifier typeInstanceId)
          

Supported API: false
 AttributeContainer cloneWithNewUninitializedIdentifiers(HashMap map)
          

Supported API: false
 int compareFreshness(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(String name, Object value)
          Determines whether the element contains a meta item with a specific name and value.
 AttributeContainer[] decompose(boolean compact)
          

Supported API: false
 Element deepClone()
          Returns a deep copy of the element.
 boolean equals(Object object)
          Indicates whether some other object is "equal to" this one.
 AttributeContainer[] extract(TypeIdentifier typeId)
          

Supported API: false
 AttributeContainer[] extract(TypeIdentifier typeId, boolean navigate)
          

Supported API: false
 AttributeContainer extract(TypeInstanceIdentifier typeInstanceId)
          

Supported API: false
 AttributeContainer extract(TypeInstanceIdentifier typeInstanceId, boolean navigate)
          

Supported API: false
 AttributeContainer[] extractCopies(TypeIdentifier typeId, boolean navigate, boolean compact)
          

Supported API: false
 AttributeContainer extractCopy(TypeInstanceIdentifier the_type_instance_identifier, AttributeTypeIdentifier[] filter, boolean compact)
          

Supported API: false
 AttributeContainer extractCopy(TypeInstanceIdentifier typeInstanceId, boolean navigate, boolean compact)
          

Supported API: false
 Object get(AttributeIdentifier attrId)
          Returns the content associated with a specific attribute identifier.
 Object get(AttributeTypeIdentifier attrTypeId)
          Returns the content associated with a specific attribute type identifier.
 AssociationIdentifier[] getAssociationIdentifiers(TypeIdentifier typeId)
          Returns all Attribute Identifiers that match a specific attribute type identifier as the context from this container.
 AssociationIdentifier[] getAssociationIdentifiers(TypeIdentifier typeId, State state)
          Returns all Attribute Identifiers that match a specific attribute type identifier and state.
 AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier typeInstanceId)
          Returns all current AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier.
 AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier typeInstanceId, State state)
          Returns all AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier and that match the given state.
 Att getAtt(AttributeTypeIdentifier attrTypeId)
          Returns an attribute by attribute type identifier.
 Att getAtt(String name)
          Returns an attribute by name.
 Att getAttByMeta(String name, Object value)
          Returns the attribute containing a specific metadata name and value.
 AttributeContainer getAttributeContainer()
          Gets the attribute container associated with the instance.
 AttributeIdentifier[] getAttributeIdentifiers()
          Returns all AttributeIdentifiers from this container.
 AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId)
          Returns all AttributeIdentifiers that a specific association context.
 AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId, AttributeTypeIdentifier attrTypeId, boolean isAbsolute)
          Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier.
 AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId, AttributeTypeIdentifier attrTypeId, boolean isAbsolute, State state)
          Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier and that match the given state.
 AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId, State state)
          Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier that match the given state.
 AttributeIdentifier[] getAttributeIdentifiers(AttributeTypeIdentifier attrTypeId)
          Returns all attribute identifiers matching this container's attribute type identifier.
 AttributeIdentifier[] getAttributeIdentifiers(AttributeTypeIdentifier attrTypeId, State state)
          Returns all AttributeIdentifiers that match this state and attribute type from this container.
 AttributeIdentifier[] getAttributeIdentifiers(State state)
          Returns all AttributeIdentifiers that match this state from this container.
 AttributeIdentifier[] getAttributeIdentifiers(String logicalForm)
          Returns all AttributeIdentifiers from this container that are associated with a specific logical identifier.
 AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier)
          Returns all current AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier.
 AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier, State the_state)
          Returns all AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier that match the given state.
 AttributeTypeIdentifier[] getAttributeTypeIdentifiers()
          Returns all unique AttributeTypeIdentifiers from this container.
 AttributeTypeIdentifier[] getAttributeTypeIdentifiers(String logicalForm)
          Returns all unique AttributeTypeIdentifiers from this container that are associated with a specific logical identifier.
 AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute)
          Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
 AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute, ConstraintContainer the_constraint_container, DescriptorContainer the_descriptor_container)
          Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
 AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier attrTypeId)
          Retrieves the attribute type summary for a specific attribute type identifier.
 AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer the_constraint_container, DescriptorContainer the_descriptor_container)
          Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
 AttributeTypeSummary getAttributeTypeSummary(String name)
          Retrieves the attribute type summary for a specific attribute identified by logical identifier.
 Enumeration getAtts()
          Returns the Info*Engine attribute objects currently assigned to this element.
 String getClassName()
          Returns the class name currently assigned to the element.
 ConstraintContainer getConstraintContainer()
          Returns the constraint container associated with this instance.
 DefinitionDescriptor getDescriptor(DefinitionIdentifier defnId)
          Returns the descriptor for a specific definition identifier.
 DescriptorContainer getDescriptorContainer()
          Returns the descriptor container associated with this instance.
 byte[] getErrorStream()
          Returns the contents of this element's error stream.
 String getFti()
          Returns the Federation Type Identifier of the object represented by this element, if any.
 ElementIdentifier getIdentifier()
          Returns the identifier of this object.
 Object getInternal(AttributeIdentifier the_attribute_identifier)
          

Supported API: false
 Object getMeta(String name)
          Returns the value of a meta item by name.
 Enumeration getMetaNames()
          Returns the names of all meta items associated with the element.
 Enumeration getMetaValues(String name)
          Returns all of the values of a meta item associated with the element.
 String getMimeType()
          Returns the MIME content type currently associated with this element.
 String getName()
          Returns the name currently assigned to the element.
 IeNode getNode()
          Returns the element's internal node structure.
 String getPersistenceIdentifier()
          Returns the persistence identifier associated with the object.
 HashMap getReplacements()
          

Supported API: false
 Object getSingle(AttributeTypeIdentifier attrTypeId)
          Returns the single content associated with a specific attribute type identifier.
 Object getSingle(String logicalForm)
          Returns the single content associated with a specific logical attribute identifier.
 State getState(AttributeIdentifier attrId)
          Returns the state of the content associated with a specific attribute identifier.
 State getState(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.
 State getStateAt(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.
 String getUfid()
          Returns the Unique Federation Identifier of the object represented by this element, if any.
 Object getValue(AttributeIdentifier attrId)
          Returns the value of an attribute that is retrieved by attribute identifier.
 Object getValue(String name)
          Returns the value of an attribute that is retrieved by name, ignoring the case of the characters in the name.
 Object getValueAt(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(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.
 Vector getValues(String name)
          Returns all of the values associated with an attribute that is retrieved by name.
 Vector getValues(String name, boolean ignoreCase)
          Deprecated. Use one-argument signature instead.
 Vector getValuesIc(String name)
          Deprecated. Use getValues instead.
 int hashCode()
          Returns a hash code value for the object.
 boolean isContentOfState(AttributeIdentifier attrId, State state)
          Returns true if the content associated with a specific attribute identifier is considered to be in a specific state.
 boolean isDefinitionEquivalent(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(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.
private  boolean isSelfAssociation(AttributeTypeIdentifier attrTypeId)
           
 void merge(AttributeContainer container)
          Combines the content of a specific attribute container with the contents of this container.
 void merge(AttributeContainer container, AssociationIdentifier relationship)
          

Supported API: false
 void merge(AttributeContainer container, AssociationIdentifier relationship, boolean containerHasPriority)
          

Supported API: false
 void merge(AttributeContainer container, boolean containerHasPriority)
          

Supported API: false
protected static IeNode newStructure()
          Builds a new element structure with no initial name or value.
protected static IeNode newStructure(String name)
          Builds a new element structure with a specific name and no initial value.
protected static IeNode newStructure(String name, Att attribute)
          Builds a new element structure with a specific name and value.
 void printTree()
          Prints the structure of the element to System.out.
 void purge(AttributeIdentifier attrId)
          

Supported API: false
 void purge(AttributeTypeIdentifier attrTypeId)
          

Supported API: false
 void purge(TypeIdentifier typeId)
          

Supported API: false
 void purge(TypeInstanceIdentifier typeInstanceId)
          

Supported API: false
 void purge(TypeInstanceIdentifier[] the_type_instance_identifiers)
          

Supported API: false
 void purge(TypeInstanceIdentifier typeInstanceId, TypeInstanceIdentifier[] preserve)
          

Supported API: false
 void purgeAllBut(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()
          

Supported API: false
 void purgeNonDirtyContent()
          Removes all content with state of DEFAULT, UNCHANGED, or UNINITIALIZED.
 AttributeIdentifier put(AttributeIdentifier attrId, Object content)
          Stores content in the attribute container for a specific attribute identifier.
 AttributeIdentifier put(AttributeIdentifier the_attribute_identifier, Object the_content, ConstraintContainer the_constraint_container)
          Stores the given content in this container, in assocation with the given AttributeIdentifier.
 void remove(AttributeIdentifier attrId)
          Removes a specific attribute identifier and its content from the container.
 void remove(AttributeIdentifier the_attribute_identifier, ConstraintContainer the_constraint_container)
          Deletes the content associated with the given AttributeIdentifier from this container.
 void remove(AttributeTypeIdentifier attrTypeId)
          Remove all Attribute Identifiers and their content that have a specific attribute type identifier.
 void remove(AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer the_constraint_container)
          Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container.
 void removeAtt(Att attribute)
          Removes a specific attribute from the element.
 void removeAtt(String name)
          Removes a specific attribute from the element by name.
 void removeAtts()
          Remove all attributes from the element.
 void removeContentChangedListener(ContentChangedListener listener)
          

Supported API: false
 void removeMeta(String name)
          Removes a meta item from the element.
 void removeMetaValue(String name, Object value)
          Removes a specific value of a meta item from the element.
 void replace(TypeInstanceIdentifier old_id, TypeInstanceIdentifier new_id)
          

Supported API: false
 void replaceContent(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(AttributeContainer attributeContainer)
          Sets the attribute container associated with the instance.
 void setClassName(String name)
          Sets the element's class name.
 void setConstraintContainer(ConstraintContainer container)
          Sets the constraint container for this instance.
 void setDescriptorContainer(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(String fti)
          Sets the Federated Type Identifier of the object represented by this element.
 void setIdentifier(ElementIdentifier identifier)
          Sets the identifier of this object.
 void setIdentifier(String typeName, String ufid)
          Sets the type instance identifier associated with this element.
 void setIdentifier(TypeInstanceIdentifier typeInstanceId)
          Sets the type instance identifier associated with this element.
 void setMeta(String name, byte[] value)
          Sets a meta item with a byte array value in the element.
 void setMeta(String name, Date value)
          Sets a meta item with a Date value in the element.
 void setMeta(String name, Number value)
          Sets a meta item with a Number value in the element.
 void setMeta(String name, String value)
          Sets a meta item with a String value in the element.
 void setMimeType(String contentType)
          Sets this element's MIME content type.
 void setName(String name)
          Sets the element's name.
protected  void setNode(IeNode node)
          Sets the element's internal node structure.
 void setPersistenceIdentifier(String persistenceId)
          Sets the persistence identifier associated with the object.
 void setState(AttributeIdentifier the_attribute_identifier, State the_state)
          Sets the state associated with the given AttributeIdentifier in this container.
 void setStream(byte[] data)
          Sets this element's stream to the contents of a byte array.
 void setStream(File file)
          Sets this element's stream to the contents of a file.
 void setStream(String data)
          Sets this element's stream to the contents of a string.
 void setUfid(String ufid)
          Sets the Unique Federation Identifier of the object represented by this element.
 String toString()
           
 void toXML(PrintWriter output)
          Writes an XML representation of the element to a PrintWriter.
 void toXML(PrintWriter output, boolean includeMeta)
          Writes an XML representation of the element to a PrintWriter.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IDENTIFIER_KEY

public static final String IDENTIFIER_KEY
See Also:
Constant Field Values

PERSISTENCE_ID_KEY

public static final String PERSISTENCE_ID_KEY
See Also:
Constant Field Values

identifier

private ElementIdentifier identifier

myNode

private IeNode myNode

SELF_ASSOCIATION_ROLE

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

Element

public Element()
Constructs an empty element.


Element

public Element(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(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(AttributeContainer container)
Constructs an element that wraps an existing attribute container.

Parameters:
container - The attribute container to be wrapped.

Element

public Element(TypeInstance typeInstance)
Constructs an element from a type instance.

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

Element

public Element(TypeInstanceIdentifier typeInstanceId)
Constructs an instance with a specific type instance identifier.

Parameters:
typeInstanceId - The type instance identifier.
Method Detail

setIdentifier

public void setIdentifier(String typeName,
                          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.

setIdentifier

public void setIdentifier(TypeInstanceIdentifier typeInstanceId)
Sets the type instance identifier associated with this element.

Parameters:
typeInstanceId - The new type instance identifier

getUfid

public 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(String ufid)
Sets the Unique Federation Identifier of the object represented by this element.

Parameters:
ufid - The new UFID.

getFti

public 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(String fti)
Sets the Federated Type Identifier of the object represented by this element.

Parameters:
fti - The new FTI.

toXML

public void toXML(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(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 Object clone()
Returns a shallow copy of the element.

Specified by:
clone in interface AttributeContainer
Returns:
The shallow copy.

deepClone

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

Returns:
The deep copy.

getName

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

Returns:
The element's current name.

setName

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

Parameters:
name - The element's new name.

getClassName

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

Returns:
The element's current class name.

setClassName

public void setClassName(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(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(File file)
               throws IOException
Sets this element's stream to the contents of a file.

Parameters:
file - The file that becomes the contents of the stream.
Throws:
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(String contentType)
Sets this element's MIME content type.

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

getMimeType

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

Returns:
The MIME content type

getAtts

public 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(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(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(String name,
                        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 Object getValue(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 Object getValueAt(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(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 Object getValue(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 Vector getValuesIc(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 Vector getValues(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 Vector getValues(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(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(String name,
                                 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 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 Enumeration getMetaValues(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 Object getMeta(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(String name,
                    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(String name,
                    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(String name,
                    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(String name,
                    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(String name,
                    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(String name,
                    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(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(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(String name)
Removes a meta item from the element.

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

removeMetaValue

public void removeMetaValue(String name,
                            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.

newStructure

protected static IeNode newStructure(String name,
                                     Att attribute)
Builds a new element structure with a specific name and value.

Parameters:
name - The name of the new element.
attribute - The value of the new element.
Returns:
The new element.

newStructure

protected static IeNode newStructure(String name)
Builds a new element structure with a specific name and no initial value.

Parameters:
name - The name of the new element.
Returns:
The new element.

newStructure

protected static IeNode newStructure()
Builds a new element structure with no initial name or value.

Returns:
The new element.

getNode

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

Returns:
The internal IeNode object.

setNode

protected void setNode(IeNode node)
Sets the element's internal node structure.

Parameters:
node - The new internal IeNode object.

getAttributeContainer

public AttributeContainer getAttributeContainer()
Gets the attribute container associated with the instance.

Returns:
The attribute container.

setAttributeContainer

public void setAttributeContainer(AttributeContainer attributeContainer)
Sets the attribute container associated with the instance.

Parameters:
attributeContainer - The attribute container.

getPersistenceIdentifier

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

Specified by:
getPersistenceIdentifier in interface TypeInstance
Returns:
The persistence identifier.

setPersistenceIdentifier

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

Parameters:
persistenceId - The new persistence identifier.

compareFreshness

public int compareFreshness(Element element)
                     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.

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

isInstanceOf

public boolean isInstanceOf(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 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(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 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(Object object)
Indicates whether some other object is "equal to" this one.

Specified by:
equals in interface Element
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 Element
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 Element
Returns:
true if this object is initialized.

getIdentifier

public ElementIdentifier getIdentifier()
Returns the identifier of this object.

Specified by:
getIdentifier in interface Element
Returns:
The element identifier.

setIdentifier

public void setIdentifier(ElementIdentifier identifier)
Sets the identifier of this object.

Specified by:
setIdentifier in interface Element
Parameters:
identifier - The new identifier.

getAttributeTypeIdentifiers

public AttributeTypeIdentifier[] getAttributeTypeIdentifiers()
Returns all unique AttributeTypeIdentifiers from this container.

Specified by:
getAttributeTypeIdentifiers in interface AttributeContainer
Returns:
The unique AttributeTypeIdentifiers

getAttributeTypeIdentifiers

public AttributeTypeIdentifier[] getAttributeTypeIdentifiers(String logicalForm)
Returns all unique AttributeTypeIdentifiers from this container that are associated with a specific logical identifier.

Specified by:
getAttributeTypeIdentifiers in interface AttributeContainer
Parameters:
logicalForm - The logical identifier
Returns:
The unique AttributeTypeIdentifiers

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers()
Returns all AttributeIdentifiers from this container.

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Returns:
The AttributeIdentifiers

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(String logicalForm)
Returns all AttributeIdentifiers from this container that are associated with a specific logical identifier.

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
logicalForm - The logical identifier
Returns:
The AttributeIdentifiers

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(State state)
Returns all AttributeIdentifiers that match this state from this container.

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
state -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

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

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
attrTypeId - The attribute type identifier that identifies the type for the attribute identifier.
Returns:
The matching attribute identifiers.

getAttributeIdentifiers

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

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
attrTypeId -
state -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId)
Returns all AttributeIdentifiers that a specific association context.

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
associationId -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId,
                                                     State state)
Description copied from interface: AttributeContainer
Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier that match the given state. If the given state is null, returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier. Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
associationId -
state -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId,
                                                     AttributeTypeIdentifier attrTypeId,
                                                     boolean isAbsolute)
Description copied from interface: AttributeContainer
Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier. If 'is_absolute' is true, then the given AttributeTypeIdentifier is assumed to be defined in the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. Otherwise, a new AttributeTypeIdentifier is constructed by merging the given AttributeTypeIdentifier onto the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier with matching AttributeTypeIdentifiers for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
associationId -
attrTypeId -
isAbsolute -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier associationId,
                                                     AttributeTypeIdentifier attrTypeId,
                                                     boolean isAbsolute,
                                                     State state)
Description copied from interface: AttributeContainer
Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier and that match the given state. If 'is_absolute' is true, then the given AttributeTypeIdentifier is assumed to be defined in the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. Otherwise, a new AttributeTypeIdentifier is constructed by merging the given AttributeTypeIdentifier onto the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. If the given state is null, returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier. Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
associationId -
attrTypeId -
isAbsolute -
state -
Returns:
AttributeIdentifier[]

getAssociationIdentifiers

public AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier typeInstanceId)
Description copied from interface: AttributeContainer
Returns all current AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier. (Does not include AssociationIdentifiers for which the state is State.DELETED.) (Does not include AssociationIdentifiers for which the state is State.DEFAULT, unless there are no other AssociationIdentifiers with matching AssociationTypeIdentifiers in the container for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAssociationIdentifiers in interface AttributeContainer
Parameters:
typeInstanceId -
Returns:
AssociationIdentifier[]

getAssociationIdentifiers

public AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier typeInstanceId,
                                                         State state)
Description copied from interface: AttributeContainer
Returns all AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier and that match the given state. If the given state is null, returns all AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier. Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAssociationIdentifiers in interface AttributeContainer
Parameters:
typeInstanceId -
state -
Returns:
AssociationIdentifier[]

getAssociationIdentifiers

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

Specified by:
getAssociationIdentifiers in interface AttributeContainer
Parameters:
typeId -
Returns:
AssociationIdentifier[]

getAssociationIdentifiers

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

Specified by:
getAssociationIdentifiers in interface AttributeContainer
Parameters:
typeId -
state -
Returns:
AssociationIdentifier[]

get

public Object get(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 AttributeContainer
Parameters:
attrId - The identifier of the attribute to be returned.
Returns:
The attribute value.

get

public Object get(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 AttributeContainer
Parameters:
attrTypeId - The identifier of the attribute type to be returned.
Returns:
The attribute value.

getSingle

public Object getSingle(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 AttributeContainer
Parameters:
attrTypeId - The identifier of the attribute to be returned.
Returns:
The attribute value.

getSingle

public Object getSingle(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 AttributeContainer
Parameters:
logicalForm - The logical identifier of the attribute to be returned.
Returns:
The attribute value.

put

public AttributeIdentifier put(AttributeIdentifier attrId,
                               Object content)
                        throws IllegalContentException,
                               ConstraintException
Stores content in the attribute container for a specific attribute identifier.

Specified by:
put in interface AttributeContainer
Parameters:
attrId - The identifier of the attribute.
content - The value of the attribute.
Returns:
The identifier of the attribute.
Throws:
IllegalContentException
ConstraintException

remove

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

Specified by:
remove in interface AttributeContainer
Parameters:
attrId - The identifier of the attribute to be removed.
Throws:
ConstraintException

remove

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

Specified by:
remove in interface AttributeContainer
Parameters:
attrTypeId - The attribute type identifier of the attrributes to be removed
Throws:
ConstraintException

getDescriptor

public DefinitionDescriptor getDescriptor(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 AttributeContainer
Parameters:
defnId - The identifier of the descriptor to be returned.
Returns:
The descriptor.

getAttributeTypeSummary

public AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier attrTypeId)
Retrieves the attribute type summary for a specific attribute type identifier.

Specified by:
getAttributeTypeSummary in interface AttributeContainer
Parameters:
attrTypeId - The attribute type identifier for which to retrieve a summary.
Returns:
The summary.

getAttributeTypeSummary

public AttributeTypeSummary getAttributeTypeSummary(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 AttributeContainer
Returns:
true if any attributes have been modified, added, or removed.

isContentOfState

public boolean isContentOfState(AttributeIdentifier attrId,
                                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 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 State getState(AttributeIdentifier attrId)
Returns the state of the content associated with a specific attribute identifier.

Specified by:
getState in interface AttributeContainer
Parameters:
attrId - The identifier of the attribute for which to return state.
Returns:
The state of the attribute.

getState

public State getState(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 State getStateAt(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 AttributeContainer

clone

public AttributeContainer clone(boolean compact)
Description copied from interface: AttributeContainer


Supported API: true

Specified by:
clone in interface AttributeContainer
Parameters:
compact -
Returns:
AttributeContainer

cloneWithNewCenter

public AttributeContainer cloneWithNewCenter(TypeInstanceIdentifier typeInstanceId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
cloneWithNewCenter in interface AttributeContainer
Parameters:
typeInstanceId -
Returns:
AttributeContainer

merge

public void merge(AttributeContainer container)
Combines the content of a specific attribute container with the contents of this container.

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

merge

public void merge(AttributeContainer container,
                  AssociationIdentifier relationship)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
merge in interface AttributeContainer
Parameters:
container -
relationship -

merge

public void merge(AttributeContainer container,
                  boolean containerHasPriority)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
merge in interface AttributeContainer
Parameters:
container -
containerHasPriority -

merge

public void merge(AttributeContainer container,
                  AssociationIdentifier relationship,
                  boolean containerHasPriority)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
merge in interface AttributeContainer
Parameters:
container -
relationship -
containerHasPriority -

extract

public AttributeContainer extract(TypeInstanceIdentifier typeInstanceId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extract in interface AttributeContainer
Parameters:
typeInstanceId -
Returns:
AttributeContainer

extract

public AttributeContainer[] extract(TypeIdentifier typeId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extract in interface AttributeContainer
Parameters:
typeId -
Returns:
AttributeContainer[]

extract

public AttributeContainer extract(TypeInstanceIdentifier typeInstanceId,
                                  boolean navigate)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extract in interface AttributeContainer
Parameters:
typeInstanceId -
navigate -
Returns:
AttributeContainer

extract

public AttributeContainer[] extract(TypeIdentifier typeId,
                                    boolean navigate)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extract in interface AttributeContainer
Parameters:
typeId -
navigate -
Returns:
AttributeContainer[]

extractCopy

public AttributeContainer extractCopy(TypeInstanceIdentifier typeInstanceId,
                                      boolean navigate,
                                      boolean compact)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extractCopy in interface AttributeContainer
Parameters:
typeInstanceId -
navigate -
compact -
Returns:
AttributeContainer

extractCopies

public AttributeContainer[] extractCopies(TypeIdentifier typeId,
                                          boolean navigate,
                                          boolean compact)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extractCopies in interface AttributeContainer
Parameters:
typeId -
navigate -
compact -
Returns:
AttributeContainer[]

purge

public void purge(AttributeIdentifier attrId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purge in interface AttributeContainer
Parameters:
attrId -

purge

public void purge(AttributeTypeIdentifier attrTypeId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purge in interface AttributeContainer
Parameters:
attrTypeId -

purge

public void purge(TypeInstanceIdentifier typeInstanceId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purge in interface AttributeContainer
Parameters:
typeInstanceId -

purge

public void purge(TypeInstanceIdentifier typeInstanceId,
                  TypeInstanceIdentifier[] preserve)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purge in interface AttributeContainer
Parameters:
typeInstanceId -
preserve -

purge

public void purge(TypeIdentifier typeId)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purge in interface AttributeContainer
Parameters:
typeId -

purgeDefaultContent

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

Specified by:
purgeDefaultContent in interface AttributeContainer

purgeNonDirtyContent

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

Specified by:
purgeNonDirtyContent in interface AttributeContainer

purgeDuplicateContent

public void purgeDuplicateContent()
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purgeDuplicateContent in interface AttributeContainer

purgeAllContent

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

Specified by:
purgeAllContent in interface AttributeContainer

purgeAllBut

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

Specified by:
purgeAllBut in interface AttributeContainer
Parameters:
attrTypeIds - The attribute types to be retained.

replaceContent

public void replaceContent(AttributeContainer newContent)
Establishes specific content as the content of the type instance.

Specified by:
replaceContent in interface AttributeContainer
Parameters:
newContent - The new content.

addContentChangedListener

public void addContentChangedListener(ContentChangedListener listener)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
addContentChangedListener in interface AttributeContainer
Parameters:
listener -

removeContentChangedListener

public void removeContentChangedListener(ContentChangedListener listener)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
removeContentChangedListener in interface AttributeContainer
Parameters:
listener -

decompose

public AttributeContainer[] decompose(boolean compact)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
decompose in interface AttributeContainer
Parameters:
compact -
Returns:
AttributeContainer[]

getConstraintContainer

public ConstraintContainer getConstraintContainer()
Returns the constraint container associated with this instance.

Specified by:
getConstraintContainer in interface AttributeContainer
Returns:
The current constraint container.

setConstraintContainer

public void setConstraintContainer(ConstraintContainer container)
Sets the constraint container for this instance.

Specified by:
setConstraintContainer in interface AttributeContainer
Parameters:
container - The new constraint container.

getDescriptorContainer

public DescriptorContainer getDescriptorContainer()
Returns the descriptor container associated with this instance.

Specified by:
getDescriptorContainer in interface AttributeContainer
Returns:
The current descriptor container.

setDescriptorContainer

public void setDescriptorContainer(DescriptorContainer container)
Sets the descriptor container for this instance.

Specified by:
setDescriptorContainer in interface AttributeContainer
Parameters:
container - The new descriptor container.

isSelfAssociation

private boolean isSelfAssociation(AttributeTypeIdentifier attrTypeId)

toString

public String toString()

clone

public AttributeContainer clone(AttributeTypeIdentifier[] filter,
                                boolean compact)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
clone in interface AttributeContainer
Parameters:
filter -
compact -
Returns:
AttributeContainer

cloneWithNewUninitializedIdentifiers

public AttributeContainer cloneWithNewUninitializedIdentifiers(HashMap map)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
cloneWithNewUninitializedIdentifiers in interface AttributeContainer
Parameters:
map -
Returns:
AttributeContainer

extractCopy

public AttributeContainer extractCopy(TypeInstanceIdentifier the_type_instance_identifier,
                                      AttributeTypeIdentifier[] filter,
                                      boolean compact)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
extractCopy in interface AttributeContainer
Parameters:
the_type_instance_identifier -
filter -
compact -
Returns:
AttributeContainer

replace

public void replace(TypeInstanceIdentifier old_id,
                    TypeInstanceIdentifier new_id)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
replace in interface AttributeContainer
Parameters:
old_id -
new_id -

addReplacement

public void addReplacement(ElementIdentifier old_id,
                           ElementIdentifier new_id)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
addReplacement in interface AttributeContainer
Parameters:
old_id -
new_id -

getReplacements

public HashMap getReplacements()
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
getReplacements in interface AttributeContainer
Returns:
HashMap

clearReplacements

public void clearReplacements()
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
clearReplacements in interface AttributeContainer

getInternal

public Object getInternal(AttributeIdentifier the_attribute_identifier)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
getInternal in interface AttributeContainer
Parameters:
the_attribute_identifier -
Returns:
Object

put

public AttributeIdentifier put(AttributeIdentifier the_attribute_identifier,
                               Object the_content,
                               ConstraintContainer the_constraint_container)
                        throws IllegalContentException,
                               ConstraintException
Description copied from interface: AttributeContainer
Stores the given content in this container, in assocation with the given AttributeIdentifier. If the given AttributeIdentifier does not already exist in the container, and the given content is null, then the state associated with the given AttributeIdentifier is set to State.UNINTIALIZED. If the given AttributeIdentifier does not already exist in the container, and the given content is not null, then the state associated with the given AttributeIdentifier is set to State.New. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.UNINTIALIZED, the associated state becomes State.NEW. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.UNCHANGED, the associated state becomes State.CHANGED. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.DELETED, the associated state becomes State.CHANGED. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.DEFAULT, the associated state becomes State.NEW. Returns the actual Attributeidentifier used to store the content. This will be different from the given AttributeIdentifier in the case where the previous state associated with the given AttributeIdentifier was State.DEFAULT and in the case where equivalent AttributeIdentifier(s) may already be present in the AttributeContainer. In all cases, the returned AttributeIdentifier represents the most accurate and efficient AttributeIdentifier to be used for future access to the stored content. Throws IllegalContentException if the content is an AttributeContainerFunction and the function is recursive. (The function has the given AttributeIdentifier or the AttributeTypeIdentifier corresponding to the given AttributeIdentifier as one of its arguments.) Throws ConstraintException if adding/changing the given content violates one or more of the constraints in the associated ConstraintContainer.

Supported API: true

Specified by:
put in interface AttributeContainer
Parameters:
the_attribute_identifier -
the_content -
the_constraint_container -
Returns:
AttributeIdentifier
Throws:
ConstraintException
IllegalContentException

remove

public void remove(AttributeIdentifier the_attribute_identifier,
                   ConstraintContainer the_constraint_container)
            throws ConstraintException
Description copied from interface: AttributeContainer
Deletes the content associated with the given AttributeIdentifier from this container. If the previous state associated with the given AttributeIdentifier was State.UNINTIALIZED or State.NEW, the given AttributeIdentifier and associated content are removed from the container. If the previous state associated with the given AttributeIdentifier was State.UNCHANGED or State.CHANGED, the associated state becomes State.DELETED. Throws ConstraintException if deleting the associated content violates one or more of the constraints in the associated ConstraintContainer.

Supported API: true

Specified by:
remove in interface AttributeContainer
Parameters:
the_attribute_identifier -
the_constraint_container -
Throws:
ConstraintException

remove

public void remove(AttributeTypeIdentifier the_attribute_type_identifier,
                   ConstraintContainer the_constraint_container)
            throws ConstraintException
Description copied from interface: AttributeContainer
Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container. If the previous state associated with one of the AttributeIdentifiers was State.UNINTIALIZED or State.NEW, the AttributeIdentifier and associated content are removed from the container. If the previous state associated with one of the AttributeIdentifiers was State.UNCHANGED or State.CHANGED, the associated state becomes State.DELETED. Throws ConstraintException if deleting any of the associaited content violates one or more of the constraints in the associated ConstraintContainer.

Supported API: true

Specified by:
remove in interface AttributeContainer
Parameters:
the_attribute_type_identifier -
the_constraint_container -
Throws:
ConstraintException

getAttributeTypeSummary

public AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier,
                                                    ConstraintContainer the_constraint_container,
                                                    DescriptorContainer the_descriptor_container)
Description copied from interface: AttributeContainer
Returns an AttributeTypeSummary for the AttributeTypeIdentifier.

Supported API: true

Specified by:
getAttributeTypeSummary in interface AttributeContainer
Parameters:
the_attribute_type_identifier -
the_constraint_container -
the_descriptor_container -
Returns:
AttributeTypeSummary

getAttributeTypeSummary

public AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier,
                                                    AttributeTypeIdentifier the_attribute_type_identifier,
                                                    boolean is_absolute)
Description copied from interface: AttributeContainer
Returns an AttributeTypeSummary for the AttributeTypeIdentifier.

Supported API: true

Specified by:
getAttributeTypeSummary in interface AttributeContainer
Parameters:
the_association_identifier -
the_attribute_type_identifier -
is_absolute -
Returns:
AttributeTypeSummary

getAttributeTypeSummary

public AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier,
                                                    AttributeTypeIdentifier the_attribute_type_identifier,
                                                    boolean is_absolute,
                                                    ConstraintContainer the_constraint_container,
                                                    DescriptorContainer the_descriptor_container)
Description copied from interface: AttributeContainer
Returns an AttributeTypeSummary for the AttributeTypeIdentifier.

Supported API: true

Specified by:
getAttributeTypeSummary in interface AttributeContainer
Parameters:
the_association_identifier -
the_attribute_type_identifier -
is_absolute -
the_constraint_container -
the_descriptor_container -
Returns:
AttributeTypeSummary

acceptChanges

public void acceptChanges()
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
acceptChanges in interface AttributeContainer

setState

public void setState(AttributeIdentifier the_attribute_identifier,
                     State the_state)
Description copied from interface: AttributeContainer
Sets the state associated with the given AttributeIdentifier in this container. Has no effect if the AttributeIdentifier is not in the container.

Supported API: true

Specified by:
setState in interface AttributeContainer
Parameters:
the_attribute_identifier -
the_state -

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier)
Description copied from interface: AttributeContainer
Returns all current AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in the container defined directly in the context of the given TypeInstanceIdentifier with matching AttributeTypeIdentifiersfor which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
the_type_instance_identifier -
Returns:
AttributeIdentifier[]

getAttributeIdentifiers

public AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier,
                                                     State the_state)
Description copied from interface: AttributeContainer
Returns all AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier that match the given state. If the given state is null, returns all AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier. Returns an empty array if no matches are found.

Supported API: true

Specified by:
getAttributeIdentifiers in interface AttributeContainer
Parameters:
the_type_instance_identifier -
the_state -
Returns:
AttributeIdentifier[]

purge

public void purge(TypeInstanceIdentifier[] the_type_instance_identifiers)
Description copied from interface: AttributeContainer


Supported API: false

Specified by:
purge in interface AttributeContainer
Parameters:
the_type_instance_identifiers -