Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Class


        }
        boolean isEntityAssociation = true;
        for (Iterator ends = ((Association)this.metaObject).getMemberEnds().iterator(); ends.hasNext();)
        {
            final Property prop = (Property)ends.next();
            final Type propertyType = prop.getType();
            if (propertyType == null || !UmlUtilities.containsStereotype(
                    propertyType,
                    UMLProfile.STEREOTYPE_ENTITY))
            {
                isEntityAssociation = false;
View Full Code Here


        if (tagValue != null)
        {
            valueAsString = tagValue.toString();
            if (tagValue instanceof ValueSpecification)
            {
                ValueSpecification literal = (ValueSpecification)tagValue;
                valueAsString = literal.stringValue();
            }
            else if (tagValue instanceof InstanceSpecification)
            {
                InstanceSpecification instance = (InstanceSpecification)tagValue;
                valueAsString = instance.getName();
View Full Code Here

                final Property property = umlClass.createOwnedAttribute(
                        name,
                        element,
                        1,
                        1);
                VisibilityKind kind = VisibilityKind.PUBLIC_LITERAL;
                if (visibility.equalsIgnoreCase("package"))
                {
                    kind = VisibilityKind.PACKAGE_LITERAL;
                }
                if (visibility.equalsIgnoreCase("private"))
View Full Code Here

    protected java.lang.String handleGetVisibility()
    {
        if (this.metaObject instanceof NamedElement)
        {
            final NamedElement element = (NamedElement)this.metaObject;
            final VisibilityKind kind = element.getVisibility();
            String visibility = null;
            if (kind.equals(VisibilityKind.PACKAGE_LITERAL))
            {
                visibility = "package";
            }
            if (kind.equals(VisibilityKind.PRIVATE_LITERAL))
            {
                visibility = "private";
            }
            if (kind.equals(VisibilityKind.PROTECTED_LITERAL))
            {
                visibility = "protected";
            }
            if (kind.equals(VisibilityKind.PUBLIC_LITERAL))
            {
                visibility = "public";
            }
            final TypeMappings languageMappings = this.getLanguageMappings();
            if (languageMappings != null)
View Full Code Here

    // The edgeview represents the new graphical edge
    // with testing of its source and target nodes we can
    // know if the user reconnected the source or the target of the edge
    reconnectService.setReconnectingSource(edgeView.getSourceNode().equals(targetView));
    Class requirement = (Class)((DNodeList)edgeView.getTargetNode()).getTarget();

    reconnectService.setSubRequirement(requirement);
    reconnectService.setOldPointedClass(source);
    reconnectService.setNewPointedClass(target);
    return reconnectService.doSwitch(context);
View Full Code Here

   * @param pkg
   *            The package
   * @return A block
   */
  public Class initBlockForPackage(org.eclipse.uml2.uml.Package pkg) {
    Class block = getBlock(pkg);
    return block;
  }
View Full Code Here

   * @param parent
   *            Parent
   * @return Block
   */
  private Class getBlock(org.eclipse.uml2.uml.Package parent) {
    Class block = UMLFactory.eINSTANCE.createClass();
    parent.getPackagedElements().add(block);
    services.createAssociatedStereotype(block, "SysML::Blocks", "Block");
    String label = labels.computeSysmlLabel(block);
    block.setName(label);
    return block;
  }
View Full Code Here

    Activity activity = action.getActivity();
    Operation contextOp = null;
    if (activity.getSpecification() instanceof Operation) {
      contextOp = (Operation) activity.getSpecification();
    } else if (activity.getOwner() instanceof Class) {
      Class oClass = (Class) activity.getOwner();
      contextOp = oClass.getOperation(activity.getName(), null, null);
    }
    return contextOp;
  }
View Full Code Here

    Logging.debug(""+activity, guardedEdge);
    Operation contextOp = null;
    if (activity.getSpecification() instanceof Operation) {
      contextOp = (Operation) activity.getSpecification();
    } else if (activity.getOwner() instanceof Class) {
      Class oClass = (Class) activity.getOwner();
      contextOp = oClass.getOperation(activity.getName(), null, null);
    }
    return contextOp;
  }
View Full Code Here

   * @param args
   */
  public static void main(String[] args) throws Exception {
    readCmdArgs(args);
    Model model = (Model) load(inFile).get(0);
    Class umlClass = (Class) model.getOwnedMembers().get(0).getOwnedElements().get(0);
    Property umlProperty = (Property) umlClass.getOwnedAttributes().get(0);
   
    //initialize OCL stuff
    OCL ocl = OCL.newInstance();
    Helper helper = ocl.createOCLHelper();
    out(OCL.initialize(OCLParser.RESOURCE_SET));
View Full Code Here

TOP

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

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.