com.infoengine.object
Class IeAtt

java.lang.Object
  extended bycom.infoengine.object.IeObject
      extended bycom.infoengine.object.IeAtt
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class IeAtt
extends IeObject
implements Cloneable

See Also:
Serialized Form

Field Summary
static String ATT_TYPE_ID_KEY
           
static String EMPTY_STRING
           
 
Fields inherited from class com.infoengine.object.IeObject
_attributes, _children, _hasChanged, _meta, _name, _type, INITIAL_LIST_SIZE, INITIAL_MAP_SIZE, USE_COLLECTIONS
 
Constructor Summary
IeAtt()
          default no arg constructor to be used for de-serialization
IeAtt(AttributeTypeIdentifier attrTypeId)
          Constructs a new attribute instance with a specific attribute type identifier.
IeAtt(String name)
          Constructs a new attribute instance with a specific logical name.
IeAtt(String name, AttributeTypeIdentifier attrTypeId)
          Constructs a new attribute instance with a specific logical name and a specific attribute type identifier.
 
Method Summary
 void addDatum(IeDatum datum)
          Adds a datum to the attribute.
 void addDatums(Vector v)
          Appends a Vector of datums to the attribute.
 void addIUniqueValue(IeDatum datum)
          Adds a datum to the attribute if, and only if, the attribute does not contain the datum already.
 void addUniqueValue(IeDatum datum)
          Adds a datum to the attribute if, and only if, the attribute does not contain the datum already.
 void appendDatum(IeDatum datum)
          Appends a datum to the attribute.
 Object deepClone()
          Returns a deep copy of the attribute.
 IeDatum firstDatum()
          Returns the first datum contained in the attribute.
 Enumeration getAttributeIdentifiers(State state, String fti, String ufid)
          Returns the attribute identifiers of all values of this attribute that have a specific state.
 Enumeration getAttributeIdentifiers(String fti, String ufid)
          Returns the attribute identifiers of all values of this attribute.
 AttributeTypeIdentifier getAttributeTypeIdentifier()
          Returns the attribute type identifier associated with this attribute.
 AttributeTypeIdentifier getAttributeTypeIdentifier(String fti)
          Returns the attribute type identifier associated with this attribute.
 Object getContent()
          Returns the content associated with this instance.
 Object getContent(AttributeIdentifier attrId)
          Returns the content associated with a specific value identified by attribute identifier.
 IeDatum getDatum()
          Returns the first datum contained in the attribute.
 IeDatum getDatum(AttributeIdentifier attrId)
          Returns the datum with a specific attribute identifier.
 IeDatum getDatumAt(int index)
          Returns the datum located at a specified index.
 int getDatumCount()
          Returns the number of datums contained in the attribute.
 Enumeration getDatums()
          Returns all of the datums contained in the attribute.
 String getNodeName()
          Returns the DOM node name of this object.
 State getState(AttributeIdentifier attrId)
          Returns the state of a specific value identified by attribute identifier.
 int indexOfDatum(IeDatum datum)
          Returns the index of a specified datum.
 IeDatum lastDatum()
          Returns the last datum contained in the attribute.
 void removeAllDatums()
          Removes all of the datums contained in the attribute.
 void removeDatum(AttributeIdentifier attrId)
          Removes the datum with a specific attribute identifier.
 void removeDatum(IeDatum datum)
          Removes a specified datum from the attribute.
 void removeDatumAt(int index)
          Removes the datum located at a specified index of the attribute.
 void setAttributeTypeIdentifier(AttributeTypeIdentifier attrTypeId)
          Sets the attribute type identifier associated with this attribute.
 void setContent(AttributeIdentifier attrId, Object content)
          Sets the content for a specific value identified by attribute identifier.
 void setContent(Object content)
          Sets the content associated with this instance.
 void setDatum(IeDatum datum)
          Removes any pre-existing datums contained within the attribute, then sets the specified datum as the only datum in the attribute.
 void setDatumAt(IeDatum datum, int index)
          Sets the datum located at a specified index of the attribute.
 void setName(String name)
          Sets the name of the attribute.
 void setState(AttributeIdentifier attrId, State state)
          Sets the state of a specific value identified by attribute identifier.
 String toString()
           
 
