|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.data.model.property.PropertyContainer
pl.edu.agh.cast.data.model.AbstractElement
pl.edu.agh.cast.data.model.presentation.PresentationElement<IElement>
pl.edu.agh.cast.schema.model.presentation.SchemaNode
public class SchemaNode
Default implementation of ISchemaNode.
ISchemaNode,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface pl.edu.agh.cast.data.model.presentation.IPresentationElement |
|---|
IPresentationElement.Properties, IPresentationElement.PropertyCategory |
| Field Summary |
|---|
| Fields inherited from interface pl.edu.agh.cast.schema.model.presentation.ISchemaNode |
|---|
CONNECTION_EVENT, TYPE |
| Fields inherited from interface pl.edu.agh.cast.data.model.presentation.IPresentationElement |
|---|
ATTRIBUTE_CHANGE_EVENT |
| Constructor Summary | |
|---|---|
protected |
SchemaNode()
Default constructor. |
|
SchemaNode(ISchemaDataSet dataSet,
IReference<IElement> originalElement)
The constructor for schema nodes created manually. |
|
SchemaNode(ISchemaDataSet dataSet,
IReferenceList<IElement> originalElements)
The constructor for schema nodes created manually. |
|
SchemaNode(ISchemaDataSet dataSet,
Type derivedType,
String label)
The constructor for presentation elements created manually. |
protected |
SchemaNode(Type type)
|
| Method Summary | |
|---|---|
void |
addAllConnections(Collection<? extends ISchemaConnection> connectionsToAdd)
Adds connections from collection to this node. |
void |
addConnection(ISchemaConnection connection)
Adds connection to this node. |
protected IVisualSchemaNode |
createVisualElement()
Creates a new visual element to be associated with this presentation element. |
void |
dispose()
Remove all connections from the data set during dispose. |
List<? extends ISchemaConnection> |
getConnections()
Gets all connections associated with this node. |
protected String |
getDescString()
Returns a string with short description of element. |
boolean |
removeAllConnections(Collection<? extends ISchemaConnection> connectionsToRemove)
Removes connections from collection to this node. |
boolean |
removeConnection(ISchemaConnection connection)
Removes specified connection from this node. |
SchemaNode |
replicate()
Returns a replicated instance of this instance. |
SchemaNode |
replicateTo(Object replica)
Replicates this instance state to given replica object. |
| Methods inherited from class pl.edu.agh.cast.data.model.presentation.PresentationElement |
|---|
addPropertyChangeListener, checkIfValid, firePropertyChange, getDerivedType, getLabel, getOriginalElements, getVisualElement, hasAssociatedVisualElement, removePropertyChangeListener, setDerivedType, setLabel, setOriginalElements, setSuppressAllEvents, setVisualElement |
| Methods inherited from class pl.edu.agh.cast.data.model.AbstractElement |
|---|
afterSetMetaPropertyManager, canReplicateTo, equals, getDataSet, getId, getType, hashCode, isValid, setDataSet, setId, setType, toString |
| Methods inherited from class pl.edu.agh.cast.data.model.property.PropertyContainer |
|---|
addProperty, createProperty, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, initializeProperties, matches, removeProperty, setMetaPropertyManager, setProperty, update |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface pl.edu.agh.cast.data.model.presentation.IPresentationElement |
|---|
getDerivedType, getLabel, getOriginalElements, getVisualElement, hasAssociatedVisualElement, setDerivedType, setLabel, setOriginalElements, setSuppressAllEvents, setVisualElement |
| Methods inherited from interface pl.edu.agh.cast.data.model.IElement |
|---|
getDataSet |
| Methods inherited from interface pl.edu.agh.cast.data.model.Identifiable |
|---|
getId, getType |
| Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyContainer |
|---|
addProperty, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, matches, removeProperty, setProperty |
| Methods inherited from interface java.util.Observer |
|---|
update |
| Methods inherited from interface pl.edu.agh.cast.common.IValidatable |
|---|
isValid |
| Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyChangeProvider |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
protected SchemaNode()
Usage of this constructor is discouraged, since it does not provide any integrity control. If, however, this
constructor is used, the AbstractElement.isValid() method should be called in order to check the integrity.
protected SchemaNode(Type type)
public SchemaNode(ISchemaDataSet dataSet,
IReference<IElement> originalElement)
dataSet - the data set this node belongs tooriginalElement - a reference to represented domain model element - if null, then empty
IReferenceList instance is acquired from ReferenceUtil
public SchemaNode(ISchemaDataSet dataSet,
IReferenceList<IElement> originalElements)
dataSet - the data set this node belongs tooriginalElements - a reference list to represented domain model elements - if null, then empty
IReferenceList instance is acquired from ReferenceUtil
public SchemaNode(ISchemaDataSet dataSet,
Type derivedType,
String label)
dataSet - the data set this node belongs toderivedType - derived typelabel - node label; if null then default label is set| Method Detail |
|---|
public List<? extends ISchemaConnection> getConnections()
getConnections in interface ISchemaNodepublic void addAllConnections(Collection<? extends ISchemaConnection> connectionsToAdd)
addAllConnections in interface ISchemaNodeconnectionsToAdd - collection of connectionsaddAllConnections(pl.edu.agh.cast.data.model.IReferenceList)public void addConnection(ISchemaConnection connection)
addConnection in interface ISchemaNodeconnection - connection to addaddConnection(pl.edu.agh.cast.schema.model.presentation.ISchemaConnection)public boolean removeAllConnections(Collection<? extends ISchemaConnection> connectionsToRemove)
removeAllConnections in interface ISchemaNodeconnectionsToRemove - collection of connections
ISchemaNode.removeAllConnections(java.util.Collection)public boolean removeConnection(ISchemaConnection connection)
removeConnection in interface ISchemaNodeconnection - connection to remove
protected String getDescString()
AbstractElement.toString() and may be
overridden in order to customize its results.
getDescString in class AbstractElementAbstractElement.getDescString()public void dispose()
dispose in interface IDisposabledispose in class PropertyContainerPropertyContainer.dispose()protected IVisualSchemaNode createVisualElement()
This method should be implemented in each concrete subclass of PresentationElement.
createVisualElement in class PresentationElement<IElement>PresentationElement.createVisualElement()
public SchemaNode replicateTo(Object replica)
throws IllegalArgumentException,
ReplicationException
Replicates element type and ID.
Replicates element derived type, label and original element list.
The lists of connections is empty.
replicateTo in interface IReplicablereplicateTo in class PresentationElement<IElement>replica - the object to replicate to
IllegalArgumentException - if given object is null or of invalid type
ReplicationException - if replication failsPresentationElement.replicateTo(java.lang.Object)
public SchemaNode replicate()
throws ReplicationException
replicate in interface IReplicablereplicate in class AbstractElementReplicationException - if replication failsIReplicable.replicate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||