Examples of Allocate


Examples of org.eclipse.papyrus.sysml.allocations.Allocate

  @Override
  protected T doSwitch(int classifierID, EObject theEObject) {
    switch(classifierID) {
    case AllocationsPackage.ALLOCATE:
    {
      Allocate allocate = (Allocate)theEObject;
      T result = caseAllocate(allocate);
      if(result == null)
        result = defaultCase(theEObject);
      return result;
    }
View Full Code Here

Examples of org.eclipse.papyrus.sysml.allocations.Allocate

  public EList<NamedElement> getAllocatedFrom() {
    // AllocatedFrom property lists all the named elements linked to current
    // by an Allocate link.
    // Current element is the target of the Allocate link.
    EList<NamedElement> allocatedFrom = new BasicEList<NamedElement>();
    Allocate currentAllocate = null;

    if(getBase_NamedElement() != null) {
      // Find Allocate link
      Iterator<DirectedRelationship> itDep = getBase_NamedElement().getTargetDirectedRelationships().iterator();
      while(itDep.hasNext()) {
        DirectedRelationship currentDRelationship = itDep.next();
        currentAllocate = UMLUtil.getStereotypeApplication(currentDRelationship, Allocate.class);

        if(currentAllocate != null) {
          EList<Element> targets = currentAllocate.getBase_Abstraction().getSources();
          Iterator<Element> it = targets.iterator();
          while(it.hasNext()) {
            Element currentElt = it.next();
            if(currentElt instanceof NamedElement) {
              allocatedFrom.add((NamedElement)currentElt);
View Full Code Here

Examples of org.eclipse.papyrus.sysml.allocations.Allocate

  public EList<NamedElement> getAllocatedTo() {
    // AllocatedFrom property lists all the named elements linked to current
    // by an Allocate link.
    // Current element is the target of the Allocate link.
    EList<NamedElement> allocatedTo = new BasicEList<NamedElement>();
    Allocate currentAllocate = null;

    if(getBase_NamedElement() != null) {
      // Find Allocate link
      Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();
      while(itDep.hasNext()) {
        Dependency currentDependency = itDep.next();
        currentAllocate = UMLUtil.getStereotypeApplication(currentDependency, Allocate.class);

        if(currentAllocate != null) {
          allocatedTo.addAll(currentAllocate.getBase_Abstraction().getSuppliers());
        }
      }
    }
    UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, AllocationsPackage.eINSTANCE.getAllocated_AllocatedTo(), allocatedTo.size(), allocatedTo.toArray());
    return resultList;
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.