Examples of TModel


Examples of org.apache.juddi.model.Tmodel

                          TModelInfos tmodelInfos = registeredInfo.getTModelInfos();
                          if (tmodelInfos!=null && tmodelInfos.getTModelInfo()!=null) {
                            Iterator<TModelInfo> iter = tmodelInfos.getTModelInfo().iterator();
                            while (iter.hasNext()) {
                              TModelInfo tModelInfo = iter.next();
                              Tmodel tmodel = (Tmodel) em.find(org.apache.juddi.model.Tmodel.class, tModelInfo.getTModelKey());
                              tmodel.setDeleted(true);
                              em.persist(tmodel);
                            }
                          }
                          log.info("remove all persisted AuthTokens for publisher " + entityKey + ".");
                          Query q1 = em.createQuery("DELETE FROM AuthToken auth WHERE auth.authorizedName = '" + entityKey + "'");
View Full Code Here

Examples of org.apache.juddi.model.Tmodel

                                //this is normally the Install class firing up
                                log.warn(new ErrorMessage("errors.tmodel.ReferentialIntegrityNullEM"));
                        } else {
                                //Collections.sort(buildInTmodels);
                                //if ((buildInTmodels, tmodelKey) == -1)
                                Tmodel modelTModel = null;
                                {
                                        EntityTransaction tx = em.getTransaction();
                                        try {

                                                tx.begin();
                                                modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);

                                                if (modelTModel == null) {
                                                        checked = false;
                                                } else {
                                                        for (org.apache.juddi.model.KeyedReference ref : modelTModel.getCategoryBag().getKeyedReferences()) {
                                                                if ("uddi-org:types:unchecked".equalsIgnoreCase(ref.getKeyName())) {
                                                                        checked = false;
                                                                        break;
                                                                }
                                                        }
View Full Code Here

Examples of org.apache.juddi.model.Tmodel

                EntityManager em = PersistenceManager.getEntityManager();
                boolean found = false;
                if (em == null) {
                        log.warn(new ErrorMessage("errors.tmodel.ReferentialIntegrityNullEM"));
                } else {
                        Tmodel modelTModel = null;
                        {
                                EntityTransaction tx = em.getTransaction();
                                try {

                                        tx.begin();
View Full Code Here

Examples of org.apache.ws.scout.model.uddi.v2.TModel

        return bs;
    }

  public static TModel getTModelFromJAXRClassificationScheme(
      ClassificationScheme classificationScheme) throws JAXRException {
    TModel tm = objectFactory.createTModel();
    try {
            /*
             * a fresh scheme might not have a key
             */

            Key k = classificationScheme.getKey();

            if (k != null && k.getId() != null) {
                tm.setTModelKey(k.getId());
            } else {
                tm.setTModelKey("");
            }

            /*
             * There's no reason to believe these are here either
             */

            Slot s = classificationScheme.getSlot("authorizedName");

      if (s != null && s.getName() != null) {
                tm.setAuthorizedName(s.getName());
            }

            s = classificationScheme.getSlot("operator");

      if (s != null && s.getName() != null) {
                tm.setOperator(s.getName());
            }

      InternationalString iname = classificationScheme.getName();
      
            tm.setName(getFirstName(iname));

      InternationalString idesc = classificationScheme.getDescription();
     
        addDescriptions(tm.getDescription(), idesc);

            IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(classificationScheme.getExternalIdentifiers());
            if (idBag!=null) {
                tm.setIdentifierBag(idBag);
            }
            CategoryBag catBag = getCategoryBagFromClassifications(classificationScheme.getClassifications());
            if (catBag!=null) {
                tm.setCategoryBag(catBag);
            }
     
      // ToDO: overviewDoc
    } catch (Exception ud) {
            throw new JAXRException("Apache JAXR Impl:", ud);
View Full Code Here

Examples of org.apache.ws.scout.uddi.TModel

   public static Concept getConcept(TModelDetail tm, LifeCycleManager lcm)
           throws JAXRException
   {
      Concept concept = new ConceptImpl(lcm);
      TModel[] tc = tm.getTModelArray();
      TModel tmodel = tc != null && tc.length > 0 ? tc[0] : null;
     
      if (tmodel != null) {
        concept.setKey(lcm.createKey(tmodel.getTModelKey()));
        concept.setName(lcm.createInternationalString(getLocale(tmodel.getName().getLang()), tmodel.getName().getStringValue()));

        Description desc = getDescription(tmodel);
        if( desc != null ) {
            concept.setDescription(lcm.createInternationalString(getLocale(desc.getLang()), desc.getStringValue()));
        }

          concept.addExternalIdentifiers(getExternalIdentifiers(tmodel.getIdentifierBag(), lcm));
          concept.addClassifications(getClassifications(tmodel.getCategoryBag(), lcm));
      }
      return concept;
   }
View Full Code Here

Examples of org.uddi.api_v2.TModel

       
        public static org.uddi.api_v2.TModel MapTModel(org.uddi.api_v3.TModel be) {
                if (be == null) {
                        return null;
                }
                TModel item = new org.uddi.api_v2.TModel();
                item.setTModelKey(be.getTModelKey());
                item.setName(new Name(be.getName().getValue(), be.getName().getLang()));
                item.setCategoryBag(MapCategoryBag(be.getCategoryBag()));
                item.getDescription().addAll(MapDescription(be.getDescription()));
                item.setIdentifierBag(MapIdentBag(be.getIdentifierBag()));
                item.setOverviewDoc(MapOverviewDoc(be.getOverviewDoc()));
                return item;
        }
View Full Code Here

Examples of org.uddi.api_v3.TModel

      List<TModelInfo> tiList = tInfos.getTModelInfo();
      if (tiList == null || tiList.size() == 0)
        Assert.fail("No result from find tModel operation");
      TModelInfo tiOut = tiList.get(0);
     
      TModel tmIn = (TModel)EntityCreator.buildFromDoc(TckTModel.JOE_PUBLISHER_TMODEL_XML, "org.uddi.api_v3");
     
      assertEquals(tmIn.getTModelKey(), tiOut.getTModelKey());
      assertEquals(tmIn.getName().getLang(), tiOut.getName().getLang());
      assertEquals(tmIn.getName().getValue(), tiOut.getName().getValue());

      TckValidator.checkDescriptions(tmIn.getDescription(), tiOut.getDescription());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown.");
    }
View Full Code Here

Examples of org.uddi.api_v3.TModel

      if (!seedAlways && alreadyInstalled(config))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      log.info("Loading the root Publisher from file " + fileRootPublisher);
      rootPublisher = installPublisher(em, fileRootPublisher, config);
     
      installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);

      rootBusinessEntity.setBusinessKey(nodeId);
      installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config);
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
View Full Code Here

Examples of org.uddi.api_v3.TModel

        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      if (!alreadyInstalled) {
        log.info("Loading the root Publisher from file " + fileRootPublisher);
     
        rootPublisher = installPublisher(em, fileRootPublisher, config);
        installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);
        rootBusinessEntity.setBusinessKey(nodeId);
        installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config);
      } else {
        log.debug("juddi.seed.always reapplies all seed files except for the root data.");
      }
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
View Full Code Here

Examples of org.uddi.api_v3.TModel

        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      if (!alreadyInstalled) {
        log.info("Loading the root Publisher from file " + fileRootPublisher);
     
        rootPublisher = installPublisher(em, fileRootPublisher, config);
        installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);
        rootBusinessEntity.setBusinessKey(nodeId);
        installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config);
      } else {
        log.debug("juddi.seed.always reapplies all seed files except for the root data.");
      }
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
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.