Methods inherited from class com.infoengine.object.IeObject
_addChild, _addMeta, _getMeta, _removeChild, _setMeta, addAtt, addChild, addMeta, addMeta, addMeta, addMeta, addMetaDatum, addMetaValue, addMetaValues, appendMetaDatum, canonicalize, canonicalize, clearChildren, clone, containsChild, containsMetaValue, deepCopy, findChild, firstAtt, firstChild, firstMetaValue, getAtt, getAttAt, getAttByMeta, getAttCount, getAttribute, getAtts, getChildAt, getChildCount, getChildren, getHasChanged, getMeta, getMetaNames, getMetaValue, getMetaValueAt, getMetaValueCount, getMetaValues, getName, getTagName, getType, hasChildren, indexOfChild, indexOfMetaValue, lastAtt, lastChild, lastMetaValue, newList, newList, newMap, newMap, readExternal, removeAllAtts, removeAllChildren, removeAllMeta, removeAllMetaValues, removeAtt, removeAtt, removeAttAt, removeAttribute, removeChild, removeChildAt, removeMeta, removeMetaValue, removeMetaValueAt, removeName, removeType, replaceChild, setAttAt, setAttribute, setChildAt, setHasChanged, setMeta, setMeta, setMeta, setMeta, setMetaValue, setMetaValueAt, setType, shallowCopy, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATT_TYPE_ID_KEY

public static final String ATT_TYPE_ID_KEY
See Also:
Constant Field Values

EMPTY_STRING

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

IeAtt

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


IeAtt

public IeAtt(String name)
Constructs a new attribute instance with a specific logical name.

Parameters:
name - The logical name of the attribute

IeAtt

public IeAtt(AttributeTypeIdentifier attrTypeId)
Constructs a new attribute instance with a specific attribute type identifier. It also derives a logical attribute name from the attribute type identifier.

Parameters:
attrTypeId - The attribute type identifier

IeAtt

public IeAtt(String name,
             AttributeTypeIdentifier attrTypeId)
Constructs a new attribute instance with a specific logical name and a specific attribute type identifier.

Parameters:
name - The logical name of the attribute
attrTypeId - The attribute type identifier
Method Detail

addDatum

public void addDatum(IeDatum datum)
Adds a datum to the attribute.

Parameters:
datum - the datum to be added

appendDatum

public void appendDatum(IeDatum datum)
Appends a datum to the attribute.

Parameters:
datum - the datum to be appended

addDatums

public void addDatums(Vector v)
Appends a Vector of datums to the attribute.

Parameters:
v - the Vector of datums to be appended

firstDatum

public IeDatum firstDatum()
Returns the first datum contained in the attribute.

Returns:
The first datum, or null if the attribute does not contain any datums

getDatum

public IeDatum getDatum()
Returns the first datum contained in the attribute.

Returns:
The first datum, or null if the attribute does not contain any datums

getDatum

public IeDatum getDatum(AttributeIdentifier attrId)
Returns the datum with a specific attribute identifier.

Parameters:
attrId - The attribute identifier containing the instance identifier that identifies the datum to be returned.
Returns:
The datum, or null if the attribute does not contain a datum with the specified identifier.

getDatums

public Enumeration getDatums()
Returns all of the datums contained in the attribute.

Returns:
The datums contained in the attribute

getDatumAt

public IeDatum getDatumAt(int index)
Returns the datum located at a specified index.

Parameters:
index - the index of the datum to be returned
Returns:
The datum located at the specified index, or null if the index exceeds the number of datums contained in the attribute

getDatumCount

public int getDatumCount()
Returns the number of datums contained in the attribute.

Returns:
The number of datums in the attribute

indexOfDatum

public int indexOfDatum(IeDatum datum)
Returns the index of a specified datum.

Parameters:
datum - the datum for which to return an index
Returns:
The index of the specified datum, or -1 if the datum is not found in the attribute

lastDatum

public IeDatum lastDatum()
Returns the last datum contained in the attribute.

Returns:
The last datum, or null if the attribute does not contain any datums

removeAllDatums

public void removeAllDatums()
Removes all of the datums contained in the attribute.


removeDatum

public void removeDatum(IeDatum datum)
Removes a specified datum from the attribute.

Parameters:
datum - the datum to be removed

removeDatum

public void removeDatum(AttributeIdentifier attrId)
Removes the datum with a specific attribute identifier.

Parameters:
attrId - The attribute identifier containing the instance identifier that identifies the datum to be removed.

removeDatumAt

public void removeDatumAt(int index)
Removes the datum located at a specified index of the attribute.

Parameters:
index - the index of the datum to be removed

setDatum

public void setDatum(IeDatum datum)
Removes any pre-existing datums contained within the attribute, then sets the specified datum as the only datum in the attribute.

