Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Stereotype


   * @param is
   *            : the new Dimension (an InstanceSpecification stereotyped with a Dimension).
   */
  public void setDimensionForPrimitiveType(Element pt, InstanceSpecification is) {
    if (is != null && pt != null) {
      final Stereotype valueType = pt.getAppliedStereotype("SysML::Blocks::ValueType");
      final Dimension newDimension = (Dimension)is.getStereotypeApplication(is
          .getAppliedStereotype("SysML::Blocks::Dimension"));
      pt.setValue(valueType, "dimension", newDimension);
    }
  }
View Full Code Here


   * @param is
   *            : the new Unit (an InstanceSpecification stereotyped with a Unit).
   */
  public void setUnitForPrimitiveType(Element pt, InstanceSpecification is) {
    if (is != null && pt != null) {
      final Stereotype valueType = pt.getAppliedStereotype("SysML::Blocks::ValueType");
      final Unit newUnit = (Unit)is.getStereotypeApplication(is
          .getAppliedStereotype("SysML::Blocks::Unit"));
      pt.setValue(valueType, "unit", newUnit);
    }
  }
View Full Code Here

   * @param id
   *            : the new id (a string).
   */
  public void setIdForRequirement(Element r, String id) {
    if (r != null && id != null) {
      final Stereotype requirement = r.getAppliedStereotype(SYSML_REQUIREMENT);
      r.setValue(requirement, "id", id);
    }
  }
View Full Code Here

   * @param text
   *            : the new text (a string).
   */
  public void setTextForRequirement(Element r, String text) {
    if (r != null && text != null) {
      final Stereotype requirement = r.getAppliedStereotype(SYSML_REQUIREMENT);
      r.setValue(requirement, "text", text);
    }
  }
View Full Code Here

    for (final Iterator<EObject> iterator = root.eAllContents(); iterator.hasNext();) {
      final EObject object = iterator.next();
      if (object instanceof Abstraction) {
        final Element supplier = ((Abstraction)object).getSupplier(e.getName());
        if (supplier != null) {
          Stereotype s = ((Abstraction)object).getAppliedStereotype("SysML::Requirements::Satisfy");
          if (s != null) {
            deleteAssociatedStereotype((Abstraction)object, "SysML::Requirements::Satisfy");
          } else {
            s = ((Abstraction)object).getAppliedStereotype("SysML::Requirements::DeriveReqt");
            if (s != null) {
View Full Code Here

  public Image getIcon() {

    Image ImageNotFound = null;

    if(getBase_Property() != null) {
      Stereotype st = UMLUtil.getStereotype(this);

      Image image = st.getIcons().get(0);

      if(getDirection() == FlowDirection.IN) {
        image = st.getIcons().get(1);
      } else if(getDirection() == FlowDirection.OUT) {
        image = st.getIcons().get(2);
      } else if(getDirection() == FlowDirection.INOUT) {
        image = st.getIcons().get(3);
      }

      return image;

    } else {
View Full Code Here

    Image ImageNotFound = null;

    if(getBase_Port() != null) {

      Stereotype st = UMLUtil.getStereotype(this);

      Image image = st.getIcons().get(0);

      if(isAtomic()) {
        if(getDirection() == FlowDirection.IN) {
          image = st.getIcons().get(1);
        } else if(getDirection() == FlowDirection.OUT) {
          image = st.getIcons().get(2);
        } else if(getDirection() == FlowDirection.INOUT) {
          image = st.getIcons().get(3);
        }

      } else {
        image = st.getIcons().get(4);
      }

      return image;

    } else {
View Full Code Here

  public static boolean hasStereotype(Element elt, String stereotypeName) {
    boolean has = false;

    if(elt != null) {
      Iterator i = elt.getAppliedStereotypes().iterator();
      Stereotype currentStereotype;
      while(i.hasNext() && !has) {
        currentStereotype = (Stereotype)i.next();
        if(currentStereotype.getName().equals(stereotypeName)) {
          has = true;
        }
      }
    }
    return has;
View Full Code Here

  /**
   * Gets the stub for the GaWorkloadEvent stereotype.
   * @return the stub.
   */
  public GaWorkloadEventStub getWorkloadEventStub() {
    Stereotype stereotype = activity.getApplicableStereotype(GaWorkloadEventDecorator.QUALIFIED_NAME);
   
    GaWorkloadEventDecorator decorator = null;
    try {
      decorator = (GaWorkloadEventDecorator) getFactory().getDecorator(stereotype);
    } catch (ClassNotFoundException e) {} // cannot happen
View Full Code Here

  /**
   * Gets the stub for the GaWorkloadGenerator stereotype.
   * @return the stub.
   */
  public GaWorkloadGeneratorStub getWorkloadGeneratorStub() {
    Stereotype stereotype = activity.getApplicableStereotype(GaWorkloadGeneratorDecorator.QUALIFIED_NAME);
   
    GaWorkloadGeneratorDecorator decorator = null;
    try {
      decorator = (GaWorkloadGeneratorDecorator) getFactory().getDecorator(stereotype);
    } catch (ClassNotFoundException e) {} // cannot happen
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Stereotype

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.