Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Stereotype


  /**
   * Gets the stub for the PaStep stereotype.
   * @return the stub.
   */
  public PaStepStub getPaStepStub() {
    Stereotype stereotype = action.getApplicableStereotype(PaStepDecorator.QUALIFIED_NAME);
   
    PaStepDecorator decorator = null;
    try {
      decorator = (PaStepDecorator) getFactory().getDecorator(stereotype);
    } catch (ClassNotFoundException e) {} // cannot happen
View Full Code Here


   * @return the stub.
   */
  private synchronized PaStepStub getPaStepStub() {
    if (paStepStub != null) return paStepStub;
   
    Stereotype stereotype = edge.getApplicableStereotype(PaStepDecorator.QUALIFIED_NAME);
   
    PaStepDecorator decorator = null;
    try {
      decorator = (PaStepDecorator) getFactory().getDecorator(stereotype);
    } catch (ClassNotFoundException e) {} // cannot happen
View Full Code Here

  /**
   * Checks if this artifact is an execution host.
   * @return true if this artifact is an execution host.
   */
  public boolean isExecHost() {
    Stereotype stereotype = artifact.getApplicableStereotype(GaExecHostDecorator.QUALIFIED_NAME);
    return artifact.isStereotypeApplied(stereotype);
  }
View Full Code Here

    private int rep = 0;
   
    private PaStepStub(Element stereotypedElement) {
      super(stereotypedElement);
     
      Stereotype stereotype = stereotypedElement.getAppliedStereotype(QUALIFIED_NAME);
      if (stereotype != null) {
        Object value = stereotypedElement.getValue(stereotype, "host");
        if (value != null && value instanceof EObject) {
          EObject temp = (EObject) value;
          EStructuralFeature feature = temp.eClass().getEStructuralFeature("base_Classifier");
View Full Code Here

 
  @Override
  public IDecorator<?> getDecorator(Element element) throws ClassNotFoundException {
    synchronized(decorators) {
      if (!decorators.containsKey(element) && element instanceof Stereotype) { // we have to create the stat object
        Stereotype stereotype = (Stereotype) element;
        if (stereotype.getQualifiedName().equals(GaWorkloadEventDecorator.QUALIFIED_NAME)) decorators.put(stereotype, new GaWorkloadEventDecorator(rootFactory, stereotype));
        if (stereotype.getQualifiedName().equals(GaWorkloadGeneratorDecorator.QUALIFIED_NAME)) decorators.put(stereotype, new GaWorkloadGeneratorDecorator(rootFactory, stereotype));
        if (stereotype.getQualifiedName().equals(PaStepDecorator.QUALIFIED_NAME)) decorators.put(stereotype, new PaStepDecorator(rootFactory, stereotype));
      }
     
      if (decorators.containsKey(element)) return decorators.get(element);
      else throw new ClassNotFoundException("No Stats class defined for UML stereotype : " + element.getClass().getName());
    }
View Full Code Here

    private Double workloadParam = null;
   
    private GaWorkloadEventStub(Element stereotypedElement) {
      super(stereotypedElement);
     
      Stereotype stereotype = stereotypedElement.getAppliedStereotype(QUALIFIED_NAME);
      if (stereotype != null) {
        Object value = stereotypedElement.getValue(stereotype, "pattern");
        if (value != null && value instanceof String) {
          pattern = (String) value;
          parsePattern();
View Full Code Here

    private int pop = 0;
   
    private GaWorkloadGeneratorStub(Element stereotypedElement) {
      super(stereotypedElement);
     
      Stereotype stereotype = stereotypedElement.getAppliedStereotype(QUALIFIED_NAME);
      if (stereotype != null) {
        Object value = stereotypedElement.getValue(stereotype, "pop");
        if (value != null && value instanceof String) {
          try {
            pop = Integer.parseInt((String) value);
View Full Code Here

    target.getNearestPackage().getPackagedElements().add(tempSatisfy);
    // put the link in the same container as the target : requirement
    tempSatisfy.getSuppliers().add(target);
    tempSatisfy.getClients().add(source);
    tempSatisfy.setName(id);
    Stereotype satisfyStereotype= tempSatisfy.getApplicableStereotype(SATISFY_STEREOTYPE);
    tempSatisfy.applyStereotype(satisfyStereotype);
  }
View Full Code Here

  protected void createRequirement(org.eclipse.uml2.uml.Package owner, String id,
      String text) {
    org.eclipse.uml2.uml.Class requirement = owner.createOwnedClass(
        "tmpName", false);
    Stereotype reqStereotype = requirement
        .getApplicableStereotype(REQUIREMENT_STEREOTYPE);
    requirement.applyStereotype(reqStereotype);
    requirement.setName(id);
    requirement.setValue(reqStereotype,
        REQUIREMENT_ID_ATT, id);
View Full Code Here

public class NameIsUnique extends AbstractModelConstraint {
  @Override
  public IStatus validate(IValidationContext ctx) {
    Class uml_class = (Class) ctx.getTarget();
    Stereotype stereotype = uml_class.getAppliedStereotype("SysML::Blocks::Block");
   
    //
    // We only check SysML Blocks
    //
    if (stereotype == null) {
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.