Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Concept


         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


            }

            service = (Service) bqm.getRegistryObject(serviceKey.getId(), LifeCycleManager.SERVICE);

            //Save some concepts
            Concept testConcept = (Concept) blm.createObject(LifeCycleManager.CONCEPT);
            testConcept.setName(blm.createInternationalString(conceptName));
            Collection concepts = new ArrayList();
            concepts.add(testConcept);
            br = blm.saveConcepts(concepts);
            if (br.getExceptions() != null)
            {
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 = blm.createAssociation(pubTarget, associationType);
            association.setSourceObject(pubSource);
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

            }
            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);
            a.setTargetObject(targetOrg);
View Full Code Here

      throw new RegistryException("Null EPR argument specified") ;
    }
    JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
    Connection connection = jaxrConnectionFactory.getConnection();
        try {
      final Concept jbossTModel = registry.getJBossESBTModel(connection);

      RegistryService rs = connection.getRegistryService();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
            BusinessQueryManager bqm = rs.getBusinessQueryManager();
            ServiceBinding serviceBinding = blm.createServiceBinding();
View Full Code Here

    JAXRConnectionFactory jaxrConnectionFactory = new JAXRConnectionFactory();
    Connection connection = jaxrConnectionFactory.getConnection();
    try {
      JAXRRegistryImpl registry = new JAXRRegistryImpl();
     
      final Concept jbossTModel = registry.getJBossESBTModel(connection);
      // Get registry service and business query manager
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
            final ClassificationScheme cScheme = registry.getClassificationScheme(bqm, blm) ;
View Full Code Here

    {
      throw new RegistryException("Null EPR argument specified") ;
    }
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
        try {
      final Concept jbossTModel = getJBossESBTModel(connection);
   
            //Find the service
            Service service = findService(category,serviceName);
            if (service==null) {
                logger.log(Level.DEBUG, "Service " + serviceName + " does not yet exist, creating now..");
View Full Code Here

  {
    List<EPR> eprs = new ArrayList<EPR>();

    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);

      Service service = findService(category, serviceName);
      if (service==null){
                throw new ServiceNotFoundException("Could not find service with category=" + category + " and serviceName=" + serviceName);
      }
View Full Code Here

  public EPR findEPR(String category, String serviceName) throws RegistryException, ServiceNotFoundException
  {
        EPR epr = null ;
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
        try {
      final Concept jbossTModel = getJBossESBTModel(connection);

            Service service = findService(category, serviceName);
            if (service==null){
                throw new ServiceNotFoundException("Could not find service with category=" + category + " and serviceName=" + serviceName);
            }
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.