Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Association


          && (targetObjectId==null || targetObjectId.equals(targetKey))) {
            Collection<Key> orgcol = new ArrayList<Key>();
            orgcol.add(new KeyImpl(sourceKey));
            orgcol.add(new KeyImpl(targetKey));
            BulkResponse bl = getRegistryObjects(orgcol, LifeCycleManager.ORGANIZATION);
            Association asso = ScoutUddiJaxrHelper.getAssociation(bl.getCollection(),
              registryService.getBusinessLifeCycleManager());
            KeyedReference keyr = pas.getKeyedReference();
            Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
            c.setName(new InternationalStringImpl(keyr.getKeyName()));
            c.setKey( new KeyImpl(keyr.getTModelKey()) );
            c.setValue(keyr.getKeyValue());
            asso.setAssociationType(c);
            col.add(asso);
        }

            }
            return new BulkResponseImpl(col);
View Full Code Here


                String targetKey = asi.getToKey();
                Collection<Key> orgcol = new ArrayList<Key>();
                orgcol.add(new KeyImpl(sourceKey));
                orgcol.add(new KeyImpl(targetKey));
                BulkResponse bl = getRegistryObjects(orgcol, LifeCycleManager.ORGANIZATION);
                Association asso = ScoutUddiJaxrHelper.getAssociation(bl.getCollection(),
                                             registryService.getBusinessLifeCycleManager());
                //Set Confirmation
                ((AssociationImpl)asso).setConfirmedBySourceOwner(caller);
                ((AssociationImpl)asso).setConfirmedByTargetOwner(other);

                if(confirm != Constants.COMPLETION_STATUS_COMPLETE)
                     ((AssociationImpl)asso).setConfirmed(false);

                Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
                KeyedReference keyr = asi.getKeyedReference();
                c.setKey(new KeyImpl(keyr.getTModelKey()));
                c.setName(new InternationalStringImpl(keyr.getKeyName()));
                c.setValue(keyr.getKeyValue());
                asso.setKey(new KeyImpl(keyr.getTModelKey())); //TODO:Validate this
                asso.setAssociationType(c);
                col.add(asso);
            }


            return new BulkResponseImpl(col);
View Full Code Here

            throw new InvalidRequestException("Unknown interface: " + interfaceName);
        }
    }

    public Association createAssociation(RegistryObject targetObject, Concept associationType) throws JAXRException {
        Association assoc = (Association) this.createObject(LifeCycleManager.ASSOCIATION);
        assoc.setTargetObject(targetObject);
        assoc.setAssociationType(associationType);
        return assoc;
    }
View Full Code Here

                } else
                {
                   Iterator iterAss = retAssocs.iterator();
                   while(iterAss.hasNext())
                   {
                      Association assc = (Association) iterAss.next();
                      if(assc.getKey().getId().equals(associationID)) {
                        System.out.println("found: " + associationID);
                          fail("Deleted Association found");
                      }
                   }
                }
View Full Code Here

   
  private void createAssociation(Organization sOrg, Organization tOrg)
      throws JAXRException {

    Concept type = bqm.findConceptByPath(associationType);
    Association association = blm.createAssociation(tOrg, type);
    sOrg.addAssociation(association);

    ArrayList<Association> associations = new ArrayList<Association>();
    associations.add(association);
View Full Code Here

            assertEquals(1,associations.size());

      // then step through them
      for (Iterator conceptIter = associations.iterator(); conceptIter
          .hasNext();) {
        Association a = (Association) conceptIter.next();

        System.out.println("Id: " + a.getKey().getId());
        System.out.println("Name: " + a.getName().getValue());

        // Print spacer between messages
        System.out.println(" --- ");

        id = a.getKey().getId();
        deleteAssociation(a.getKey());

        System.out.println("\n ============================== \n");
      }
    }
    return id;
View Full Code Here

            Iterator<Key> iterator = keys.iterator();
            sOrg.setKey(iterator.next());
            tOrg.setKey(iterator.next());
            //creating the RelatedTo Association between these two organizations
            Concept type = bqm.findConceptByPath("/AssociationType/RelatedTo");
            Association association = blm.createAssociation(tOrg, type);
            sOrg.addAssociation(association);
            ArrayList<Association> associations = new ArrayList<Association>();
            associations.add(association);
            //save associations
            BulkResponse br2 = blm.saveAssociations(associations, true);
View Full Code Here

     * @throws JAXRException
     */
    public void createAssociation(Concept type, RegistryObject registryObject)
    throws JAXRException
    {
    Association association = blm.createAssociation(registryObject, type);
   
    ArrayList<Association> associations = new ArrayList<Association>();
    associations.add(association);
   
    BulkResponse br = blm.saveAssociations(associations, true);
View Full Code Here

              {
                associationType = concept;
              }
            }
           
            Association a = blm.createAssociation(targetOrg, associationType);
            a.setSourceObject(queried);
            blm2.confirmAssociation(a);

            // publish the Association
            Collection associations = new ArrayList()
            associations.add(a);
View Full Code Here

*/
public class LifeCycleManagerTest extends TestCase {
    private LifeCycleManager manager;

    public void testCreateObjectAssociation() throws JAXRException {
        Association assoc = (Association) manager.createObject(LifeCycleManager.ASSOCIATION);
        assertEquals(AssociationImpl.class, assoc.getClass());
        assertSame(manager, assoc.getLifeCycleManager());
    }
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.Association

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.