org.eclipse.ocl.examples.xtext.base.utilities
Class CSI2PivotMapping

java.lang.Object
  extended by org.eclipse.ocl.examples.xtext.base.utilities.CSI2PivotMapping

public class CSI2PivotMapping
extends java.lang.Object

The CSI2PivotMapping maintains the mapping between CS elements or rather their CSIs that remain stable after recreation and the Pivot elements. This mapping may be used repeatedly while editing (CS2Pivot conversions) to associate changing CS elements with stable Pivot elements. The mapping may also be created during a Pivot2CS conversion to allow subsequent CS2Pivot conversions to reuse the original Pivot elements.


Constructor Summary
CSI2PivotMapping(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
           
CSI2PivotMapping(CSI2PivotMapping cs2PivotMapping)
           
 
Method Summary
 void clear()
           
 java.util.Set<java.lang.String> computeCSIs(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
           
 Element get(ModelElementCS csElement)
          Return the Pivot element corresponding to a given CS element.
 java.util.Map<java.lang.String,Element> getMapping()
           
 void put(ModelElementCS csElement, Element pivotElement)
          Install the Pivot element corresponding to a given CS element.
 void update(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
          Update the mapping to cache the Pivot elements for all CS elements in csResources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSI2PivotMapping

public CSI2PivotMapping(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)

CSI2PivotMapping

public CSI2PivotMapping(CSI2PivotMapping cs2PivotMapping)
Method Detail

clear

public void clear()

computeCSIs

public java.util.Set<java.lang.String> computeCSIs(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)

get

public Element get(ModelElementCS csElement)
Return the Pivot element corresponding to a given CS element.


getMapping

public java.util.Map<java.lang.String,Element> getMapping()

put

public void put(ModelElementCS csElement,
                Element pivotElement)
Install the Pivot element corresponding to a given CS element.


update

public void update(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
Update the mapping to cache the Pivot elements for all CS elements in csResources.