public class IlpDefaultSDMAdapter extends IlpAbstractSDMAdapter
IlpMutableDataSource
) and a basic SDM model
(IlvBasicSDMModel
).Constructor and Description |
---|
IlpDefaultSDMAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultBindings()
Applies a default set of attribute bindings to this adapter.
|
protected void |
dataSourceAddObject(IlpObject object)
Adds a new object in the TGO data source.
|
protected void |
dataSourceClear()
Clears the TGO data source completely.
|
protected void |
dataSourceEndBatch()
Stops the TGO data source batching mode.
|
protected void |
dataSourceRemoveObject(IlpObject object)
Removes an object from the TGO data source.
|
protected void |
dataSourceSetLink(IlpObject link,
Object fromId,
Object toId)
Sets the link endpoint relationship between a link and two nodes in the
TGO data source.
|
protected void |
dataSourceSetParent(IlpObject object,
IlpObject parent)
Sets a parent-child relationship in the TGO data source.
|
protected void |
dataSourceStartBatch()
Starts the TGO data source batching mode.
|
void |
setDataSource(IlpDataSource dataSource)
Sets the data source.
|
addAttributeBinding, addAttributeBinding, addPropertyChangeListener, addPropertyChangeListener, batchEnded, batchStarted, firePropertyChange, getAcceptedClasses, getBindings, getBindings, getDataSource, getExcludedClasses, getFilter, getSDMLogger, getSDMModel, isRepresenting, objectAttributeChanged, objectsAdded, objectsRemoved, objectStructureChanged, refilter, refilterObjects, removeAllAttributeBindings, removeAllAttributeBindings, removeAttributeBinding, removeAttributeBinding, removePropertyChangeListener, removePropertyChangeListener, setAcceptedClasses, setExcludedClasses, setFilter, testObject
public void setDataSource(IlpDataSource dataSource)
Sets the data source.
Ensures that the given data source is a mutable data source
(IlpMutableDataSource
).
setDataSource
in class IlpAbstractSDMAdapter
dataSource
- The mutable data source to be used by this adapter.IllegalArgumentException
- If the input data source is not an instance
of IlpMutableDataSource
IlpMutableDataSource
protected void dataSourceAddObject(IlpObject object)
IlpAbstractSDMAdapter
dataSourceAddObject
in class IlpAbstractSDMAdapter
object
- The object to be addedprotected void dataSourceClear()
IlpAbstractSDMAdapter
dataSourceClear
in class IlpAbstractSDMAdapter
protected void dataSourceEndBatch()
IlpAbstractSDMAdapter
dataSourceEndBatch
in class IlpAbstractSDMAdapter
protected void dataSourceRemoveObject(IlpObject object)
IlpAbstractSDMAdapter
dataSourceRemoveObject
in class IlpAbstractSDMAdapter
object
- The object to be removedprotected void dataSourceSetLink(IlpObject link, Object fromId, Object toId)
IlpAbstractSDMAdapter
dataSourceSetLink
in class IlpAbstractSDMAdapter
link
- The link being setfromId
- The identifier of the from endpointtoId
- The identifier of the to endpointprotected void dataSourceSetParent(IlpObject object, IlpObject parent)
IlpAbstractSDMAdapter
dataSourceSetParent
in class IlpAbstractSDMAdapter
object
- The child objectparent
- The parent objectprotected void dataSourceStartBatch()
IlpAbstractSDMAdapter
dataSourceStartBatch
in class IlpAbstractSDMAdapter
public void addDefaultBindings() throws IlpInvalidBindingException
Applies a default set of attribute bindings to this adapter.
By default, there are no attribute bindings applied to the adapter, so that no TGO attribute is mapped to an SDM property. This method sets up default bindings for the following predefined TGO attributes:
IltObject.NameAttribute
: Read and writeIltObject.PositionAttribute
: Read and write
(excludes geographic position)IltNetworkElement.TypeAttribute
: Read onlyIltLink.TypeAttribute
: Read onlyIltCard.TypeAttribute
: Read onlyIltObject.NewAlarmCountAttribute
: Read onlyThis method can be overridden in order to provide easy access to custom bindings.
Attribute bindings are not allowed when the adapter is representing
(IlpAbstractSDMAdapter.isRepresenting()
is true
).
IlpInvalidBindingException
- when the adapter is currently representing
objects from a data source.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.