org.eclipse.ocl.examples.domain.validation
Class DomainSubstitutionLabelProvider

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.validation.DomainSubstitutionLabelProvider
All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider

public class DomainSubstitutionLabelProvider
extends java.lang.Object
implements org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider

A DomainSubstitutionLabelProvider provides readable names for EObjects.


Field Summary
static DomainSubstitutionLabelProvider INSTANCE
           
 
Constructor Summary
DomainSubstitutionLabelProvider()
           
 
Method Summary
static java.util.Map<java.lang.Object,java.lang.Object> createDefaultContext(org.eclipse.emf.ecore.EValidator eValidator)
          Return a context map for use by EValidator.validate in which the EVlaidator.class key is mapped to the eValidator, and the EValidator.SubstitutionLabelProvider.class key is mapped to a DomainSubstitutionLabelProvider.
 java.lang.String getFeatureLabel(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
           
 java.lang.String getObjectLabel(org.eclipse.emf.ecore.EObject eObject)
           
 java.lang.String getValueLabel(org.eclipse.emf.ecore.EDataType eDataType, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static DomainSubstitutionLabelProvider INSTANCE
Constructor Detail

DomainSubstitutionLabelProvider

public DomainSubstitutionLabelProvider()
Method Detail

createDefaultContext

public static java.util.Map<java.lang.Object,java.lang.Object> createDefaultContext(org.eclipse.emf.ecore.EValidator eValidator)
Return a context map for use by EValidator.validate in which the EVlaidator.class key is mapped to the eValidator, and the EValidator.SubstitutionLabelProvider.class key is mapped to a DomainSubstitutionLabelProvider.


getObjectLabel

public java.lang.String getObjectLabel(org.eclipse.emf.ecore.EObject eObject)
Specified by:
getObjectLabel in interface org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider

getFeatureLabel

public java.lang.String getFeatureLabel(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
Specified by:
getFeatureLabel in interface org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider

getValueLabel

public java.lang.String getValueLabel(org.eclipse.emf.ecore.EDataType eDataType,
                                      java.lang.Object value)
Specified by:
getValueLabel in interface org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider