com.infoengine.connector
Class Data

java.lang.Object
  extended bycom.infoengine.connector.Data
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Attribute, Collection, Element, Group

public class Data
extends Object
implements Serializable

base data class for lightweight Info*Engine data objects.

See Also:
Attribute, Element, Group, Serialized Form

Field Summary
protected  Hashtable _meta
           
 
Constructor Summary
Data()
           
 
Method Summary
 void addMetaValue(String name, Object data)
          add a named metadata value
 boolean equals(Object other)
          test this data with another object for equality
 Enumeration getMetaNames()
          get an enumeration of the names of metadata on this object
 Object getMetaValue(String name)
          get a named metadata value.
if the named metadata is multi-valued then the first value is returned.
 Vector getMetaValues(String name)
          get a vector of named metadata values.
 int hashCode()
          generate this data objects hashCode.
value is based on metadata
 void removeMetaValues(String name)
          remote named metadata values
 void setMetaValue(String name, Object data)
          set a named metadata value
this replaces any previously stored metadata under the same name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_meta

protected Hashtable _meta
Constructor Detail

Data

public Data()
Method Detail

getMetaNames

public Enumeration getMetaNames()
get an enumeration of the names of metadata on this object

Returns:
Enumeration

getMetaValues

public Vector getMetaValues(String name)
get a vector of named metadata values.

Parameters:
name - the metadata name
Returns:
Vector or null if no metadata found under name

getMetaValue

public Object getMetaValue(String name)
get a named metadata value.
if the named metadata is multi-valued then the first value is returned.

Parameters:
name - the metadata name
Returns:
Object or null if no metadata found under name

setMetaValue

public void setMetaValue(String name,
                         Object data)
set a named metadata value
this replaces any previously stored metadata under the same name.

Parameters:
name - the metadata name
data - the new metadata value

addMetaValue

public void addMetaValue(String name,
                         Object data)
add a named metadata value

Parameters:
name - the metadata name
data - the metadata value to add

removeMetaValues

public void removeMetaValues(String name)
remote named metadata values

Parameters:
name - the named metadata to remove

equals

public boolean equals(Object other)
test this data with another object for equality

Returns:
boolean

hashCode

public int hashCode()
generate this data objects hashCode.
value is based on metadata

Returns:
int