blob: 4388f91d7e3b7c0497cf190d1e3319c1c5e7cba5 [file] [log] [blame]
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.stem.diseasemodels.poliodiseasemodel.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.stem.core.common.Identifiable;
import org.eclipse.stem.core.common.SanityChecker;
import org.eclipse.stem.core.graph.DynamicLabel;
import org.eclipse.stem.core.graph.DynamicNodeLabel;
import org.eclipse.stem.core.graph.IntegrationLabel;
import org.eclipse.stem.core.graph.IntegrationLabelValue;
import org.eclipse.stem.core.graph.Label;
import org.eclipse.stem.core.graph.LabelValue;
import org.eclipse.stem.core.graph.NodeLabel;
import org.eclipse.stem.core.model.Decorator;
import org.eclipse.stem.core.model.IntegrationDecorator;
import org.eclipse.stem.core.model.NodeDecorator;
import org.eclipse.stem.core.modifier.Modifiable;
import org.eclipse.stem.diseasemodels.poliodiseasemodel.*;
import org.eclipse.stem.diseasemodels.standard.DeterministicSEIRDiseaseModel;
import org.eclipse.stem.diseasemodels.standard.DiseaseModel;
import org.eclipse.stem.diseasemodels.standard.DiseaseModelLabel;
import org.eclipse.stem.diseasemodels.standard.DiseaseModelLabelValue;
import org.eclipse.stem.diseasemodels.standard.SEIR;
import org.eclipse.stem.diseasemodels.standard.SEIRLabel;
import org.eclipse.stem.diseasemodels.standard.SEIRLabelValue;
import org.eclipse.stem.diseasemodels.standard.SI;
import org.eclipse.stem.diseasemodels.standard.SILabelValue;
import org.eclipse.stem.diseasemodels.standard.SIR;
import org.eclipse.stem.diseasemodels.standard.SIRLabelValue;
import org.eclipse.stem.diseasemodels.standard.StandardDiseaseModel;
import org.eclipse.stem.diseasemodels.standard.StandardDiseaseModelLabel;
import org.eclipse.stem.diseasemodels.standard.StandardDiseaseModelLabelValue;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see org.eclipse.stem.diseasemodels.poliodiseasemodel.PolioPackage
* @generated
*/
public class PolioSwitch<T1> extends Switch<T1> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PolioPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PolioSwitch() {
if (modelPackage == null) {
modelPackage = PolioPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @parameter ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T1 doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case PolioPackage.ORAL_POLIO_VACCINE_MODEL: {
OralPolioVaccineModel oralPolioVaccineModel = (OralPolioVaccineModel)theEObject;
T1 result = caseOralPolioVaccineModel(oralPolioVaccineModel);
if (result == null) result = caseDeterministicSEIRDiseaseModel(oralPolioVaccineModel);
if (result == null) result = caseSEIR(oralPolioVaccineModel);
if (result == null) result = caseSIR(oralPolioVaccineModel);
if (result == null) result = caseSI(oralPolioVaccineModel);
if (result == null) result = caseStandardDiseaseModel(oralPolioVaccineModel);
if (result == null) result = caseDiseaseModel(oralPolioVaccineModel);
if (result == null) result = caseIntegrationDecorator(oralPolioVaccineModel);
if (result == null) result = caseModifiable(oralPolioVaccineModel);
if (result == null) result = caseNodeDecorator(oralPolioVaccineModel);
if (result == null) result = caseDecorator(oralPolioVaccineModel);
if (result == null) result = caseIdentifiable(oralPolioVaccineModel);
if (result == null) result = caseComparable(oralPolioVaccineModel);
if (result == null) result = caseSanityChecker(oralPolioVaccineModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PolioPackage.OPV_LABEL: {
OpvLabel opvLabel = (OpvLabel)theEObject;
T1 result = caseOpvLabel(opvLabel);
if (result == null) result = caseSEIRLabel(opvLabel);
if (result == null) result = caseStandardDiseaseModelLabel(opvLabel);
if (result == null) result = caseDiseaseModelLabel(opvLabel);
if (result == null) result = caseIntegrationLabel(opvLabel);
if (result == null) result = caseDynamicNodeLabel(opvLabel);
if (result == null) result = caseDynamicLabel(opvLabel);
if (result == null) result = caseNodeLabel(opvLabel);
if (result == null) result = caseLabel(opvLabel);
if (result == null) result = caseIdentifiable(opvLabel);
if (result == null) result = caseComparable(opvLabel);
if (result == null) result = caseSanityChecker(opvLabel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PolioPackage.OPV_LABEL_VALUE: {
OpvLabelValue opvLabelValue = (OpvLabelValue)theEObject;
T1 result = caseOpvLabelValue(opvLabelValue);
if (result == null) result = caseSEIRLabelValue(opvLabelValue);
if (result == null) result = caseSIRLabelValue(opvLabelValue);
if (result == null) result = caseSILabelValue(opvLabelValue);
if (result == null) result = caseStandardDiseaseModelLabelValue(opvLabelValue);
if (result == null) result = caseDiseaseModelLabelValue(opvLabelValue);
if (result == null) result = caseIntegrationLabelValue(opvLabelValue);
if (result == null) result = caseLabelValue(opvLabelValue);
if (result == null) result = caseSanityChecker(opvLabelValue);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Oral Polio Vaccine Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Oral Polio Vaccine Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseOralPolioVaccineModel(OralPolioVaccineModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Opv Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Opv Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseOpvLabel(OpvLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Opv Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Opv Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseOpvLabelValue(OpvLabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Comparable</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Comparable</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public <T> T1 caseComparable(Comparable<T> object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Sanity Checker</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Sanity Checker</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSanityChecker(SanityChecker object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Identifiable</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Identifiable</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseIdentifiable(Identifiable object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Decorator</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Decorator</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDecorator(Decorator object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Node Decorator</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Node Decorator</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseNodeDecorator(NodeDecorator object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integration Decorator</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Integration Decorator</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseIntegrationDecorator(IntegrationDecorator object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Modifiable</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Modifiable</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseModifiable(Modifiable object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Disease Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Disease Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDiseaseModel(DiseaseModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Disease Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Disease Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseStandardDiseaseModel(StandardDiseaseModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SI</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SI</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSI(SI object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SIR</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SIR</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSIR(SIR object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SEIR</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SEIR</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSEIR(SEIR object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Deterministic SEIR Disease Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Deterministic SEIR Disease Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDeterministicSEIRDiseaseModel(DeterministicSEIRDiseaseModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseLabel(Label object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Dynamic Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Dynamic Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDynamicLabel(DynamicLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Node Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Node Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseNodeLabel(NodeLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Dynamic Node Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Dynamic Node Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDynamicNodeLabel(DynamicNodeLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integration Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Integration Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseIntegrationLabel(IntegrationLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Disease Model Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Disease Model Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDiseaseModelLabel(DiseaseModelLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Disease Model Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Disease Model Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseStandardDiseaseModelLabel(StandardDiseaseModelLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SEIR Label</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SEIR Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSEIRLabel(SEIRLabel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseLabelValue(LabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integration Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Integration Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseIntegrationLabelValue(IntegrationLabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Disease Model Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Disease Model Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseDiseaseModelLabelValue(DiseaseModelLabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Disease Model Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Disease Model Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseStandardDiseaseModelLabelValue(StandardDiseaseModelLabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SI Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SI Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSILabelValue(SILabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SIR Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SIR Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSIRLabelValue(SIRLabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>SEIR Label Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>SEIR Label Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T1 caseSEIRLabelValue(SEIRLabelValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T1 defaultCase(EObject object) {
return null;
}
} //PolioSwitch