Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Concept


    if ((category==null) || (serviceName == null)) {
      return null ;
    }
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);
      // Get registry service and business query manager
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
            final ClassificationScheme cScheme = getClassificationScheme(bqm, blm) ;
View Full Code Here


  private void transferEPR(Service toService, Service fromService, ServiceBinding binding,
      Connection connection)
    throws JAXRException
  {
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);

      RegistryService rs = connection.getRegistryService();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
           
            fromService.removeServiceBinding(binding);
View Full Code Here

    }
   
    Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
      BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
      Collection<String> findQualifiers = null;
      //Collection<String> findQualifiers = new ArrayList<String>();
View Full Code Here

            }
            String targetid = savekey.getId();
            Organization targetOrg = (Organization) bqm2.getRegistryObject(targetid, objectType);
            assertNotNull("Target Org", targetOrg.getName().getValue());

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

            Association a = blm.createAssociation(targetOrg, associationType);
            a.setSourceObject(pubSource);
View Full Code Here

            savekey = (Key)iter.next();
         }
         targetId = savekey.getId();
         Organization pubTarget = (Organization)bqm2.getRegistryObject(targetId, objectType);

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

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

         blm.confirmAssociation(a); //First user
         blm2.confirmAssociation(a); //Second user

         // publish Association
         Collection associations = new ArrayList();
         associations.add(a);
         // Second user saves the association.
         br = blm2.saveAssociations(associations, false);

         if (br.getExceptions() != null)
         {
            fail("Error:Save Associations failed \n");
         }
         BulkResponse targetAssoc = bqm.findCallerAssociations(null,
                 new Boolean(true),
                 new Boolean(true),
                 null);

         if (targetAssoc.getExceptions() == null)
         {
            Collection targetCol = targetAssoc.getCollection();
            if (targetCol.size() > 0)
            {
               iter = targetCol.iterator();
               while (iter.hasNext())
               {
                  Association a1 = (Association)iter.next();
                  Organization o = (Organization)a1.getSourceObject();
                  o = (Organization)a1.getTargetObject();
                  Concept atype = a1.getAssociationType();
                  assertNotNull("Concept Type stored in Association", atype);
               }
            }
         }
View Full Code Here

            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 a = blm.createAssociation(pubTarget, associationType);
            a.setSourceObject(pubSource);
View Full Code Here

         throw new Exception("Invalid Source Org in Association");
      }
      o = (Organization)a.getTargetObject();
      if(o.getName()== null || o.getName().getValue() == null)
         throw new Exception("Target OrgName in association is null");;
      Concept atype = a.getAssociationType();
      if(atype.getName() == null || atype.getName().getValue() ==null)
       throw new Exception("Concept stored in Association" );
   }
View Full Code Here

 
   public void testClassificationOnConcepts() throws Exception
   {
      login();
      getJAXREssentials();
      Concept concept=null;
      Collection concepts = new ArrayList(1);
      String portTypeName = "Test Port Type";
      concept = blm.createConcept( null, portTypeName ,"" );
      ExternalLink wsdlLink = blm.createExternalLink("http://test.org/"+portTypeName,"TEST Port Type definition");
      concept.addExternalLink(wsdlLink);
      
      ClassificationScheme TYPE = (ClassificationScheme)bqm.getRegistryObject(UUID_TYPE, LifeCycleManager.CLASSIFICATION_SCHEME);
      assertTrue("Classifications are not empty", TYPE.getClassifications().size() > 0);
      System.out.println("TYPE.Classifications = " +TYPE.getClassifications());
      concept.addClassification(blm.createClassification( TYPE, blm.createInternationalString("TEST CLASSIFICATION"), "test portType")  );

      concepts.add(concept);
      BulkResponse response = blm.saveConcepts( concepts );
      if (response != null && response.getCollection().size() > 0)
      {
         concept.setKey((Key)response.getCollection().iterator().next() );
         assertNotNull("Key created != null", concept.getKey());
         System.out.println("Concept Key = " + concept.getKey() + "\".");
      }
     
      //Obtain the saved concepts
      Concept savedConcept = (Concept)bqm.getRegistryObject(concept.getKey().getId(),
                                      LifeCycleManager.CONCEPT );
      assertNotNull("savedConcept is not null", savedConcept);
      Collection collection = savedConcept.getClassifications();
      assertNotNull("Classifications is not null", collection);
      assertTrue("Classifications is not empty", collection.isEmpty() == false);
   }
View Full Code Here

     
      if (assc.getTargetObject().getKey() != null &&
        assc.getTargetObject().getKey().getId() != null) {
            pa.setToKey(assc.getTargetObject().getKey().getId());
      }
            Concept c = assc.getAssociationType();
            String v = c.getValue();
      KeyedReference kr = KeyedReference.Factory.newInstance();
            Key key = c.getKey();
      if (key == null) {
        // TODO:Need to check this. If the concept is a predefined
        // enumeration, the key can be the parent classification scheme
                key = c.getClassificationScheme().getKey();
            }
      if (key == null || key.getId() == null) {
        // The parent classification scheme may not always contain the
        // key. It is okay if it doesn't, since the UDDI v2 spec allows
        // TModelKey to be absent.
View Full Code Here

                    } else {
              if (classification.isExternal()) {
                            iname = (InternationalStringImpl) ((RegistryObject) classification).getName();
                            value = classification.getValue();
              } else {
                Concept concept = classification.getConcept();
                if (concept != null) {
                  iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
                  value = concept.getValue();
                  scheme = concept.getClassificationScheme();
                }
              }
     
              String name = iname.getValue();
              if (name != null)
View Full Code Here

TOP

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

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.