Examples of Stereotype


Examples of org.eclipse.uml2.Stereotype

                implements Predicate
            {
                public boolean evaluate(Object object)
                {
                    boolean valid;
                    Stereotype stereotype = (Stereotype)object;
                    String name = StringUtils.trimToEmpty(stereotype.getName());
                    valid = stereotypeName.equals(name);
                    for (Iterator itStereo = stereotype.allParents().iterator(); !valid && itStereo.hasNext();)
                    {
                        Stereotype currentStereotype = (Stereotype)itStereo.next();
                        valid = StringUtils.trimToEmpty(currentStereotype.getName()).equals(stereotypeName);
                    }
                    return valid;
                }
            }
            hasStereotype =
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

        }
        final Collection tags = new ArrayList();
        final Collection stereotypes = element.getAppliedStereotypes();
        for (Iterator stereoIt = stereotypes.iterator(); stereoIt.hasNext();)
        {
            Stereotype stereo = (Stereotype)stereoIt.next();
            if (stereo.getName().equals(TAGGED_VALUES_STEREOTYPE))
            {
                List tagNames = (List)element.getValue(
                        stereo,
                        "TagName");
                List tagValues = (List)element.getValue(
                        stereo,
                        "TagValue");
                for (int ctr = 0; ctr < tagValues.size(); ctr++)
                {
                    tags.add(new TagDefinitionImpl(
                            tagNames.get(ctr).toString(),
                            tagValues.get(ctr)));
                }
            }
            else if (element.hasValue(
                    stereo,
                    "value"))
            {
                final Object value = element.getValue(
                        stereo,
                        "value");
                tags.add(new TagDefinitionImpl(
                        stereo.getName(),
                        value));
            }
            else
            {
                for (Iterator tvIt = getAttributes(
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

     */
    public static Stereotype findAppliedStereotype(
        final Element element,
        final String name)
    {
        Stereotype foundStereotype = element.getAppliedStereotype(name);
        if (foundStereotype == null)
        {
            final Set stereotypes = element.getAppliedStereotypes();
            if (stereotypes != null)
            {
                for (final Iterator iterator = stereotypes.iterator(); iterator.hasNext();)
                {
                    final Stereotype stereotype = (Stereotype)iterator.next();
                    if (stereotype.getName().equals(name))
                    {
                        foundStereotype = stereotype;
                        break;
                    }
                }
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

     */
    public static Stereotype findApplicableStereotype(
        final Element element,
        final String name)
    {
        Stereotype foundStereotype = element.getApplicableStereotype(name);
        if (foundStereotype == null)
        {
            final Set stereotypes = element.getApplicableStereotypes();
            if (stereotypes != null)
            {
                for (final Iterator iterator = stereotypes.iterator(); iterator.hasNext();)
                {
                    final Stereotype stereotype = (Stereotype)iterator.next();
                    if (stereotype.getName().equals(name))
                    {
                        foundStereotype = stereotype;
                        break;
                    }
                }
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

                implements Predicate
            {
                public boolean evaluate(Object object)
                {
                    boolean valid;
                    Stereotype stereotype = (Stereotype)object;
                    String name = StringUtils.trimToEmpty(stereotype.getName());
                    valid = stereotypeName.equals(name);
                    for (Iterator itStereo = stereotype.allParents().iterator(); !valid && itStereo.hasNext();)
                    {
                        Stereotype currentStereotype = (Stereotype)itStereo.next();
                        valid = StringUtils.trimToEmpty(currentStereotype.getName()).equals(stereotypeName);
                    }
                    return valid;
                }
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

        NamedElement element = (NamedElement)modelElement;
        Set stereotypes = element.getAppliedStereotypes();
        ArrayList names = new ArrayList();
        for (final Iterator iterator = stereotypes.iterator(); iterator.hasNext();)
        {
            Stereotype stereotype = (Stereotype)iterator.next();
            names.add(stereotype.getName());
        }
        return names;
    }
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

    jIvaloAttributeStereotype = getStereotype(attribute1, jIvaloAttrSteroetypeName);

  }

  private void setTagValue(Class c, String name, String value) {
    Stereotype st = getStereotype(c, jIvaloClassSteroetypeName);
    if ( st == null ) {
      addStereotype(c, jIvaloClassStereotype);
      st = getStereotype(c, jIvaloClassSteroetypeName);
    }
    c.setValue(st, name, value);
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

    }
    c.setValue(st, name, value);
  }
 
  private void setTagValue(Property c, String name, String value) {
    Stereotype st = getStereotype(c, jIvaloAttrSteroetypeName);
    if ( st == null ) {
      addStereotype(c, jIvaloAttributeStereotype);
      st = getStereotype(c, jIvaloAttrSteroetypeName);
    }
    c.setValue(st, name, value);
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

  }
 
  private Stereotype getStereotype(Class c, String name) {
    Iterator it = c.getAppliedStereotypes().iterator();
    while (it.hasNext()) {
      Stereotype st = (Stereotype)it.next();
      if (name.equals(st.getName())) {
        return st;
      }
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.uml2.Stereotype

  }
 
  private Stereotype getStereotype(Property c, String name) {
    Iterator it = c.getAppliedStereotypes().iterator();
    while (it.hasNext()) {
      Stereotype st = (Stereotype)it.next();
      if (name.equals(st.getName())) {
        return st;
      }
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.