|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.object.IeObject
This is the base class for the Info*Engine classes that are used in defining groups and their components.
Field Summary | |
protected List |
_attributes
|
protected List |
_children
|
protected boolean |
_hasChanged
|
protected Map |
_meta
|
protected String |
_name
|
private static String |
_serialVersion
|
protected String |
_type
|
private static Enumeration |
EMPTY_ENUMERATION
|
protected static int |
INITIAL_LIST_SIZE
|
protected static int |
INITIAL_MAP_SIZE
|
(package private) static boolean |
USE_COLLECTIONS
|
Constructor Summary | |
IeObject()
Constructs a new instance without a name. |
|
IeObject(String name)
Constructs a new instance with a name. |
Method Summary | |
protected void |
_addChild(Object o)
|
protected void |
_addMeta(String key,
Object value)
|
protected IeMeta |
_getMeta(String key)
|
protected void |
_removeChild(Object o)
|
protected void |
_setMeta(String key,
Object value)
|
void |
addAtt(IeAtt att)
Adds an attribute to the object. |
protected void |
addChild(Object o)
|
void |
addMeta(String key,
byte[] value)
Adds meta-information of type byte array to the object. |
void |
addMeta(String key,
Date value)
Adds meta-information of type Date to the object. |
void |
addMeta(String key,
Number value)
Adds meta-information of type Number to the object. |
void |
addMeta(String key,
String value)
Adds meta-information of type String to the object. |
void |
addMetaDatum(String key,
IeDatum value)
Adds meta-information of type IeDatum to the object. |
void |
addMetaValue(String key,
Object o)
Add/append an object to a possibly multi-valued meta-information item, or create a vector and add it to the meta-information item. |
void |
addMetaValues(String key,
Vector v)
Add elements of a vector to a possibly multi-valued meta-information item. |
void |
appendMetaDatum(String key,
IeDatum value)
Appends a value to the pre-existing value defined for a specified meta-information item. |
private void |
c10e(Object o,
StringBuffer sb)
examine object and append canonical representation to a StringBuffer |
String |
canonicalize()
|
void |
canonicalize(StringBuffer sb)
append canonical string representation to a StringBuffer |
protected void |
clearChildren()
|
Object |
clone()
Returns a shallow copy of the object. |
protected boolean |
containsChild(Object o)
|
boolean |
containsMetaValue(String key,
Object value)
Determines whether an object is contained within a meta-information item. |
Object |
deepClone()
Returns a deep copy of the object. |
Object |
deepCopy(IeObject newObject)
Returns a deep copy of the object. |
protected Object |
findChild(String key)
|
IeAtt |
firstAtt()
Returns the first attribute associated with the object. |
Object |
firstChild()
Returns the object that is the first child of this object. |
Object |
firstMetaValue(String key)
Returns the first value contained in a meta-information item. |
IeAtt |
getAtt(String name)
Returns an attribute specified by name. |
IeAtt |
getAttAt(int index)
Returns the attribute located at a particular index. |
IeAtt |
getAttByMeta(String name,
Object value)
Returns the attribute containing a specific metadata name and value. |
int |
getAttCount()
Returns the number of attributes associated with the object. |
String |
getAttribute(String name)
Returns the value of a named attribute. |
Enumeration |
getAtts()
Returns all of the attributes associated with the object. |
protected Object |
getChildAt(int index)
|
int |
getChildCount()
Returns the number of objects that are immediate children of this object. |
Enumeration |
getChildren()
Returns all of the objects that are immediate children of this object. |
boolean |
getHasChanged()
Indicates whether this object has changed. |
IeMeta |
getMeta(String key)
Returns the value of a meta-information item. |
Enumeration |
getMetaNames()
Return the names of all meta-information items associated with the object instance. |
Object |
getMetaValue(String key)
Returns the value of a meta-information item. |
Object |
getMetaValueAt(String key,
int index)
Returns the value of a multi-valued meta-information item located at a specified index. |
int |
getMetaValueCount(String key)
Returns the number of values contained within a meta-information item. |
Enumeration |
getMetaValues(String key)
Returns all of the values contained within a meta-information item. |
String |
getName()
Returns the name of the object. |
String |
getNodeName()
Returns the name of this node. |
String |
getTagName()
Returns the name of the element. |
String |
getType()
Returns the type of the object. |
boolean |
hasChildren()
Indicates whether this object has any children. |
protected int |
indexOfChild(Object o)
|
int |
indexOfMetaValue(String key,
Object value)
Returns the index of a particular value of a meta-information item. |
IeAtt |
lastAtt()
Returns the last attribute of the object. |
Object |
lastChild()
Returns the object that is the last child of this object. |
Object |
lastMetaValue(String key)
Returns the last value contained in a meta-information item. |
(package private) static List |
newList()
|
(package private) static List |
newList(Collection c)
|
(package private) static Map |
newMap()
|
(package private) static Map |
newMap(Map m)
|
void |
readExternal(ObjectInput in)
|
void |
removeAllAtts()
Removes all attributes of the object. |
protected void |
removeAllChildren()
|
void |
removeAllMeta()
Removes all meta-information items from the object instance. |
void |
removeAllMetaValues(String key)
Removes all values of a meta-information item. |
void |
removeAtt(IeAtt att)
Removes a particular attribute from the object. |
void |
removeAtt(String name)
Removes a particular attribute specified by name. |
void |
removeAttAt(int index)
Removes the attribute located at a particular index. |
void |
removeAttribute(String name)
Removes an attribute from this DOM object. |
void |
removeChild(Object o)
Removes a particular child of this object. |
protected void |
removeChildAt(int index)
|
void |
removeMeta(String key)
Removes a meta-information item from the object instance. |
void |
removeMetaValue(String key,
Object o)
Removes a particular value from a meta-information item. |
void |
removeMetaValueAt(String key,
int index)
Removes the value located at a particular index of a meta-information item. |
void |
removeName()
Removes the object's name by setting it to null. |
void |
removeType()
Removes the object's type by setting it to an empty string. |
IeObject |
replaceChild(IeObject newChild,
IeObject oldChild)
Replaces the specified child object with a new one. |
void |
setAttAt(IeAtt att,
int index)
Sets the attribute located at a particular index. |
void |
setAttribute(String name,
String value)
Sets a named attribute to a specified value. |
protected void |
setChildAt(Object o,
int index)
|
void |
setHasChanged(boolean hasChanged)
Sets the modification flag. |
void |
setMeta(String key,
byte[] value)
Set meta-information of type byte array on the object. |
void |
setMeta(String key,
Date value)
Set meta-information of type Date on the object. |
void |
setMeta(String key,
Number value)
Set meta-information of type Number on the object. |
void |
setMeta(String key,
String value)
Set meta-information of type String on the object. |
void |
setMetaValue(String s,
Object value)
Set the value of a meta-information item. |
void |
setMetaValueAt(String key,
String o,
int index)
Set the value located at a particular index of a multi-valued meta-information item. |
void |
setName(String name)
Sets the name of the object. |
void |
setType(String type)
Sets the type of the object. |
Object |
shallowCopy(IeObject newObject)
Returns a shallow copy of the object (without children). |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int INITIAL_LIST_SIZE
protected static final int INITIAL_MAP_SIZE
protected List _attributes
protected List _children
protected Map _meta
protected String _name
protected String _type
protected boolean _hasChanged
private static final String _serialVersion
private static Enumeration EMPTY_ENUMERATION
static boolean USE_COLLECTIONS
Constructor Detail |
public IeObject()
public IeObject(String name)
name
- the name to be assigned to the objectMethod Detail |
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void addMeta(String key, String value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void addMeta(String key, Date value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void addMeta(String key, Number value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void addMeta(String key, byte[] value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void addMetaDatum(String key, IeDatum value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void appendMetaDatum(String key, IeDatum value)
key
- the name of the meta-information itemvalue
- the value to be appendedpublic IeMeta getMeta(String key)
key
- the name of the meta-information item to return
public Enumeration getMetaNames()
public String getNodeName()
public void removeAllMeta()
public void removeMeta(String key)
key
- the name of the meta-information item to removepublic IeObject replaceChild(IeObject newChild, IeObject oldChild)
newChild
- the new child objectoldChild
- the child to be replaced
public void setMeta(String key, Date value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void setMeta(String key, String value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void setMeta(String key, byte[] value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void setMeta(String key, Number value)
key
- the name of the meta-information itemvalue
- the value of the meta-information itempublic void addMetaValue(String key, Object o)
key
- the name of the meta-information itemo
- the object to be added/appendedpublic void addMetaValues(String key, Vector v)
key
- the name of the meta-information itemv
- the vector containing objects to be addedpublic boolean containsMetaValue(String key, Object value)
key
- the name of the meta-information itemvalue
- the value to test for containment
public Object firstMetaValue(String key)
key
- the name of the meta-information item
public Object getMetaValue(String key)
key
- the name of the meta-information item
public Object getMetaValueAt(String key, int index)
key
- the name of the meta-information itemindex
- the index of the value to return
public int getMetaValueCount(String key)
key
- the name of the meta-information item
public Enumeration getMetaValues(String key)
key
- the name of the meta-information item
public int indexOfMetaValue(String key, Object value)
key
- the name of the meta-information itemvalue
- the value for which to find the index
public Object lastMetaValue(String key)
key
- the name of the meta-information item
public void removeMetaValue(String key, Object o)
key
- the name of the meta-information itemo
- the value to be removedpublic void removeMetaValueAt(String key, int index)
key
- the name of the meta-information itemindex
- the index of the value to be removedpublic void removeAllMetaValues(String key)
key
- the name of the meta-information itempublic void setMetaValue(String s, Object value)
value
- the value to be setpublic void setMetaValueAt(String key, String o, int index)
key
- the name of the meta-information itemo
- the value to be setindex
- the index of the value to be setprotected final IeMeta _getMeta(String key)
protected final void _setMeta(String key, Object value)
protected final void _addMeta(String key, Object value)
protected final void _removeChild(Object o)
protected final void _addChild(Object o)
public final Enumeration getChildren()
protected final void addChild(Object o)
public final void removeChild(Object o)
o
- the child to be removedprotected final void removeAllChildren()
protected final void clearChildren()
protected final Object findChild(String key)
protected final boolean containsChild(Object o)
protected final void removeChildAt(int index)
protected final int indexOfChild(Object o)
protected final Object getChildAt(int index)
protected final void setChildAt(Object o, int index)
public void addAtt(IeAtt att)
att
- the attribute to be addedpublic IeAtt firstAtt()
public IeAtt getAtt(String name)
name
- the name of the attribute to return
public Enumeration getAtts()
public IeAtt getAttAt(int index)
index
- the index of the attribute to be returned
public IeAtt getAttByMeta(String name, Object value)
name
- The name of the metadata.value
- The value of the metadata.
public int getAttCount()
public IeAtt lastAtt()
public void removeAllAtts()
public void removeAtt(String name)
name
- the name of the attribute to be removedpublic void removeAtt(IeAtt att)
att
- the attribute to be removedpublic void removeAttAt(int index)
index
- the index of the attribute to be removedpublic void setAttAt(IeAtt att, int index)
att
- the new attribute to be setindex
- the index of the attribute to be setpublic Object deepClone()
public final Object shallowCopy(IeObject newObject)
newObject
- base object in which to generate the shallow copy
public final Object deepCopy(IeObject newObject)
newObject
- base object in which to generate the deep copy
public final Object clone()
public String getName()
public void setName(String name)
name
- the name to setpublic void removeName()
public String getType()
public void setType(String type)
type
- the type to setpublic void removeType()
public Object firstChild()
public Object lastChild()
public int getChildCount()
public boolean hasChildren()
public boolean getHasChanged()
public void setHasChanged(boolean hasChanged)
hasChanged
- true to indicate that the object has changedpublic String getTagName()
public String getAttribute(String name)
name
- the name of the attribute to retrieve
public void setAttribute(String name, String value)
name
- the name of the attribute to be setvalue
- the value to set
DOMException
- if attribute value can not be setpublic void removeAttribute(String name)
name
- the name of the attribute to be removedpublic String canonicalize()
public void canonicalize(StringBuffer sb)
sb
- - the StringBufferprivate void c10e(Object o, StringBuffer sb)
o
- - the object to canonicalizesb
- - the StringBuffer to append the canonical representation tostatic List newList(Collection c)
static List newList()
static Map newMap(Map m)
static Map newMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |