/**
 *
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Image Field</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 *
 * @generated
 */
public class ImageFieldImpl extends FileFieldImpl implements ImageField {
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  protected ImageFieldImpl() {
    super();
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return ViewPackage.Literals.IMAGE_FIELD;
  }

  private static final String OCL_ANNOTATION_SOURCE = "http://www.bluexml.com/OCL";
  private static final OCL OCL_ENV = KerblueOCL.newInstance();
} // ImageFieldImpl
Exemple #2
0
/**
 *
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Stylable</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>The following features are implemented:
 *
 * <ul>
 *   <li>{@link com.bluexml.side.view.impl.StylableImpl#getStyling <em>Styling</em>}
 * </ul>
 *
 * @generated
 */
public abstract class StylableImpl extends EObjectImpl implements Stylable {
  /**
   * The cached value of the '{@link #getStyling() <em>Styling</em>}' containment reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getStyling()
   * @generated
   * @ordered
   */
  protected Styling styling;

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  protected StylableImpl() {
    super();
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return ViewPackage.Literals.STYLABLE;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public Styling getStyling() {
    return styling;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetStyling(Styling newStyling, NotificationChain msgs) {
    Styling oldStyling = styling;
    styling = newStyling;
    if (eNotificationRequired()) {
      ENotificationImpl notification =
          new ENotificationImpl(
              this, Notification.SET, ViewPackage.STYLABLE__STYLING, oldStyling, newStyling);
      if (msgs == null) msgs = notification;
      else msgs.add(notification);
    }
    return msgs;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public void setStyling(Styling newStyling) {
    if (newStyling != styling) {
      NotificationChain msgs = null;
      if (styling != null)
        msgs =
            ((InternalEObject) styling)
                .eInverseRemove(
                    this, EOPPOSITE_FEATURE_BASE - ViewPackage.STYLABLE__STYLING, null, msgs);
      if (newStyling != null)
        msgs =
            ((InternalEObject) newStyling)
                .eInverseAdd(
                    this, EOPPOSITE_FEATURE_BASE - ViewPackage.STYLABLE__STYLING, null, msgs);
      msgs = basicSetStyling(newStyling, msgs);
      if (msgs != null) msgs.dispatch();
    } else if (eNotificationRequired())
      eNotify(
          new ENotificationImpl(
              this, Notification.SET, ViewPackage.STYLABLE__STYLING, newStyling, newStyling));
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public NotificationChain eInverseRemove(
      InternalEObject otherEnd, int featureID, NotificationChain msgs) {
    switch (featureID) {
      case ViewPackage.STYLABLE__STYLING:
        return basicSetStyling(null, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType) {
    switch (featureID) {
      case ViewPackage.STYLABLE__STYLING:
        return getStyling();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue) {
    switch (featureID) {
      case ViewPackage.STYLABLE__STYLING:
        setStyling((Styling) newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case ViewPackage.STYLABLE__STYLING:
        setStyling((Styling) null);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case ViewPackage.STYLABLE__STYLING:
        return styling != null;
    }
    return super.eIsSet(featureID);
  }

  private static final String OCL_ANNOTATION_SOURCE = "http://www.bluexml.com/OCL";
  private static final OCL OCL_ENV = KerblueOCL.newInstance();
} // StylableImpl
/**
 *
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Boolean Search Field</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>The following features are implemented:
 *
 * <ul>
 *   <li>{@link com.bluexml.side.form.impl.BooleanSearchFieldImpl#getOperators <em>Operators</em>}
 *   <li>{@link com.bluexml.side.form.impl.BooleanSearchFieldImpl#getDefaultOperator <em>Default
 *       Operator</em>}
 * </ul>
 *
 * @generated
 */
public class BooleanSearchFieldImpl extends SearchFieldImpl implements BooleanSearchField {
  /**
   * The cached value of the '{@link #getOperators() <em>Operators</em>}' attribute list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getOperators()
   * @generated
   * @ordered
   */
  protected EList<BooleanFieldSearchOperators> operators;

  /**
   * The default value of the '{@link #getDefaultOperator() <em>Default Operator</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getDefaultOperator()
   * @generated
   * @ordered
   */
  protected static final BooleanFieldSearchOperators DEFAULT_OPERATOR_EDEFAULT =
      BooleanFieldSearchOperators.IGNORE;

  /**
   * The cached value of the '{@link #getDefaultOperator() <em>Default Operator</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getDefaultOperator()
   * @generated
   * @ordered
   */
  protected BooleanFieldSearchOperators defaultOperator = DEFAULT_OPERATOR_EDEFAULT;

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  protected BooleanSearchFieldImpl() {
    super();
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return FormPackage.Literals.BOOLEAN_SEARCH_FIELD;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public EList<BooleanFieldSearchOperators> getOperators() {
    if (operators == null) {
      operators =
          new EDataTypeUniqueEList<BooleanFieldSearchOperators>(
              BooleanFieldSearchOperators.class, this, FormPackage.BOOLEAN_SEARCH_FIELD__OPERATORS);
    }
    return operators;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public BooleanFieldSearchOperators getDefaultOperator() {
    return defaultOperator;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public void setDefaultOperator(BooleanFieldSearchOperators newDefaultOperator) {
    BooleanFieldSearchOperators oldDefaultOperator = defaultOperator;
    defaultOperator = newDefaultOperator == null ? DEFAULT_OPERATOR_EDEFAULT : newDefaultOperator;
    if (eNotificationRequired())
      eNotify(
          new ENotificationImpl(
              this,
              Notification.SET,
              FormPackage.BOOLEAN_SEARCH_FIELD__DEFAULT_OPERATOR,
              oldDefaultOperator,
              defaultOperator));
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType) {
    switch (featureID) {
      case FormPackage.BOOLEAN_SEARCH_FIELD__OPERATORS:
        return getOperators();
      case FormPackage.BOOLEAN_SEARCH_FIELD__DEFAULT_OPERATOR:
        return getDefaultOperator();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @SuppressWarnings("unchecked")
  @Override
  public void eSet(int featureID, Object newValue) {
    switch (featureID) {
      case FormPackage.BOOLEAN_SEARCH_FIELD__OPERATORS:
        getOperators().clear();
        getOperators().addAll((Collection<? extends BooleanFieldSearchOperators>) newValue);
        return;
      case FormPackage.BOOLEAN_SEARCH_FIELD__DEFAULT_OPERATOR:
        setDefaultOperator((BooleanFieldSearchOperators) newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case FormPackage.BOOLEAN_SEARCH_FIELD__OPERATORS:
        getOperators().clear();
        return;
      case FormPackage.BOOLEAN_SEARCH_FIELD__DEFAULT_OPERATOR:
        setDefaultOperator(DEFAULT_OPERATOR_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case FormPackage.BOOLEAN_SEARCH_FIELD__OPERATORS:
        return operators != null && !operators.isEmpty();
      case FormPackage.BOOLEAN_SEARCH_FIELD__DEFAULT_OPERATOR:
        return defaultOperator != DEFAULT_OPERATOR_EDEFAULT;
    }
    return super.eIsSet(featureID);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public String toString() {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (operators: ");
    result.append(operators);
    result.append(", defaultOperator: ");
    result.append(defaultOperator);
    result.append(')');
    return result.toString();
  }

  private static final String OCL_ANNOTATION_SOURCE = "http://www.bluexml.com/OCL";
  private static final OCL OCL_ENV = KerblueOCL.newInstance();
} // BooleanSearchFieldImpl
/**
 *
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Choice Field</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>The following features are implemented:
 *
 * <ul>
 *   <li>{@link com.bluexml.side.form.impl.ChoiceFieldImpl#getMin_bound <em>Min bound</em>}
 *   <li>{@link com.bluexml.side.form.impl.ChoiceFieldImpl#getMax_bound <em>Max bound</em>}
 *   <li>{@link com.bluexml.side.form.impl.ChoiceFieldImpl#getWidget <em>Widget</em>}
 *   <li>{@link com.bluexml.side.form.impl.ChoiceFieldImpl#isMultiple <em>Multiple</em>}
 * </ul>
 *
 * @generated
 */
public class ChoiceFieldImpl extends FieldImpl implements ChoiceField {
  /**
   * The default value of the '{@link #getMin_bound() <em>Min bound</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getMin_bound()
   * @generated
   * @ordered
   */
  protected static final int MIN_BOUND_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getMin_bound() <em>Min bound</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getMin_bound()
   * @generated
   * @ordered
   */
  protected int min_bound = MIN_BOUND_EDEFAULT;

  /**
   * The default value of the '{@link #getMax_bound() <em>Max bound</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getMax_bound()
   * @generated
   * @ordered
   */
  protected static final int MAX_BOUND_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getMax_bound() <em>Max bound</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getMax_bound()
   * @generated
   * @ordered
   */
  protected int max_bound = MAX_BOUND_EDEFAULT;

  /**
   * The default value of the '{@link #getWidget() <em>Widget</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getWidget()
   * @generated
   * @ordered
   */
  protected static final ChoiceWidgetType WIDGET_EDEFAULT = ChoiceWidgetType.SHOW_ONE;

  /**
   * The cached value of the '{@link #getWidget() <em>Widget</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #getWidget()
   * @generated
   * @ordered
   */
  protected ChoiceWidgetType widget = WIDGET_EDEFAULT;

  /**
   * The default value of the '{@link #isMultiple() <em>Multiple</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #isMultiple()
   * @generated
   * @ordered
   */
  protected static final boolean MULTIPLE_EDEFAULT = false;

  /**
   * The cached value of the '{@link #isMultiple() <em>Multiple</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @see #isMultiple()
   * @generated
   * @ordered
   */
  protected boolean multiple = MULTIPLE_EDEFAULT;

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  protected ChoiceFieldImpl() {
    super();
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return FormPackage.Literals.CHOICE_FIELD;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public int getMin_bound() {
    return min_bound;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public void setMin_bound(int newMin_bound) {
    int oldMin_bound = min_bound;
    min_bound = newMin_bound;
    if (eNotificationRequired())
      eNotify(
          new ENotificationImpl(
              this,
              Notification.SET,
              FormPackage.CHOICE_FIELD__MIN_BOUND,
              oldMin_bound,
              min_bound));
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public int getMax_bound() {
    return max_bound;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public void setMax_bound(int newMax_bound) {
    int oldMax_bound = max_bound;
    max_bound = newMax_bound;
    if (eNotificationRequired())
      eNotify(
          new ENotificationImpl(
              this,
              Notification.SET,
              FormPackage.CHOICE_FIELD__MAX_BOUND,
              oldMax_bound,
              max_bound));
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public ChoiceWidgetType getWidget() {
    return widget;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public void setWidget(ChoiceWidgetType newWidget) {
    ChoiceWidgetType oldWidget = widget;
    widget = newWidget == null ? WIDGET_EDEFAULT : newWidget;
    if (eNotificationRequired())
      eNotify(
          new ENotificationImpl(
              this, Notification.SET, FormPackage.CHOICE_FIELD__WIDGET, oldWidget, widget));
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public boolean isMultiple() {
    return multiple;
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  public void setMultiple(boolean newMultiple) {
    boolean oldMultiple = multiple;
    multiple = newMultiple;
    if (eNotificationRequired())
      eNotify(
          new ENotificationImpl(
              this, Notification.SET, FormPackage.CHOICE_FIELD__MULTIPLE, oldMultiple, multiple));
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType) {
    switch (featureID) {
      case FormPackage.CHOICE_FIELD__MIN_BOUND:
        return getMin_bound();
      case FormPackage.CHOICE_FIELD__MAX_BOUND:
        return getMax_bound();
      case FormPackage.CHOICE_FIELD__WIDGET:
        return getWidget();
      case FormPackage.CHOICE_FIELD__MULTIPLE:
        return isMultiple();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @SuppressWarnings("unchecked")
  @Override
  public void eSet(int featureID, Object newValue) {
    switch (featureID) {
      case FormPackage.CHOICE_FIELD__MIN_BOUND:
        setMin_bound((Integer) newValue);
        return;
      case FormPackage.CHOICE_FIELD__MAX_BOUND:
        setMax_bound((Integer) newValue);
        return;
      case FormPackage.CHOICE_FIELD__WIDGET:
        setWidget((ChoiceWidgetType) newValue);
        return;
      case FormPackage.CHOICE_FIELD__MULTIPLE:
        setMultiple((Boolean) newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case FormPackage.CHOICE_FIELD__MIN_BOUND:
        setMin_bound(MIN_BOUND_EDEFAULT);
        return;
      case FormPackage.CHOICE_FIELD__MAX_BOUND:
        setMax_bound(MAX_BOUND_EDEFAULT);
        return;
      case FormPackage.CHOICE_FIELD__WIDGET:
        setWidget(WIDGET_EDEFAULT);
        return;
      case FormPackage.CHOICE_FIELD__MULTIPLE:
        setMultiple(MULTIPLE_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case FormPackage.CHOICE_FIELD__MIN_BOUND:
        return min_bound != MIN_BOUND_EDEFAULT;
      case FormPackage.CHOICE_FIELD__MAX_BOUND:
        return max_bound != MAX_BOUND_EDEFAULT;
      case FormPackage.CHOICE_FIELD__WIDGET:
        return widget != WIDGET_EDEFAULT;
      case FormPackage.CHOICE_FIELD__MULTIPLE:
        return multiple != MULTIPLE_EDEFAULT;
    }
    return super.eIsSet(featureID);
  }

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  @Override
  public String toString() {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (min_bound: ");
    result.append(min_bound);
    result.append(", max_bound: ");
    result.append(max_bound);
    result.append(", widget: ");
    result.append(widget);
    result.append(", multiple: ");
    result.append(multiple);
    result.append(')');
    return result.toString();
  }

  private static final String OCL_ANNOTATION_SOURCE = "http://www.bluexml.com/OCL";

  private static final OCL OCL_ENV = KerblueOCL.newInstance();
} // ChoiceFieldImpl