Parameters:
datum - the datum to set

setName

public void setName(String name)
Sets the name of the attribute.

Overrides:
setName in class IeObject
Parameters:
name - the new name

setDatumAt

public void setDatumAt(IeDatum datum,
                       int index)
Sets the datum located at a specified index of the attribute.

Parameters:
datum - the new datum to be set
index - the index of the datum to be set

addUniqueValue

public void addUniqueValue(IeDatum datum)
Adds a datum to the attribute if, and only if, the attribute does not contain the datum already. The test for uniqueness is performed in a case sensitive manner. In addition, if the value being added is non-null and the attribute contains any null values, the null values are removed. Conversely, if the value being added is null and the attribute contains any non-null values, the null value is not added.

Parameters:
datum - the datum to be added

addIUniqueValue

public void addIUniqueValue(IeDatum datum)
Adds a datum to the attribute if, and only if, the attribute does not contain the datum already. The test for uniqueness is performed in a case insensitive manner.

Parameters:
datum - the datum to be added

getContent

public Object getContent()
Returns the content associated with this instance. If this instance is multivalued, the first value is returned.

Returns:
The content, or null if this instance has no content.

getContent

public Object getContent(AttributeIdentifier attrId)
Returns the content associated with a specific value identified by attribute identifier.

Parameters:
attrId - The attribute identifier containing the instance identifier that identifies the instance whose content will be returned.
Returns:
The content, or null if no value has the specified attribute identifier or it has no content.

setContent

public void setContent(Object content)
Sets the content associated with this instance. If this instance already has content, the old content is removed.

Parameters:
content - The new content. If null is specified, the instance will have no content upon return from this method.

setContent

public void setContent(AttributeIdentifier attrId,
                       Object content)
Sets the content for a specific value identified by attribute identifier.

Parameters:
attrId - The attribute identifier containing the instance identifier that identifies the instance whose content will be set.
content - The new content. If null is specified, the instance will have no content upon return from this method.

getAttributeTypeIdentifier

public AttributeTypeIdentifier getAttributeTypeIdentifier()
Returns the attribute type identifier associated with this attribute.

Returns:
The attribute type identifier or null if the attribute currently has no attribute identifier.

getAttributeTypeIdentifier

public AttributeTypeIdentifier getAttributeTypeIdentifier(String fti)
Returns the attribute type identifier associated with this attribute. If the attribute doesn't have an attribute type identifier already, an attribute type identifier is created from the parameter specified, and this new identifier is associated with the attribute.

Parameters:
fti - The federated type identifier of the node that contains this attribute.
Returns:
The existing or newly created attribute identifier.

setAttributeTypeIdentifier

public void setAttributeTypeIdentifier(AttributeTypeIdentifier attrTypeId)
Sets the attribute type identifier associated with this attribute.

Parameters:
attrTypeId - The new attribute type identifier.

getAttributeIdentifiers

public Enumeration getAttributeIdentifiers(String fti,
                                           String ufid)
Returns the attribute identifiers of all values of this attribute.

Parameters:
fti - The federated type identifier to use in constructing definition identifiers for new attribute identifiers.
ufid - The unique federation identifier to use in constructing context identifiers for new attribute identifiers.
Returns:
The attribute identifiers.

getAttributeIdentifiers

public Enumeration getAttributeIdentifiers(State state,
                                           String fti,
                                           String ufid)
Returns the attribute identifiers of all values of this attribute that have a specific state. If the state is null, all attribute identifiers are returned.

Parameters:
fti - The federated type identifier to use in constructing definition identifiers for new attribute identifiers.
ufid - The unique federation identifier to use in constructing context identifiers for new attribute identifiers.
Returns:
The attribute identifiers.

getState

public State getState(AttributeIdentifier attrId)
Returns the state of a specific value identified by attribute identifier.

Parameters:
attrId - The attribute identifier containing the instance identifier that identifies the instance whose state will be returned.
Returns:
The state of the value.

setState

public void setState(AttributeIdentifier attrId,
                     State state)
Sets the state of a specific value identified by attribute identifier.

Parameters:
attrId - The attribute identifier containing the instance identifier that identifies the instance whose state will be set.
state - The new state.

getNodeName

public String getNodeName()
Returns the DOM node name of this object.

Overrides:
getNodeName in class IeObject
Returns:
The DOM node name of this object.

deepClone

public final Object deepClone()
Returns a deep copy of the attribute.

Overrides:
deepClone in class IeObject
Returns:
The deep copy

toString

public String toString()