//------------------------------------------------------------------------------ // Copyright (c) 2005, 2006 IBM Corporation and others. // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at // http://www.eclipse.org/legal/epl-v10.html // // Contributors: // IBM Corporation - initial implementation //------------------------------------------------------------------------------ package org.eclipse.epf.diagram.model.util; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; import org.eclipse.epf.diagram.model.*; import org.eclipse.epf.diagram.model.ActivityDetailDiagram; import org.eclipse.epf.diagram.model.ActivityDiagram; import org.eclipse.epf.diagram.model.Diagram; import org.eclipse.epf.diagram.model.Link; import org.eclipse.epf.diagram.model.LinkedObject; import org.eclipse.epf.diagram.model.ModelPackage; import org.eclipse.epf.diagram.model.NamedNode; import org.eclipse.epf.diagram.model.Node; import org.eclipse.epf.diagram.model.NodeContainer; import org.eclipse.epf.diagram.model.RoleNode; import org.eclipse.epf.diagram.model.RoleTaskComposite; import org.eclipse.epf.diagram.model.TaskNode; import org.eclipse.epf.diagram.model.TypedNode; import org.eclipse.epf.diagram.model.WorkBreakdownElementNode; import org.eclipse.epf.diagram.model.WorkProductComposite; import org.eclipse.epf.diagram.model.WorkProductDependencyDiagram; import org.eclipse.epf.diagram.model.WorkProductDescriptorNode; import org.eclipse.epf.diagram.model.WorkProductNode; /** * <!-- begin-user-doc --> * The <b>Adapter Factory</b> for the model. * It provides an adapter <code>createXXX</code> method for each class of the model. * <!-- end-user-doc --> * @see org.eclipse.epf.diagram.model.ModelPackage * @generated */ public class ModelAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static ModelPackage modelPackage; /** * Creates an instance of the adapter factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ModelAdapterFactory() { if (modelPackage == null) { modelPackage = ModelPackage.eINSTANCE; } } /** * Returns whether this factory is applicable for the type of the object. * <!-- begin-user-doc --> * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. * <!-- end-user-doc --> * @return whether this factory is applicable for the type of the object. * @generated */ @Override public boolean isFactoryForType(Object object) { if (object == modelPackage) { return true; } if (object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; } /** * The switch the delegates to the <code>createXXX</code> methods. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ModelSwitch<Adapter> modelSwitch = new ModelSwitch<Adapter>() { @Override public Adapter caseDiagram(Diagram object) { return createDiagramAdapter(); } @Override public Adapter caseLink(Link object) { return createLinkAdapter(); } @Override public Adapter caseLinkedObject(LinkedObject object) { return createLinkedObjectAdapter(); } @Override public Adapter caseNamedNode(NamedNode object) { return createNamedNodeAdapter(); } @Override public Adapter caseNode(Node object) { return createNodeAdapter(); } @Override public Adapter caseActivityDiagram(ActivityDiagram object) { return createActivityDiagramAdapter(); } @Override public Adapter caseTypedNode(TypedNode object) { return createTypedNodeAdapter(); } @Override public Adapter caseWorkProductDependencyDiagram(WorkProductDependencyDiagram object) { return createWorkProductDependencyDiagramAdapter(); } @Override public Adapter caseWorkProductNode(WorkProductNode object) { return createWorkProductNodeAdapter(); } @Override public Adapter caseActivityDetailDiagram(ActivityDetailDiagram object) { return createActivityDetailDiagramAdapter(); } @Override public Adapter caseNodeContainer(NodeContainer object) { return createNodeContainerAdapter(); } @Override public Adapter caseRoleNode(RoleNode object) { return createRoleNodeAdapter(); } @Override public Adapter caseRoleTaskComposite(RoleTaskComposite object) { return createRoleTaskCompositeAdapter(); } @Override public Adapter caseTaskNode(TaskNode object) { return createTaskNodeAdapter(); } @Override public Adapter caseWorkProductDescriptorNode(WorkProductDescriptorNode object) { return createWorkProductDescriptorNodeAdapter(); } @Override public Adapter caseWorkBreakdownElementNode(WorkBreakdownElementNode object) { return createWorkBreakdownElementNodeAdapter(); } @Override public Adapter caseWorkProductComposite(WorkProductComposite object) { return createWorkProductCompositeAdapter(); } @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } }; /** * Creates an adapter for the <code>target</code>. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param target the object to adapt. * @return the adapter for the <code>target</code>. * @generated */ @Override public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject)target); } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.Diagram <em>Diagram</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.Diagram * @generated */ public Adapter createDiagramAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.Link <em>Link</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.Link * @generated */ public Adapter createLinkAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.LinkedObject <em>Linked Object</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.LinkedObject * @generated */ public Adapter createLinkedObjectAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.NamedNode <em>Named Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.NamedNode * @generated */ public Adapter createNamedNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.Node <em>Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.Node * @generated */ public Adapter createNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.ActivityDiagram <em>Activity Diagram</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.ActivityDiagram * @generated */ public Adapter createActivityDiagramAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.TypedNode <em>Typed Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.TypedNode * @generated */ public Adapter createTypedNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.WorkProductDependencyDiagram <em>Work Product Dependency Diagram</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.WorkProductDependencyDiagram * @generated */ public Adapter createWorkProductDependencyDiagramAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.WorkProductNode <em>Work Product Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.WorkProductNode * @generated */ public Adapter createWorkProductNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.ActivityDetailDiagram <em>Activity Detail Diagram</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.ActivityDetailDiagram * @generated */ public Adapter createActivityDetailDiagramAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.NodeContainer <em>Node Container</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.NodeContainer * @generated */ public Adapter createNodeContainerAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.RoleNode <em>Role Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.RoleNode * @generated */ public Adapter createRoleNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.RoleTaskComposite <em>Role Task Composite</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.RoleTaskComposite * @generated */ public Adapter createRoleTaskCompositeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.TaskNode <em>Task Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.TaskNode * @generated */ public Adapter createTaskNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.WorkProductDescriptorNode <em>Work Product Descriptor Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.WorkProductDescriptorNode * @generated */ public Adapter createWorkProductDescriptorNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.WorkBreakdownElementNode <em>Work Breakdown Element Node</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.WorkBreakdownElementNode * @generated */ public Adapter createWorkBreakdownElementNodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.epf.diagram.model.WorkProductComposite <em>Work Product Composite</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.epf.diagram.model.WorkProductComposite * @generated */ public Adapter createWorkProductCompositeAdapter() { return null; } /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. * <!-- end-user-doc --> * @return the new adapter. * @generated */ public Adapter createEObjectAdapter() { return null; } } //ModelAdapterFactory