|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecp.view.internal.validation.ViewModelGraph
public abstract class ViewModelGraph
The validation graph is a graph like structure where each VElement
is a represented as
ViewModelGraphNode
with a value of type T
. The graph structure follows the EObject
hierarchy
of
the view model (and in that sense conforms to the containment tree of the Renderable).
The actually computed values of the nodes are based on domain objects, which are also represented as
ViewModelGraphNode
s, together with a feature, but in contrast to the nodes containing the VElement
s,
never
have any children.
Nodes containing domain objects also can have multiple parent.
For instance this is the case if a domain object's feature is visualized by multiple controls.
Constructor Summary | |
---|---|
ViewModelGraph(VElement viewModel,
org.eclipse.emf.ecore.EObject domainModel,
Comparator<VDiagnostic> comparator)
Constructor. |
Method Summary | |
---|---|
Set<VDiagnostic> |
getAllValues(org.eclipse.emf.ecore.EObject domainObject)
Returns all values set for the provided domainObject. |
abstract VDiagnostic |
getDefaultValue()
Returns the default value for a cached node. |
VDiagnostic |
getValue(VElement renderable)
Returns the computed value for the given VElement . |
Map<org.eclipse.emf.ecore.EStructuralFeature,VDiagnostic> |
getValuePerFeature(org.eclipse.emf.ecore.EObject domainObject)
Returns a Map containing all EStructuralFeatures and the corresponding value for the
provided domainObject. |
void |
removeDomainObject(org.eclipse.emf.ecore.EObject domainObject)
Removes the given domain object from the graph. |
void |
removeRenderable(VElement renderable)
Removes the given VElement from the graph. |
void |
update(VElement renderable,
org.eclipse.emf.ecore.EObject domainObject,
org.eclipse.emf.ecore.EStructuralFeature feature,
VDiagnostic value)
Updates the cached entry for the given EObject with the given value.If the cached entry does not yet exist, it will be created. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewModelGraph(VElement viewModel, org.eclipse.emf.ecore.EObject domainModel, Comparator<VDiagnostic> comparator)
viewModel
- the root of the view modeldomainModel
- the root of the domain modelcomparator
- the comparator that is used to compute the most distinctive valueMethod Detail |
---|
public abstract VDiagnostic getDefaultValue()
public VDiagnostic getValue(VElement renderable)
VElement
.
renderable
- the VElement
to fetch the value for
VElement
public Set<VDiagnostic> getAllValues(org.eclipse.emf.ecore.EObject domainObject)
domainObject
- the EObject
to search the values for
EObject
public Map<org.eclipse.emf.ecore.EStructuralFeature,VDiagnostic> getValuePerFeature(org.eclipse.emf.ecore.EObject domainObject)
EStructuralFeatures
and the corresponding value for the
provided domainObject.
domainObject
- the EObject
to search the map for
EStructuralFeatures
and its associated value, currently
associated with the provided EObject
public void update(VElement renderable, org.eclipse.emf.ecore.EObject domainObject, org.eclipse.emf.ecore.EStructuralFeature feature, VDiagnostic value)
EObject
with the given value.
renderable
- the VElement
that is referencing the feature
of the domainObject
domainObject
- the domain object that caused the value
to be computedfeature
- the EStructuralFeature
referenced by the Renderablevalue
- the actual valuepublic void removeDomainObject(org.eclipse.emf.ecore.EObject domainObject)
domainObject
- the domain object to be removedpublic void removeRenderable(VElement renderable)
VElement
from the graph.
renderable
- the VElement
be removed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |