Examples of Association


Examples of OntoUML.Association

        if (result == null) result = caseElement(antiRigidSortalClass);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case OntoUMLPackage.ASSOCIATION: {
        Association association = (Association)theEObject;
        T result = caseAssociation(association);
        if (result == null) result = caseRelationship(association);
        if (result == null) result = caseRelationalClassifier(association);
        if (result == null) result = caseElement(association);
        if (result == null) result = caseClassifier(association);
View Full Code Here

Examples of OntoUML.Association

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetAssociationEnd(Association newAssociationEnd, NotificationChain msgs) {
    Association oldAssociationEnd = associationEnd;
    associationEnd = newAssociationEnd;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OntoUMLPackage.PROPERTY__ASSOCIATION_END, oldAssociationEnd, newAssociationEnd);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of com.arconsis.android.datarobot.builder.schema.data.Association

      }

      VariableElement association = child.accept(new AssociationElementResolvingTypeVisitor(), null);
      if (association != null) {
        AssociationReader associationReader = new AssociationReader(association, entityNames, messager);
        Association read = associationReader.read();
        if (read != null) {
          table.addAssociation(read);

          if (AssociationType.TO_MANY == read.getCardinality()) {
            if (countedToManyAssociations.containsKey(read.getCanonicalTypeInEntity())) {
              countedToManyAssociations.get(read.getCanonicalTypeInEntity()).incrementAndGet();
            } else {
              countedToManyAssociations.put(read.getCanonicalTypeInEntity(), new AtomicInteger(1));
            }
          }
        }
      }
    }
View Full Code Here

Examples of de.caterdev.modelling.core.impl.Association

        for (IAssociation association : input.getAssociations())
        {
            IElement start = elementMapping.get(association.getStartpoint());
            IElement end = elementMapping.get(association.getEndpoint());
           
            copy.add(new Association(association.isDirected(), start, end));
        }
       
        return copy;
    }
View Full Code Here

Examples of javax.xml.registry.infomodel.Association

        Collection targetKeys = null;
        String targetId = null;
        String sourceId = null;
        BusinessQueryManager bqm2 = null;
        BusinessLifeCycleManager blm2 = null;
        Association association = null;

        try
        {
            login();
            getJAXREssentials();

            // second user.
            Connection con2 = loginSecondUser();
            RegistryService rs2 = con2.getRegistryService();
            blm2 = rs2.getBusinessLifeCycleManager();
            bqm2 = rs2.getBusinessQueryManager();

            Organization target = blm2.createOrganization(blm.createInternationalString(orgTarget));
            Organization source = blm.createOrganization(blm.createInternationalString(orgSource));

            Collection orgs = new ArrayList();
            orgs.add(source);
            br = blm.saveOrganizations(orgs);
            if (br.getExceptions() != null)
            {
                fail(" Source:Save Orgs failed");
            }

            sourceKeys = br.getCollection();
            Iterator iter = sourceKeys.iterator();
            while (iter.hasNext())
            {
                savekey = (Key) iter.next();
            }
            sourceId = savekey.getId();

            String objectType = LifeCycleManager.ORGANIZATION;
            Organization pubSource = (Organization) bqm.getRegistryObject(sourceId, objectType);
            assertNotNull("Source retrieved: ", pubSource.getName().getValue());

            orgs.clear();
            orgs.add(target);
            br = blm2.saveOrganizations(orgs);
            if (br.getExceptions() != null)
            {
                fail("Target:Save Orgs failed");
            }
            targetKeys = br.getCollection();
            iter = targetKeys.iterator();
            while (iter.hasNext())
            {
                savekey = (Key) iter.next();
            }
            targetId = savekey.getId();

            Organization pubTarget = (Organization) bqm2.getRegistryObject(targetId, objectType);
            assertNotNull("Target: ", pubTarget.getName().getValue());

            Concept associationType = getAssociationConcept(type);
            if (associationType == null)
                fail(" getAssociationConcept returned null");

            association = blm.createAssociation(pubTarget, associationType);
            association.setSourceObject(pubSource);

            blm2.confirmAssociation(association);

            Collection associations = new ArrayList();
            associations.add(association);
            br = blm2.saveAssociations(associations, false);
            if (br.getExceptions() != null)
            {
                fail(" Save Association did not complete due to errors");
            }

            associationKeys = br.getCollection();
            iter = associationKeys.iterator();

            Collection associationTypes = new ArrayList();
            associationTypes.add(associationType);
            //confirmedByCaller = false, confirmedByOtherParty = true.
            br = bqm.findCallerAssociations(null,
                    new Boolean(false),
                    new Boolean(true), associationTypes);
            if (br.getExceptions() != null)
            {
                fail(" Find Caller Association failed");
            }
            associations = br.getCollection();
            if (associations.size() == 0)
            {
                fail(" Retrieving Associations failed");
            }
            iter = associations.iterator();
            while (iter.hasNext())
            {
                association = (Association) iter.next();
            }

            assertNotNull("Association type:", association.getAssociationType().getValue());
            if (association.isConfirmed())
            {
                fail("FAIL: isConfirmed returned true  ");
            }
            if (association.isConfirmedBySourceOwner())
            {
                fail("FAIL: isConfirmedBySourceOwner returned true  ");
            }

            blm.confirmAssociation(association);
            br = blm.saveAssociations(associations, false);
            if (br.getExceptions() != null)
            {
                fail("Error:  saveAssociations failed  ");
            }


            br = bqm.findCallerAssociations(null, new Boolean(true), new Boolean(true), associationTypes);

            if (br.getExceptions() != null)
            {
                fail("Error:  findCallerAssociations failed  ");
            }

            associations = br.getCollection();
            iter = associations.iterator();
            while (iter.hasNext())
            {
                association = (Association) iter.next();
            }

            if (!(association.isConfirmed()))
            {
                fail("FAIL: isConfirmed incorrectly returned false ");
            }

            if (!(association.isConfirmedBySourceOwner()))
            {
                fail("FAIL: isConfirmedBySourceOwner incorrectly returned false ");
            }
        } catch (Exception e)
        {
            e.printStackTrace();
            fail("Caught unexpected exception: " + e.getMessage());
        } finally
        {
            // Clean up
            try
            {
                blm2.deleteOrganizations(targetKeys);
                blm.deleteOrganizations(sourceKeys);
                if(association != null)
                {
                   Key asskey = association.getKey();
                   List<Key> keyList = new ArrayList<Key>();
                   keyList.add(asskey);
                   blm.deleteAssociations(keyList);
                }
            } catch (JAXRException je)
View Full Code Here

Examples of javax.xml.registry.infomodel.Association

            assertNotNull("Target Org", targetOrg.getName().getValue());

            Concept associationType = getAssociationConcept("Implements");
            assertNotNull("AssociationType", associationType);

            Association a = blm.createAssociation(targetOrg, associationType);
            a.setSourceObject(pubSource);
            a.setTargetObject(targetOrg);

            blm.confirmAssociation(a);
            blm2.confirmAssociation(a);

            log.debug("Confirmed the association");
           
            // publish the Association
            Collection associations = new ArrayList();
            associations.add(a);
            br = blm2.saveAssociations(associations, false);

            if (br.getExceptions() != null)
            {
                fail("Second User :save Association failed");
            }

            log.debug("Second User: saved the association");
           
            br = bqm.findCallerAssociations(null,
                    new Boolean(true),
                    new Boolean(true),
                    null);

            if (br.getExceptions() == null)
            {
                Collection results = br.getCollection();
                assertTrue("Result is 1",results.size() == 1);
                if (results.size() > 0)
                {
                    iter = results.iterator();
                    while (iter.hasNext())
                    {
                        Association a1 = (Association) iter.next();
                        assockey = a1.getKey();
                        ScoutUtil.validateAssociation(a1, orgSource);
                    }
                }
            }
            if (assockey != null)
            {
                Collection keys = new ArrayList();
                keys.add(assockey);
                br = blm.deleteAssociations(keys);
               
                if(br.getExceptions() != null)
                   fail("Deletion of Associations failed");

                System.out.println("JBAS-7129 needs to be fixed");
               
               
                BulkResponse brq = bqm.findCallerAssociations(null, Boolean.TRUE, Boolean.TRUE, null);
                if (brq.getExceptions() == null)
                {
                    Collection retAssocs = brq.getCollection();
                    if (retAssocs.size() == 0)
                    {
                        //Pass
                    } else
                    {
                       Iterator iterAss = retAssocs.iterator();
                       while(iterAss.hasNext())
                       {
                          Association assc = (Association) iterAss.next();
                          if(assc.getKey().getId().equals(assockey.getId()))
                             fail("Deleted Association found");
                       }
                    }
                }
              
View Full Code Here

Examples of net.sf.jz3950.Association

    @Override
    protected void setUp() throws Exception
    {
        super.setUp();
        this.association = new Association();
    }
View Full Code Here

Examples of oracle.toplink.essentials.mappings.Association

     */
    public Vector getAddAssociations() {
        Vector addAssociations = new Vector();

        for (Iterator i = getAddObjects().keySet().iterator(); i.hasNext(); ) {
            Association association = new Association();
            Object key = i.next();
            Object value = getAddObjects().get(key);

            association.setKey(key);
            association.setValue(value);
            addAssociations.add(association);
        }
        if (addAssociations.size() == 0) {
            return null;
        }
View Full Code Here

Examples of org.activiti.bpmn.model.Association

    return ELEMENT_ASSOCIATION;
  }
 
  @Override
  protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
    Association association = new Association();
    BpmnXMLUtil.addXMLLocation(association, xtr);
    association.setSourceRef(xtr.getAttributeValue(null, ATTRIBUTE_FLOW_SOURCE_REF));
    association.setTargetRef(xtr.getAttributeValue(null, ATTRIBUTE_FLOW_TARGET_REF));
    association.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
   
    parseChildElements(getXMLElementName(), association, model, xtr);

    return association;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.provider.Association

    return associationEnd;
  }

  @Override
  public Association getEdmAssociation() {
    Association association = new Association();
    association
        .setEnd1(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "SalesOrderHeader")));
    association.setEnd2(new AssociationEnd().setType(new FullQualifiedName("salesorderprocessing", "String")));

    return association;
  }
View Full Code Here
TOP
Copyright © 2015 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.