/**_x000D_
 * <copyright>_x000D_
 * </copyright>_x000D_
 *_x000D_
 * $Id$_x000D_
 */_x000D_
package RefOntoUML.impl;_x000D_
_x000D_
import RefOntoUML.Characterization;_x000D_
import RefOntoUML.Classifier;_x000D_
import RefOntoUML.Property;_x000D_
import RefOntoUML.RefOntoUMLPackage;_x000D_
_x000D_
import org.eclipse.emf.ecore.EAnnotation;_x000D_
import org.eclipse.emf.ecore.EClass;_x000D_
import org.eclipse.emf.ecore.EClassifier;_x000D_
import org.eclipse.emf.ecore.EOperation;_x000D_
_x000D_
import org.eclipse.ocl.ParserException;_x000D_
import org.eclipse.ocl.Query;_x000D_
_x000D_
import org.eclipse.ocl.ecore.OCL;_x000D_
_x000D_
import org.eclipse.ocl.expressions.OCLExpression;_x000D_
_x000D_
/**_x000D_
 * <!-- begin-user-doc -->_x000D_
 * An implementation of the model object '<em><b>Characterization</b></em>'._x000D_
 * <!-- end-user-doc -->_x000D_
 * <p>_x000D_
 * </p>_x000D_
 *_x000D_
 * @generated_x000D_
 */_x000D_
public class CharacterizationImpl extends DependencyRelationshipImpl implements Characterization {_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	protected CharacterizationImpl() {_x000D_
		super();_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	@Override_x000D_
	protected EClass eStaticClass() {_x000D_
		return RefOntoUMLPackage.eINSTANCE.getCharacterization();_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Property characterizingEnd() {_x000D_
		if (characterizingEndBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(0);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizingEndBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizingEndBodyOCL);_x000D_
	_x000D_
		return (Property) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Property characterizedEnd() {_x000D_
		if (characterizedEndBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(1);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizedEndBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizedEndBodyOCL);_x000D_
	_x000D_
		return (Property) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Classifier characterizing() {_x000D_
		if (characterizingBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(2);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizingBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizingBodyOCL);_x000D_
	_x000D_
		return (Classifier) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Classifier characterized() {_x000D_
		if (characterizedBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(3);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizedBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizedBodyOCL);_x000D_
	_x000D_
		return (Classifier) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterizingEnd <em>Characterizing End</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterizingEnd_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizingEndBodyOCL;_x000D_
	_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterizedEnd <em>Characterized End</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterizedEnd_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizedEndBodyOCL;_x000D_
	_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterizing <em>Characterizing</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterizing_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizingBodyOCL;_x000D_
	_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterized <em>Characterized</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterized_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizedBodyOCL;_x000D_
	_x000D_
	private static final String OCL_ANNOTATION_SOURCE = "http://www.eclipse.org/ocl/examples/OCL";_x000D_
	_x000D_
	private static final OCL OCL_ENV = OCL.newInstance();_x000D_
} //CharacterizationImpl_x000D_

/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */
/**_x000D_
 * <copyright>_x000D_
 * </copyright>_x000D_
 *_x000D_
 * $Id$_x000D_
 */_x000D_
package RefOntoUML.impl;_x000D_
_x000D_
import RefOntoUML.Characterization;_x000D_
import RefOntoUML.Classifier;_x000D_
import RefOntoUML.Property;_x000D_
import RefOntoUML.RefOntoUMLPackage;_x000D_
_x000D_
import org.eclipse.emf.ecore.EAnnotation;_x000D_
import org.eclipse.emf.ecore.EClass;_x000D_
import org.eclipse.emf.ecore.EClassifier;_x000D_
import org.eclipse.emf.ecore.EOperation;_x000D_
_x000D_
import org.eclipse.ocl.ParserException;_x000D_
import org.eclipse.ocl.Query;_x000D_
_x000D_
import org.eclipse.ocl.ecore.OCL;_x000D_
_x000D_
import org.eclipse.ocl.expressions.OCLExpression;_x000D_
_x000D_
/**_x000D_
 * <!-- begin-user-doc -->_x000D_
 * An implementation of the model object '<em><b>Characterization</b></em>'._x000D_
 * <!-- end-user-doc -->_x000D_
 * <p>_x000D_
 * </p>_x000D_
 *_x000D_
 * @generated_x000D_
 */_x000D_
public class CharacterizationImpl extends DependencyRelationshipImpl implements Characterization {_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	protected CharacterizationImpl() {_x000D_
		super();_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	@Override_x000D_
	protected EClass eStaticClass() {_x000D_
		return RefOntoUMLPackage.eINSTANCE.getCharacterization();_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Property characterizingEnd() {_x000D_
		if (characterizingEndBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(0);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizingEndBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizingEndBodyOCL);_x000D_
	_x000D_
		return (Property) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Property characterizedEnd() {_x000D_
		if (characterizedEndBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(1);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizedEndBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizedEndBodyOCL);_x000D_
	_x000D_
		return (Property) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_<SUF>*/_x000D_
	public Classifier characterizing() {_x000D_
		if (characterizingBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(2);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizingBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizingBodyOCL);_x000D_
	_x000D_
		return (Classifier) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @generated_x000D_
	 */_x000D_
	public Classifier characterized() {_x000D_
		if (characterizedBodyOCL == null) {_x000D_
			EOperation eOperation = RefOntoUMLPackage.eINSTANCE.getCharacterization().getEOperations().get(3);_x000D_
			OCL.Helper helper = OCL_ENV.createOCLHelper();_x000D_
			helper.setOperationContext(RefOntoUMLPackage.eINSTANCE.getCharacterization(), eOperation);_x000D_
			EAnnotation ocl = eOperation.getEAnnotation(OCL_ANNOTATION_SOURCE);_x000D_
			String body = ocl.getDetails().get("body");_x000D_
			_x000D_
			try {_x000D_
				characterizedBodyOCL = helper.createQuery(body);_x000D_
			} catch (ParserException e) {_x000D_
				throw new UnsupportedOperationException(e.getLocalizedMessage());_x000D_
			}_x000D_
		}_x000D_
		_x000D_
		Query<EClassifier, ?, ?> query = OCL_ENV.createQuery(characterizedBodyOCL);_x000D_
	_x000D_
		return (Classifier) query.evaluate(this);_x000D_
	_x000D_
	}_x000D_
_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterizingEnd <em>Characterizing End</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterizingEnd_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizingEndBodyOCL;_x000D_
	_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterizedEnd <em>Characterized End</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterizedEnd_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizedEndBodyOCL;_x000D_
	_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterizing <em>Characterizing</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterizing_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizingBodyOCL;_x000D_
	_x000D_
	/**_x000D_
	 * The parsed OCL expression for the body of the '{@link #characterized <em>Characterized</em>}' operation._x000D_
	 * <!-- begin-user-doc -->_x000D_
	 * <!-- end-user-doc -->_x000D_
	 * @see #characterized_x000D_
	 * @generated_x000D_
	 */_x000D_
	private static OCLExpression<EClassifier> characterizedBodyOCL;_x000D_
	_x000D_
	private static final String OCL_ANNOTATION_SOURCE = "http://www.eclipse.org/ocl/examples/OCL";_x000D_
	_x000D_
	private static final OCL OCL_ENV = OCL.newInstance();_x000D_
} //CharacterizationImpl_x000D_
