|
Remote System Explorer DataStore Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.dstore.core.model.DataElement
public final class DataElement
DataElement
is the unit of information for the DataStore
. All objects including
schema descriptors, commands and instance objects are represented by DataElement
s.
DataElement
s should not be constructed directly, rather they are requested via the createObject()
method in DataStore
Constructor Summary | |
---|---|
|
DataElement()
Creates a new DataElement without initializing it. |
protected |
DataElement(DataStore dataStore)
Creates a new DataElement without initializing it. |
Method Summary | |
---|---|
void |
addNestedData(DataElement obj,
boolean checkUnique)
Adds another element as a child to this element. |
void |
addNestedData(List nestedData,
boolean checkUnique)
Adds a set of elements as children to this element. |
void |
appendToBuffer(String text)
Appends to the buffer for this element. |
protected void |
clear()
Removes all the attributes of a DataElement . |
boolean |
contains(DataElement object)
Tests if this element contains a specified element in the default contents relationship. |
boolean |
contains(DataElement object,
DataElement property)
Tests if this element contains a specified element in a particular relationship. |
boolean |
contains(DataElement object,
DataElement property,
int depth)
Tests if this element contains a specified element in a particular relationship. |
boolean |
contains(DataElement object,
int depth)
Tests if this element contains a specified element in the default contents relationship. |
void |
delete()
Marks a DataElement as deleted. |
int |
depth()
Returns the visibility of this element. |
DataElement |
dereference()
Returns the element that this references. |
DataElement |
doCommandOn(String command,
boolean isSynchronized)
Do the specified command on this element. |
boolean |
equals(Object arg)
Tests if this element is the same as another. |
DataElement |
get(int index)
Returns the child at the specified index. |
Object |
getAdapter(Class key)
Gets the adapter specified by key for this element |
List |
getAssociated(DataElement property)
Gets the set of elements that are related to this element via a specified relationship. |
List |
getAssociated(String propertyStr)
Gets the set of elements that are related to this element via a specified relationship. |
String |
getAttribute(int attributeIndex)
Returns an attribute of this element. |
String[] |
getAttributes()
Returns the set of attributes for this element. |
StringBuffer |
getBuffer()
Returns the buffer for this element. |
DataStore |
getDataStore()
Returns the DataStore for this element. |
DataElement |
getDescriptor()
Returns the type descriptor for this element. |
Object |
getElementProperty(Object name)
Returns the property identified by name. |
String |
getId()
Returns the ID attribute for this element. |
String |
getName()
Returns the name attribute for this element. |
List |
getNestedData()
Returns the children of this element. |
int |
getNestedSize()
Returns the number of children this element contains. |
DataElement |
getParent()
Returns the parent of this element. |
String |
getSource()
Returns the source attribute for this element. |
String |
getType()
Returns the type attribute for this element. |
String |
getValue()
Returns the value attribute for this element. |
void |
initializeNestedData(int size)
Initializes the children set of this element with a specified size. |
boolean |
isDeleted()
Indicates whether the DataElement is deleted or not. |
boolean |
isDescriptor()
|
boolean |
isExpanded()
Indicates whether this element has been queried for it's children. |
boolean |
isOfType(DataElement type)
Tests if this element is of the specified type. |
boolean |
isOfType(DataElement type,
boolean isDescriptor)
Tests if this element is of the specified type. |
boolean |
isOfType(String typeStr)
Tests if this element is of the specified type. |
boolean |
isOfType(String typeStr,
boolean isDescriptor)
Tests if this element is of the specified type. |
boolean |
isPendingTransfer()
Indicates whether this element is pending a transfer If the element is queued to be sent, the value will be true. |
boolean |
isReference()
Indicates whether this is a reference or not. |
boolean |
isSpirit()
Indicates whether this element is a 'spirit' element. |
boolean |
isUpdated()
Indicates whether this element has been updated yet. |
void |
notifyUpdate()
|
boolean |
patternMatch(int[] attributes,
String[] patterns,
int numAttributes,
boolean ignoreCase)
Tests if this element matches the specified patterns. |
void |
reInit(DataElement parent,
DataElement originalObject,
DataElement refType)
Initializes a DataElement to be reference to some other DataElement . |
void |
reInit(DataElement parent,
DataElement originalObject,
String refType)
Initializes a DataElement to be reference to some other DataElement
This method should only be called from the DataStore . |
void |
reInit(DataElement parent,
DataElement type,
String[] attributes)
Initializes a DataElement
This method should only be called from the DataStore . |
void |
reInit(DataElement parent,
DataElement type,
String id,
String name,
String source)
Initializes a DataElement
This method should only be called from the DataStore . |
void |
reInit(DataElement parent,
DataElement type,
String id,
String name,
String source,
boolean isRef)
Initializes a DataElement
This method should only be called from the DataStore . |
void |
reInit(DataElement parent,
String[] attributes)
Initializes a DataElement
This method should only be called from the DataStore . |
void |
reInit(DataElement parent,
String type,
String id,
String name,
String source)
Initializes a DataElement
This method should only be called from the DataStore . |
void |
reInit(DataElement parent,
String type,
String id,
String name,
String source,
boolean isRef)
Initializes a DataElement
This method should only be called from the DataStore . |
void |
reInitAsTransient(String[] attributes)
|
void |
removeNestedData()
Removes all the children from this element. |
void |
removeNestedData(DataElement object)
Removes a specified child element from this element. |
void |
setAttribute(int attributeIndex,
String attribute)
Sets an attribute of the element. |
void |
setAttributes(String[] attributes)
Sets all of the attributes of the element. |
void |
setBuffer(StringBuffer buffer)
Sets the buffer for this element. |
void |
setDataStore(DataStore dataStore)
Sets the DataStore for this element. |
void |
setDepth(int depth)
Sets the depth of visibility for this element. |
void |
setDescriptor(DataElement theDescriptor)
Explicitly sets the type descriptor for this element. |
void |
setExpanded(boolean flag)
Sets the expanded indication for this element. |
void |
setParent(DataElement parent)
Sets the parent for this element. |
void |
setPendingTransfer(boolean flag)
Sets indication of whether this element is waiting to be transferred. |
void |
setSpirit(boolean flag)
Sets indication of whether this element is a 'spirit' element. |
void |
setUpdated(boolean flag)
Sets the updated indication for this element. |
String |
toString()
Returns a string showing the attributes of this element |
void |
waitForUpdate(long timeout)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataElement()
DataElement
without initializing it.
protected DataElement(DataStore dataStore)
DataElement
without initializing it.
dataStore
- the owner DataStore
for this elementMethod Detail |
---|
public void reInit(DataElement parent, DataElement originalObject, DataElement refType)
DataElement
to be reference to some other DataElement
.
This method should only be called from the DataStore
.
parent
- the element that contains this referenceoriginalObject
- the element that gets referencedrefType
- the type descriptor of the referencepublic void reInit(DataElement parent, DataElement originalObject, String refType)
DataElement
to be reference to some other DataElement
This method should only be called from the DataStore
.
parent
- the element that contains this referenceoriginalObject
- the element that gets referencedrefType
- the a string representing the type of referencepublic void reInit(DataElement parent, DataElement type, String id, String name, String source)
DataElement
This method should only be called from the DataStore
.
parent
- the parent of the elementtype
- the type descriptor of the elementid
- the ID of the elementname
- the name of the elementsource
- the source location of the elementpublic void reInit(DataElement parent, String type, String id, String name, String source)
DataElement
This method should only be called from the DataStore
.
parent
- the parent of the elementtype
- a string representing the type descriptor of the elementid
- the ID of the elementname
- the name of the elementsource
- the source location of the elementpublic void reInit(DataElement parent, DataElement type, String id, String name, String source, boolean isRef)
DataElement
This method should only be called from the DataStore
.
parent
- the parent of the elementtype
- the type descriptor of the elementid
- the ID of the elementname
- the name of the elementsource
- the source location of the elementisRef
- an indication of whether the element is a reference or notpublic void reInit(DataElement parent, String type, String id, String name, String source, boolean isRef)
DataElement
This method should only be called from the DataStore
.
parent
- the parent of the elementtype
- a string representing the type descriptor of the elementid
- the ID of the elementname
- the name of the elementsource
- the source location of the elementisRef
- an indication of whether the element is a reference or notpublic void reInit(DataElement parent, DataElement type, String[] attributes)
DataElement
This method should only be called from the DataStore
.
parent
- the parent of the elementtype
- the type descriptor of the elementattributes
- the attributes for this element (name, source, id, etc.)public void reInit(DataElement parent, String[] attributes)
DataElement
This method should only be called from the DataStore
.
parent
- the parent of the elementattributes
- the attributes for this element (type, name, source, id, etc.)public void reInitAsTransient(String[] attributes)
public boolean isDeleted()
DataElement
is deleted or not.
public void addNestedData(List nestedData, boolean checkUnique)
nestedData
- a set of elements to add to this elementcheckUnique
- whether to prevent duplicates from being addedpublic void addNestedData(DataElement obj, boolean checkUnique)
obj
- the element to addcheckUnique
- whether to prevent duplicates from being addedpublic void removeNestedData(DataElement object)
object
- the element to removepublic void removeNestedData()
public String getAttribute(int attributeIndex)
attributeIndex
- the index of the element
public String[] getAttributes()
public String getType()
getType
in interface IDataElement
public String getId()
getId
in interface IDataElement
public String getName()
getName
in interface IDataElement
public String getValue()
public String getSource()
public StringBuffer getBuffer()
public DataStore getDataStore()
DataStore
for this element.
DataStore
public void initializeNestedData(int size)
size
- the initial sizepublic List getNestedData()
getNestedData
in interface IDataElement
public DataElement get(int index)
index
- the index of the child to retrieve
public int getNestedSize()
getNestedSize
in interface IDataElement
public DataElement getParent()
public boolean isDescriptor()
public void setDescriptor(DataElement theDescriptor)
theDescriptor
- the type descriptor for this elementpublic DataElement getDescriptor()
public int depth()
public boolean isReference()
public boolean isExpanded()
public boolean isUpdated()
public boolean isPendingTransfer()
public boolean isSpirit()
public void setAttribute(int attributeIndex, String attribute)
attributeIndex
- the index of the attribute to setattribute
- the new value for the specified attributepublic void setAttributes(String[] attributes)
attributes
- the new set of attributes for the elementpublic void setBuffer(StringBuffer buffer)
buffer
- the new buffer for this elementpublic void appendToBuffer(String text)
text
- text to append to the bufferpublic void setExpanded(boolean flag)
flag
- whether the element is expanded or notpublic void setUpdated(boolean flag)
flag
- whether the element is updated or notpublic void setPendingTransfer(boolean flag)
flag
- whether the element is waiting to be transferredpublic void setSpirit(boolean flag)
public void setParent(DataElement parent)
parent
- the new parentpublic void setDataStore(DataStore dataStore)
DataStore
for this element.
dataStore
- the new dataStorepublic void setDepth(int depth)
depth
- the level of visibilitypublic boolean isOfType(String typeStr)
isOfType
in interface IDataElement
typeStr
- a string representing the type descriptor to compare with
public boolean isOfType(String typeStr, boolean isDescriptor)
typeStr
- a string representing the type descriptor to compare with
public boolean isOfType(DataElement type)
type
- the type descriptor to compare with
public boolean isOfType(DataElement type, boolean isDescriptor)
type
- the type descriptor to compare withisDescriptor
- whehter this element is a descriptor or an instance object
public boolean patternMatch(int[] attributes, String[] patterns, int numAttributes, boolean ignoreCase)
attributes
- the attribute indexes to compare withpatterns
- the values to compare the specified attributes withnumAttributes
- the number of attributes to compareignoreCase
- whether to ignore case or not
public boolean contains(DataElement object, DataElement property)
object
- the object to look forproperty
- relationship under which to find the object
public boolean contains(DataElement object, DataElement property, int depth)
object
- the object to look forproperty
- relationship under which to find the objectdepth
- how deep to search for the specified element
public boolean contains(DataElement object)
object
- the object to look for
public boolean contains(DataElement object, int depth)
object
- the object to look fordepth
- how deep to search
public boolean equals(Object arg)
equals
in class Object
arg
- the object to compare with
public List getAssociated(String propertyStr)
getAssociated
in interface IDataElement
propertyStr
- a string representing the relationship that is required
public List getAssociated(DataElement property)
property
- the relationship that is required
public DataElement dereference()
public DataElement doCommandOn(String command, boolean isSynchronized)
command
- the string representing the command to issueisSynchronized
- an indication of whether this command should be synchronized
public Object getAdapter(Class key)
getAdapter
in interface IAdaptable
key
- the identifier for this adapter
public String toString()
toString
in class Object
public Object getElementProperty(Object name)
getElementProperty
in interface IDataElement
getElementProperty
in interface IElement
name
- a specifier of which property to return
protected void clear()
DataElement
.
This method should only be called from the UpdateHandlers.
public void delete()
DataElement
as deleted.
This method should only be called from the DataStore
public void notifyUpdate()
public void waitForUpdate(long timeout)
|
Remote System Explorer DataStore Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |