org.eclipse.jst.jsf.facesconfig.ui_1.2.2.v201103292152

sgs);
  }
  
  public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
  {
    if (eContainerFeatureID >= 0)
    {
      switch (eContainerFeatureID)
      {
      case 5: 
        return eContainer.eInverseRemove(this, 
          13, PageflowLink.class, 
          msgs);
      }
      return eDynamicBasicRemoveFromContainer(msgs);
    }
    return eContainer.eInverseRemove(this, 
      -1 - eContainerFeatureID, null, msgs);
  }
  
  public Object eGet(EStructuralFeature eFeature, boolean resolve)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      return new Integer(getD1Width());
    case 1: 
      return new Integer(getD1Height());
    case 2: 
      return new Integer(getD2Width());
    case 3: 
      return new Integer(getD2Height());
    case 4: 
      return new Float(getWeight());
    case 5: 
      return getLink();
    }
    return eDynamicGet(eFeature, resolve);
  }
  
  public void eSet(EStructuralFeature eFeature, Object newValue)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      setD1Width(((Integer)newValue).intValue());
      return;
    case 1: 
      setD1Height(((Integer)newValue).intValue());
      return;
    case 2: 
      setD2Width(((Integer)newValue).intValue());
      return;
    case 3: 
      setD2Height(((Integer)newValue).intValue());
      return;
    case 4: 
      setWeight(((Float)newValue).floatValue());
      return;
    case 5: 
      setLink((PageflowLink)newValue);
      return;
    }
    eDynamicSet(eFeature, newValue);
  }
  
  public void eUnset(EStructuralFeature eFeature)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      setD1Width(0);
      return;
    case 1: 
      setD1Height(0);
      return;
    case 2: 
      setD2Width(0);
      return;
    case 3: 
      setD2Height(0);
      return;
    case 4: 
      setWeight(0.5F);
      return;
    case 5: 
      setLink(null);
      return;
    }
    eDynamicUnset(eFeature);
  }
  
  public boolean eIsSet(EStructuralFeature eFeature)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      return d1Width != 0;
    case 1: 
      return d1Height != 0;
    case 2: 
      return d2Width != 0;
    case 3: 
      return d2Height != 0;
    case 4: 
      return weight != 0.5F;
    case 5: 
      return getLink() != null;
    }
    return eDynamicIsSet(eFeature);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (d1Width: ");
    result.append(d1Width);
    result.append(", d1Height: ");
    result.append(d1Height);
    result.append(", d2Width: ");
    result.append(d2Width);
    result.append(", d2Height: ");
    result.append(d2Height);
    result.append(", weight: ");
    result.append(weight);
    result.append(')');
    return result.toString();
  }
  
  public Dimension getFirstRelativeDimension()
  {
    dimStart = new Dimension(getD1Width(), getD1Height());
    return dimStart;
  }
  
  public Dimension getSecondRelativeDimension()
  {
    dimEnd = new Dimension(getD2Width(), getD2Height());
    return dimEnd;
  }
  
  public void setRelativeDimensions(Dimension dim1, Dimension dim2)
  {
    dimStart = dim1;
    dimEnd = dim2;
    setD1Width(dimStart.width);
    setD1Height(dimStart.height);
    
    setD2Width(dimEnd.width);
    setD2Height(dimEnd.height);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.impl.PageflowLinkBendpointImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.impl;

import java.util.Collection;
import java.util.Vector;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.PageflowMessages;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.Pageflow;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLink;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLinkBendpoint;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowNode;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPackage;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPage;
import org.eclipse.osgi.util.NLS;

public class PageflowLinkImpl
  extends PageflowElementImpl
  implements PageflowLink
{
  protected PageflowNode target = null;
  protected PageflowNode source = null;
  protected static final String OUTCOME_EDEFAULT = null;
  protected static final boolean REDIRECT_EDEFAULT = false;
  protected EList bendPoints = null;
  protected static final String SMALLICON_EDEFAULT = null;
  protected static final String LARGEICON_EDEFAULT = null;
  protected static final String FROMACTION_EDEFAULT = null;
  
  protected EClass eStaticClass()
  {
    return PageflowPackage.eINSTANCE.getPFLink();
  }
  
  public Pageflow getPageflow()
  {
    if (eContainerFeatureID != 8) {
      return null;
    }
    return (Pageflow)eContainer;
  }
  
  public void setPageflow(Pageflow newPageflow)
  {
    if ((newPageflow != eContainer) || (
      (eContainerFeatureID != 8) && (newPageflow != null)))
    {
      if (EcoreUtil.isAncestor(this, newPageflow)) {
        throw new IllegalArgumentException(
          NLS.bind(PageflowMessages.PageflowNode_NoRecursiveContainment, toString()));
      }
      NotificationChain msgs = null;
      if (eContainer != null) {
        msgs = eBasicRemoveFromContainer(msgs);
      }
      if (newPageflow != null) {
        msgs = ((InternalEObject)newPageflow).eInverseAdd(this, 
          9, Pageflow.class, msgs);
      }
      msgs = eBasicSetContainer((InternalEObject)newPageflow, 
        8, msgs);
      if (msgs != null) {
        msgs.dispatch();
      }
    }
    else if (eNotificationRequired())
    {
      eNotify(new ENotificationImpl(this, 1, 
        8, newPageflow, newPageflow));
    }
  }
  
  public PageflowNode getTarget()
  {
    if ((target != null) && (target.eIsProxy()))
    {
      PageflowNode oldTarget = target;
      target = ((PageflowNode)eResolveProxy((InternalEObject)target));
      if ((target != oldTarget) && 
        (eNotificationRequired())) {
        eNotify(new ENotificationImpl(this, 9, 
          9, oldTarget, target));
      }
    }
    return target;
  }
  
  public void setSourcePath(String path)
  {
    if ((getSource() != null) && 
      (path.equals(((PageflowPage)getSource()).getPath()))) {
      return;
    }
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        10, getSource(), path));
    }
  }
  
  public void setTargetPath(String path)
  {
    if ((getTarget() != null) && 
      (path.equals(((PageflowPage)getTarget()).getPath()))) {
      return;
    }
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        9, getTarget(), path));
    }
  }
  
  public PageflowNode basicGetTarget()
  {
    return target;
  }
  
  public NotificationChain basicSetTarget(PageflowNode newTarget, NotificationChain msgs)
  {
    PageflowNode oldTarget = target;
    target = newTarget;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, 
        1, 9, 
        oldTarget, newTarget);
      if (msgs == null) {
        msgs = notification;
      } else {
        msgs.add(notification);
      }
    }
    return msgs;
  }
  
  public void setTarget(PageflowNode newTarget)
  {
    if (newTarget != target)
    {
      NotificationChain msgs = null;
      if (target != null) {
        msgs = ((InternalEObject)target).eInverseRemove(this, 
          10, 
          PageflowNode.class, msgs);
      }
      if (newTarget != null) {
        msgs = ((InternalEObject)newTarget).eInverseAdd(this, 
          10, 
          PageflowNode.class, msgs);
      }
      msgs = basicSetTarget(newTarget, msgs);
      if (msgs != null) {
        msgs.dispatch();
      }
    }
    else if (eNotificationRequired())
    {
      eNotify(new ENotificationImpl(this, 1, 
        9, newTarget, newTarget));
    }
  }
  
  public PageflowNode getSource()
  {
    if ((source != null) && (source.eIsProxy()))
    {
      PageflowNode oldSource = source;
      source = ((PageflowNode)eResolveProxy((InternalEObject)source));
      if ((source != oldSource) && 
        (eNotificationRequired())) {
        eNotify(new ENotificationImpl(this, 9, 
          10, oldSource, source));
      }
    }
    return source;
  }
  
  public PageflowNode basicGetSource()
  {
    return source;
  }
  
  public NotificationChain basicSetSource(PageflowNode newSource, NotificationChain msgs)
  {
    PageflowNode oldSource = source;
    source = newSource;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, 
        1, 10, 
        oldSource, newSource);
      if (msgs == null) {
        msgs = notification;
      } else {
        msgs.add(notification);
      }
    }
    return msgs;
  }
  
  public void setSource(PageflowNode newSource)
  {
    if (newSource != source)
    {
      NotificationChain msgs = null;
      if (source != null) {
        msgs = ((InternalEObject)source).eInverseRemove(this, 
          9, 
          PageflowNode.class, msgs);
      }
      if (newSource != null) {
        msgs = ((InternalEObject)newSource).eInverseAdd(this, 
          9, 
          PageflowNode.class, msgs);
      }
      msgs = basicSetSource(newSource, msgs);
      if (msgs != null) {
        msgs.dispatch();
      }
    }
    else if (eNotificationRequired())
    {
      eNotify(new ENotificationImpl(this, 1, 
        10, newSource, newSource));
    }
  }
  
  public EList getBendPoints()
  {
    if (bendPoints == null) {
      bendPoints = new EObjectContainmentWithInverseEList(
        PageflowLinkBendpoint.class, this, 
        13, 
        5);
    }
    return bendPoints;
  }
  
  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
  {
    if (featureID >= 0)
    {
      switch (eDerivedStructuralFeatureID(featureID, baseClass))
      {
      case 8: 
        if (eContainer != null) {
          msgs = eBasicRemoveFromContainer(msgs);
        }
        return eBasicSetContainer(otherEnd, 
          8, msgs);
      case 9: 
        if (target != null) {
          msgs = ((InternalEObject)target).eInverseRemove(this, 
            10, 
            PageflowNode.class, msgs);
        }
        return basicSetTarget((PageflowNode)otherEnd, msgs);
      case 10: 
        if (source != null) {
          msgs = ((InternalEObject)source).eInverseRemove(this, 
            9, 
            PageflowNode.class, msgs);
        }
        return basicSetSource((PageflowNode)otherEnd, msgs);
      case 13: 
        return ((InternalEList)getBendPoints()).basicAdd(otherEnd, 
          msgs);
      }
      return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
    }
    if (eContainer != null) {
      msgs = eBasicRemoveFromContainer(msgs);
    }
    return eBasicSetContainer(otherEnd, featureID, msgs);
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
  {
    if (featureID >= 0)
    {
      switch (eDerivedStructuralFeatureID(featureID, baseClass))
      {
      case 8: 
        return eBasicSetContainer(null, 
          8, msgs);
      case 9: 
        return basicSetTarget(null, msgs);
      case 10: 
        return basicSetSource(null, msgs);
      case 13: 
        return ((InternalEList)getBendPoints()).basicRemove(otherEnd, 
          msgs);
      }
      return eDynamicInverseRemove(otherEnd, featureID, baseClass, 
        msgs);
    }
    return eBasicSetContainer(null, featureID, msgs);
  }
  
  public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
  {
    if (eContainerFeatureID >= 0)
    {
      switch (eContainerFeatureID)
      {
      case 8: 
        return eContainer.eInverseRemove(this, 
          9, Pageflow.class, msgs);
      }
      return eDynamicBasicRemoveFromContainer(msgs);
    }
    return eContainer.eInverseRemove(this, 
      -1 - eContainerFeatureID, null, msgs);
  }
  
  public Object eGet(EStructuralFeature eFeature, boolean resolve)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      return getName();
    case 1: 
      return getComment();
    case 2: 
      return new Integer(getX());
    case 3: 
      return new Integer(getY());
    case 4: 
      return new Integer(getWidth());
    case 5: 
      return new Integer(getHeight());
    case 6: 
      return getId();
    case 8: 
      return getPageflow();
    case 9: 
      if (resolve) {
        return getTarget();
      }
      return basicGetTarget();
    case 10: 
      if (resolve) {
        return getSource();
      }
      return basicGetSource();
    case 11: 
      return getOutcome();
    case 12: 
      return isRedirect() ? Boolean.TRUE : Boolean.FALSE;
    case 13: 
      return getBendPoints();
    case 14: 
      return getSmallicon();
    case 15: 
      return getLargeicon();
    case 16: 
      return getFromaction();
    }
    return super.eGet(eFeature, resolve);
  }
  
  public void eSet(EStructuralFeature eFeature, Object newValue)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      setName((String)newValue);
      return;
    case 1: 
      setComment((String)newValue);
      return;
    case 2: 
      setX(((Integer)newValue).intValue());
      return;
    case 3: 
      setY(((Integer)newValue).intValue());
      return;
    case 4: 
      setWidth(((Integer)newValue).intValue());
      return;
    case 5: 
      setHeight(((Integer)newValue).intValue());
      return;
    case 6: 
      setId((String)newValue);
      return;
    case 8: 
      setPageflow((Pageflow)newValue);
      return;
    case 9: 
      setTarget((PageflowNode)newValue);
      return;
    case 10: 
      setSource((PageflowNode)newValue);
      return;
    case 11: 
      setOutcome((String)newValue);
      return;
    case 12: 
      setRedirect(((Boolean)newValue).booleanValue());
      return;
    case 13: 
      getBendPoints().clear();
      getBendPoints().addAll((Collection)newValue);
      return;
    case 14: 
      setSmallicon((String)newValue);
      return;
    case 15: 
      setLargeicon((String)newValue);
      return;
    case 16: 
      setFromaction((String)newValue);
      return;
    }
    super.eSet(eFeature, newValue);
  }
  
  public void eUnset(EStructuralFeature eFeature)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      setName("unnamed");
      return;
    case 1: 
      setComment(COMMENT_EDEFAULT);
      return;
    case 2: 
      setX(0);
      return;
    case 3: 
      setY(0);
      return;
    case 4: 
      setWidth(-1);
      return;
    case 5: 
      setHeight(-1);
      return;
    case 6: 
      setId(ID_EDEFAULT);
      return;
    case 8: 
      setPageflow(null);
      return;
    case 9: 
      setTarget(null);
      return;
    case 10: 
      setSource(null);
      return;
    case 11: 
      setOutcome(OUTCOME_EDEFAULT);
      return;
    case 12: 
      setRedirect(false);
      return;
    case 13: 
      getBendPoints().clear();
      return;
    case 14: 
      setSmallicon(SMALLICON_EDEFAULT);
      return;
    case 15: 
      setLargeicon(LARGEICON_EDEFAULT);
      return;
    case 16: 
      setFromaction(FROMACTION_EDEFAULT);
      return;
    }
    super.eUnset(eFeature);
  }
  
  public boolean eIsSet(EStructuralFeature eFeature)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      return name != null;
    case 1: 
      return comment != null;
    case 2: 
      return x != 0;
    case 3: 
      return y != 0;
    case 4: 
      return width != -1;
    case 5: 
      return height != -1;
    case 6: 
      return getId() != null;
    case 8: 
      return getPageflow() != null;
    case 9: 
      return target != null;
    case 10: 
      return source != null;
    case 11: 
      return getOutcome() != null;
    case 12: 
      return isRedirect();
    case 13: 
      return (bendPoints != null) && (!bendPoints.isEmpty());
    case 14: 
      return getSmallicon() != null;
    case 15: 
      return getLargeicon() != null;
    case 16: 
      return getFromaction() != null;
    }
    return super.eIsSet(eFeature);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (smallicon: ");
    result.append(getSmallicon());
    result.append(", largeicon: ");
    result.append(getLargeicon());
    result.append(", fromaction: ");
    result.append(getFromaction());
    result.append(", outcome: ");
    result.append(getOutcome());
    result.append(", redirect: ");
    result.append(isRedirect());
    result.append(')');
    return result.toString();
  }
  
  public void insertBendpoint(int index, PageflowLinkBendpoint point)
  {
    getBendPoints().add(index, point);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 3, 
        13, null, point));
    }
  }
  
  public void removeBendpoint(int index)
  {
    getBendPoints().remove(index);
  }
  
  public void setBendpoint(int index, PageflowLinkBendpoint point)
  {
    getBendPoints().set(index, point);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        13, null, point));
    }
  }
  
  public void setBendpoints(Vector points)
  {
    bendPoints = ((EList)points);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 5, 
        13, null, points));
    }
  }
  
  public boolean isRedirect()
  {
    Boolean result = (Boolean)getFCElements().get(
      12);
    return result.booleanValue();
  }
  
  public void setRedirect(boolean newRedirect)
  {
    Boolean oldRedirect = new Boolean(isRedirect());
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        12, oldRedirect, 
        new Boolean(newRedirect)));
    }
  }
  
  public String getOutcome()
  {
    String result = (String)getFCElements().get(
      11);
    
    return result;
  }
  
  public void setOutcome(String newValue)
  {
    String oldOutcome = getOutcome();
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        11, oldOutcome, newValue));
    }
  }
  
  public String getSmallicon()
  {
    String result = (String)getFCElements().get(
      14);
    return result;
  }
  
  public void setSmallicon(String newValue)
  {
    String oldSmallicon = getSmallicon();
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        14, oldSmallicon, newValue));
    }
  }
  
  public String getLargeicon()
  {
    String result = (String)getFCElements().get(
      15);
    
    return result;
  }
  
  public void setLargeicon(String newValue)
  {
    String oldLargeIcon = getLargeicon();
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        15, oldLargeIcon, newValue));
    }
  }
  
  public String getFromaction()
  {
    String result = (String)getFCElements().get(
      16);
    return result;
  }
  
  public void setFromaction(String newFromaction)
  {
    String oldFromActionType = getFromaction();
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 
        16, oldFromActionType, 
        newFromaction));
    }
  }
  
  public ReferenceElement getFCElements()
  {
    if (refElement == null) {
      refElement = new LinkReferenceElement(this);
    }
    return refElement;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.impl.PageflowLinkImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.impl;

import java.util.Collection;
import java.util.Iterator;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.PageflowMessages;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.Pageflow;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLink;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowNode;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPackage;
import org.eclipse.osgi.util.NLS;

public abstract class PageflowNodeImpl
  extends PageflowElementImpl
  implements PageflowNode
{
  protected EList outlinks = null;
  protected EList inlinks = null;
  
  protected EClass eStaticClass()
  {
    return PageflowPackage.eINSTANCE.getPageflowNode();
  }
  
  public Pageflow getPageflow()
  {
    if (eContainerFeatureID != 8) {
      return null;
    }
    return (Pageflow)eContainer;
  }
  
  public void setPageflow(Pageflow newPageflow)
  {
    if ((newPageflow != eContainer) || (
      (eContainerFeatureID != 8) && (newPageflow != null)))
    {
      if (EcoreUtil.isAncestor(this, newPageflow)) {
        throw new IllegalArgumentException(
          NLS.bind(PageflowMessages.PageflowNode_NoRecursiveContainment, toString()));
      }
      NotificationChain msgs = null;
      if (eContainer != null) {
        msgs = eBasicRemoveFromContainer(msgs);
      }
      if (newPageflow != null) {
        msgs = ((InternalEObject)newPageflow).eInverseAdd(this, 
          8, Pageflow.class, msgs);
      }
      msgs = eBasicSetContainer((InternalEObject)newPageflow, 
        8, msgs);
      if (msgs != null) {
        msgs.dispatch();
      }
    }
    else if (eNotificationRequired())
    {
      eNotify(new ENotificationImpl(this, 1, 
        8, newPageflow, 
        newPageflow));
    }
  }
  
  public EList getOutlinks()
  {
    if (outlinks == null) {
      outlinks = new EObjectWithInverseResolvingEList(PageflowLink.class, this, 
        9, 
        10);
    }
    return outlinks;
  }
  
  public EList getInlinks()
  {
    if (inlinks == null) {
      inlinks = new EObjectWithInverseResolvingEList(PageflowLink.class, this, 
        10, 
        9);
    }
    return inlinks;
  }
  
  public PageflowLink findLinkTo(PageflowNode target)
  {
    Iterator i = getOutlinks().iterator();
    while (i.hasNext())
    {
      PageflowLink link = (PageflowLink)i.next();
      if (link.getTarget() == target) {
        return link;
      }
    }
    return null;
  }
  
  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
  {
    if (featureID >= 0)
    {
      switch (eDerivedStructuralFeatureID(featureID, baseClass))
      {
      case 8: 
        if (eContainer != null) {
          msgs = eBasicRemoveFromContainer(msgs);
        }
        return eBasicSetContainer(otherEnd, 
          8, msgs);
      case 9: 
        return ((InternalEList)getOutlinks()).basicAdd(otherEnd, msgs);
      case 10: 
        return ((InternalEList)getInlinks()).basicAdd(otherEnd, msgs);
      }
      return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
    }
    if (eContainer != null) {
      msgs = eBasicRemoveFromContainer(msgs);
    }
    return eBasicSetContainer(otherEnd, featureID, msgs);
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
  {
    if (featureID >= 0)
    {
      switch (eDerivedStructuralFeatureID(featureID, baseClass))
      {
      case 8: 
        return eBasicSetContainer(null, 
          8, msgs);
      case 9: 
        return ((InternalEList)getOutlinks()).basicRemove(otherEnd, 
          msgs);
      case 10: 
        return ((InternalEList)getInlinks()).basicRemove(otherEnd, 
          msgs);
      }
      return eDynamicInverseRemove(otherEnd, featureID, baseClass, 
        msgs);
    }
    return eBasicSetContainer(null, featureID, msgs);
  }
  
  public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
  {
    if (eContainerFeatureID >= 0)
    {
      switch (eContainerFeatureID)
      {
      case 8: 
        return eContainer.eInverseRemove(this, 
          8, Pageflow.class, msgs);
      }
      return eDynamicBasicRemoveFromContainer(msgs);
    }
    return eContainer.eInverseRemove(this, 
      -1 - eContainerFeatureID, null, msgs);
  }
  
  public Object eGet(EStructuralFeature eFeature, boolean resolve)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      return getName();
    case 1: 
      return getComment();
    case 2: 
      return new Integer(getX());
    case 3: 
      return new Integer(getY());
    case 4: 
      return new Integer(getWidth());
    case 5: 
      return new Integer(getHeight());
    case 6: 
      return getId();
    case 8: 
      return getPageflow();
    case 9: 
      return getOutlinks();
    case 10: 
      return getInlinks();
    }
    return super.eGet(eFeature, resolve);
  }
  
  public void eSet(EStructuralFeature eFeature, Object newValue)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      setName((String)newValue);
      return;
    case 1: 
      setComment((String)newValue);
      return;
    case 2: 
      setX(((Integer)newValue).intValue());
      return;
    case 3: 
      setY(((Integer)newValue).intValue());
      return;
    case 4: 
      setWidth(((Integer)newValue).intValue());
      return;
    case 5: 
      setHeight(((Integer)newValue).intValue());
      return;
    case 6: 
      setId((String)newValue);
      return;
    case 8: 
      setPageflow((Pageflow)newValue);
      return;
    case 9: 
      getOutlinks().clear();
      getOutlinks().addAll((Collection)newValue);
      return;
    case 10: 
      getInlinks().clear();
      getInlinks().addAll((Collection)newValue);
      return;
    }
    super.eSet(eFeature, newValue);
  }
  
  public void eUnset(EStructuralFeature eFeature)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      setName("unnamed");
      return;
    case 1: 
      setComment(COMMENT_EDEFAULT);
      return;
    case 2: 
      setX(0);
      return;
    case 3: 
      setY(0);
      return;
    case 4: 
      setWidth(-1);
      return;
    case 5: 
      setHeight(-1);
      return;
    case 6: 
      setId(ID_EDEFAULT);
      return;
    case 8: 
      setPageflow(null);
      return;
    case 9: 
      getOutlinks().clear();
      return;
    case 10: 
      getInlinks().clear();
      return;
    }
    super.eUnset(eFeature);
  }
  
  public boolean eIsSet(EStructuralFeature eFeature)
  {
    switch (eDerivedStructuralFeatureID(eFeature))
    {
    case 0: 
      return name != null;
    case 1: 
      return comment != null;
    case 2: 
      return x != 0;
    case 3: 
      return y != 0;
    case 4: 
      return width != -1;
    case 5: 
      return height != -1;
    case 6: 
      return getId() != null;
    case 8: 
      return getPageflow() != null;
    case 9: 
      return (outlinks != null) && (!outlinks.isEmpty());
    case 10: 
      return (inlinks != null) && (!inlinks.isEmpty());
    }
    return super.eIsSet(eFeature);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.impl.PageflowNodeImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.impl;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.Pageflow;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowElement;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowFactory;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLink;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLinkBendpoint;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowNode;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPackage;
import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPage;

public class PageflowPackageImpl
  extends EPackageImpl
  implements PageflowPackage
{
  private EClass pageflowEClass = null;
  private EClass pageflowNodeEClass = null;
  private EClass pfLinkEClass = null;
  private EClass pageflowElementEClass = null;
  private EClass pfPageEClass = null;
  private EClass pfLinkBendpointEClass = null;
  
  private PageflowPackageImpl()
  {
    super("http://www.sybase.com/suade/pageflow", PageflowFactory.eINSTANCE);
  }
  
  private static boolean isInited = false;
  
  public static PageflowPackage init()
  {
    if (isInited) {
      return 
        (PageflowPackage)EPackage.Registry.INSTANCE.get("http://www.sybase.com/suade/pageflow");
    }
    PageflowPackageImpl thePageflowPackage = (PageflowPackageImpl)((EPackage.Registry.INSTANCE
      .get("http://www.sybase.com/suade/pageflow") instanceof PageflowPackageImpl) ? EPackage.Registry.INSTANCE
      .get("http://www.sybase.com/suade/pageflow") : 
      new PageflowPackageImpl());
    
    isInited = true;
    
    thePageflowPackage.createPackageContents();
    
    thePageflowPackage.initializePackageContents();
    
    return thePageflowPackage;
  }
  
  public EClass getPageflow()
  {
    return pageflowEClass;
  }
  
  public EReference getPageflow_Nodes()
  {
    return (EReference)pageflowEClass.getEStructuralFeatures().get(0);
  }
  
  public EReference getPageflow_Links()
  {
    return (EReference)pageflowEClass.getEStructuralFeatures().get(1);
  }
  
  public EAttribute getPageflow_Configfile()
  {
    return (EAttribute)pageflowEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getPageflowNode()
  {
    return pageflowNodeEClass;
  }
  
  public EReference getPageflowNode_Pageflow()
  {
    return (EReference)pageflowNodeEClass.getEStructuralFeatures().get(0);
  }
  
  public EReference getPageflowNode_Outlinks()
  {
    return (EReference)pageflowNodeEClass.getEStructuralFeatures().get(1);
  }
  
  public EReference getPageflowNode_Inlinks()
  {
    return (EReference)pageflowNodeEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getPFLink()
  {
    return pfLinkEClass;
  }
  
  public EReference getPFLink_Pageflow()
  {
    return (EReference)pfLinkEClass.getEStructuralFeatures().get(0);
  }
  
  public EReference getPFLink_Target()
  {
    return (EReference)pfLinkEClass.getEStructuralFeatures().get(1);
  }
  
  public EReference getPFLink_Source()
  {
    return (EReference)pfLinkEClass.getEStructuralFeatures().get(2);
  }
  
  public EAttribute getPFLink_Outcome()
  {
    return (EAttribute)pfLinkEClass.getEStructuralFeatures().get(3);
  }
  
  public EAttribute getPFLink_Redirect()
  {
    return (EAttribute)pfLinkEClass.getEStructuralFeatures().get(4);
  }
  
  public EReference getPFLink_BendPoints()
  {
    return (EReference)pfLinkEClass.getEStructuralFeatures().get(5);
  }
  
  public EAttribute getPFLink_Smallicon()
  {
    return (EAttribute)pfLinkEClass.getEStructuralFeatures().get(6);
  }
  
  public EAttribute getPFLink_Largeicon()
  {
    return (EAttribute)pfLinkEClass.getEStructuralFeatures().get(7);
  }
  
  public EAttribute getPFLink_Fromaction()
  {
    return (EAttribute)pfLinkEClass.getEStructuralFeatures().get(8);
  }
  
  public EAttribute getPageflowElement_ReferenceLink()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      7);
  }
  
  public EClass getPageflowElement()
  {
    return pageflowElementEClass;
  }
  
  public EAttribute getPageflowElement_Name()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      0);
  }
  
  public EAttribute getPageflowElement_Comment()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      1);
  }
  
  public EAttribute getPageflowElement_X()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      2);
  }
  
  public EAttribute getPageflowElement_Y()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      3);
  }
  
  public EAttribute getPageflowElement_Width()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      4);
  }
  
  public EAttribute getPageflowElement_Height()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      5);
  }
  
  public EAttribute getPageflowElement_Id()
  {
    return (EAttribute)pageflowElementEClass.getEStructuralFeatures().get(
      6);
  }
  
  public EClass getPFPage()
  {
    return pfPageEClass;
  }
  
  public EAttribute getPFPage_Path()
  {
    return (EAttribute)pfPageEClass.getEStructuralFeatures().get(0);
  }
  
  public EAttribute getPFPage_Smallicon()
  {
    return (EAttribute)pfPageEClass.getEStructuralFeatures().get(1);
  }
  
  public EAttribute getPFPage_Largeicon()
  {
    return (EAttribute)pfPageEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getPFLinkBendpoint()
  {
    return pfLinkBendpointEClass;
  }
  
  public EAttribute getPFLinkBendpoint_D1Width()
  {
    return (EAttribute)pfLinkBendpointEClass.getEStructuralFeatures().get(
      0);
  }
  
  public EAttribute getPFLinkBendpoint_D1Height()
  {
    return (EAttribute)pfLinkBendpointEClass.getEStructuralFeatures().get(
      1);
  }
  
  public EAttribute getPFLinkBendpoint_D2Width()
  {
    return (EAttribute)pfLinkBendpointEClass.getEStructuralFeatures().get(
      2);
  }
  
  public EAttribute getPFLinkBendpoint_D2Height()
  {
    return (EAttribute)pfLinkBendpointEClass.getEStructuralFeatures().get(
      3);
  }
  
  public EAttribute getPFLinkBendpoint_Weight()
  {
    return (EAttribute)pfLinkBendpointEClass.getEStructuralFeatures().get(
      4);
  }
  
  public EReference getPFLinkBendpoint_Link()
  {
    return (EReference)pfLinkBendpointEClass.getEStructuralFeatures().get(
      5);
  }
  
  public PageflowFactory getPageflowFactory()
  {
    return (PageflowFactory)getEFactoryInstance();
  }
  
  private boolean isCreated = false;
  
  public void createPackageContents()
  {
    if (isCreated) {
      return;
    }
    isCreated = true;
    
    pageflowEClass = createEClass(0);
    createEReference(pageflowEClass, 8);
    createEReference(pageflowEClass, 9);
    createEAttribute(pageflowEClass, 10);
    
    pageflowNodeEClass = createEClass(1);
    createEReference(pageflowNodeEClass, 8);
    createEReference(pageflowNodeEClass, 9);
    createEReference(pageflowNodeEClass, 10);
    
    pfLinkEClass = createEClass(2);
    createEReference(pfLinkEClass, 8);
    createEReference(pfLinkEClass, 9);
    createEReference(pfLinkEClass, 10);
    createEAttribute(pfLinkEClass, 11);
    createEAttribute(pfLinkEClass, 12);
    createEReference(pfLinkEClass, 13);
    createEAttribute(pfLinkEClass, 14);
    createEAttribute(pfLinkEClass, 15);
    createEAttribute(pfLinkEClass, 16);
    
    pageflowElementEClass = createEClass(3);
    createEAttribute(pageflowElementEClass, 0);
    createEAttribute(pageflowElementEClass, 1);
    createEAttribute(pageflowElementEClass, 2);
    createEAttribute(pageflowElementEClass, 3);
    createEAttribute(pageflowElementEClass, 4);
    createEAttribute(pageflowElementEClass, 5);
    createEAttribute(pageflowElementEClass, 6);
    createEAttribute(pageflowElementEClass, 
      7);
    
    pfPageEClass = createEClass(5);
    createEAttribute(pfPageEClass, 11);
    createEAttribute(pfPageEClass, 12);
    createEAttribute(pfPageEClass, 13);
    
    pfLinkBendpointEClass = createEClass(8);
    createEAttribute(pfLinkBendpointEClass, 0);
    createEAttribute(pfLinkBendpointEClass, 1);
    createEAttribute(pfLinkBendpointEClass, 2);
    createEAttribute(pfLinkBendpointEClass, 3);
    createEAttribute(pfLinkBendpointEClass, 4);
    createEReference(pfLinkBendpointEClass, 5);
  }
  
  private boolean isInitialized = false;
  
  public void initializePackageContents()
  {
    if (isInitialized) {
      return;
    }
    isInitialized = true;
    
    setName("pageflow");
    setNsPrefix("pageflow");
    setNsURI("http://www.sybase.com/suade/pageflow");
    
    pageflowEClass.getESuperTypes().add(getPageflowElement());
    pageflowNodeEClass.getESuperTypes().add(getPageflowElement());
    pfLinkEClass.getESuperTypes().add(getPageflowElement());
    pfPageEClass.getESuperTypes().add(getPageflowNode());
    
    initEClass(pageflowEClass, Pageflow.class, "Pageflow", false, 
      false, true);
    initEReference(getPageflow_Nodes(), getPageflowNode(), 
      getPageflowNode_Pageflow(), "nodes", null, 0, -1, 
      Pageflow.class, false, false, true, 
      true, false, false, true, 
      false, true);
    initEReference(getPageflow_Links(), getPFLink(), 
      getPFLink_Pageflow(), "links", null, 0, -1, Pageflow.class, 
      false, false, true, true, 
      false, false, true, false, 
      true);
    initEAttribute(getPageflow_Configfile(), ecorePackage.getEString(), 
      "configfile", null, 0, 1, Pageflow.class, false, 
      false, true, false, false, true, 
      false, true);
    
    initEClass(pageflowNodeEClass, PageflowNode.class, "PageflowNode", 
      true, false, true);
    initEReference(getPageflowNode_Pageflow(), getPageflow(), 
      getPageflow_Nodes(), "pageflow", null, 1, 1, 
      PageflowNode.class, false, false, true, 
      false, false, false, true, 
      false, true);
    initEReference(getPageflowNode_Outlinks(), getPFLink(), 
      getPFLink_Source(), "outlinks", null, 0, -1, 
      PageflowNode.class, false, false, true, 
      false, true, false, true, 
      false, true);
    initEReference(getPageflowNode_Inlinks(), getPFLink(), 
      getPFLink_Target(), "inlinks", null, 0, -1, 
      PageflowNode.class, false, false, true, 
      false, true, false, true, 
      false, true);
    
    initEClass(pfLinkEClass, PageflowLink.class, "PFLink", false, 
      false, true);
    initEReference(getPFLink_Pageflow(), getPageflow(), 
      getPageflow_Links(), "pageflow", null, 1, 1, 
      PageflowLink.class, false, false, true, 
      false, false, false, true, 
      false, true);
    initEReference(getPFLink_Target(), getPageflowNode(), 
      getPageflowNode_Inlinks(), "target", null, 1, 1, 
      PageflowLink.class, false, false, true, 
      false, true, false, true, 
      false, true);
    initEReference(getPFLink_Source(), getPageflowNode(), 
      getPageflowNode_Outlinks(), "source", null, 1, 1, 
      PageflowLink.class, false, false, true, 
      false, true, false, true, 
      false, true);
    initEAttribute(getPFLink_Outcome(), ecorePackage.getEString(), 
      "outcome", null, 0, 1, PageflowLink.class, false, 
      false, true, false, false, true, 
      false, true);
    initEAttribute(getPFLink_Redirect(), ecorePackage.getEBoolean(), 
      "redirect", null, 0, 1, P
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd