public void findTModel(String findQualifier) { try { FindTModel body = (FindTModel)EntityCreator.buildFromDoc(FIND_TMODEL_XML, "org.uddi.api_v3"); if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier); TModelList result = inquiry.findTModel(body); if (result == null) Assert.fail("Null result from find tModel operation"); TModelInfos tInfos = result.getTModelInfos(); if (tInfos == null) Assert.fail("No result from find tModel operation"); 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."); } } }
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; }
if (tModel.getName() == null || tModel.getName().getValue() == null || tModel.getName().getValue().equals("")) { throw new ValueNotAllowedException(new ErrorMessage("errors.tmodel.NoName")); validateIdentifierBag(tModel.getIdentifierBag(), config, false); validateDescriptions(tModel.getDescription()); validateNameLength(tModel.getName().getValue()); validateLang(tModel.getName().getLang()); List<org.uddi.api_v3.OverviewDoc> overviewDocList = tModel.getOverviewDoc(); if (overviewDocList != null) {
if (tModel.getName() == null || tModel.getName().getValue() == null || tModel.getName().getValue().equals("")) { throw new ValueNotAllowedException(new ErrorMessage("errors.tmodel.NoName")); validateIdentifierBag(tModel.getIdentifierBag(), config, false); validateDescriptions(tModel.getDescription()); validateNameLength(tModel.getName().getValue()); validateLang(tModel.getName().getLang()); List<org.uddi.api_v3.OverviewDoc> overviewDocList = tModel.getOverviewDoc(); if (overviewDocList != null) {
public static Concept getConcept(TModel tmodel, LifeCycleManager lifeCycleManager) throws JAXRException { Concept concept = new ConceptImpl(lifeCycleManager); concept.setKey(lifeCycleManager.createKey(tmodel.getTModelKey())); concept.setName(lifeCycleManager.createInternationalString(getLocale(tmodel.getName().getLang()), tmodel.getName().getValue())); Description desc = getDescription(tmodel); if (desc != null) { concept.setDescription(lifeCycleManager.createInternationalString(getLocale(desc.getLang()), desc.getValue())); } concept.addExternalIdentifiers(getExternalIdentifiers(tmodel.getIdentifierBag(), lifeCycleManager)); concept.addClassifications(getClassifications(tmodel.getCategoryBag(), lifeCycleManager)); return concept; }
public static Concept getConcept(TModelDetail tModelDetail, LifeCycleManager lifeCycleManager) throws JAXRException { Concept concept = new ConceptImpl(lifeCycleManager); List<TModel> tmodelList = tModelDetail.getTModel(); for (TModel tmodel : tmodelList) { concept.setKey(lifeCycleManager.createKey(tmodel.getTModelKey())); concept.setName(lifeCycleManager.createInternationalString(getLocale(tmodel.getName().getLang()), tmodel.getName().getValue())); Description desc = getDescription(tmodel); if( desc != null ) { concept.setDescription(lifeCycleManager.createInternationalString(getLocale(desc.getLang()), desc.getValue())); } concept.addExternalIdentifiers(getExternalIdentifiers(tmodel.getIdentifierBag(), lifeCycleManager)); concept.addClassifications(getClassifications(tmodel.getCategoryBag(), lifeCycleManager)); } return concept; }
/** * * @param apiTModel * @param modelTModel * @throws DispositionReportFaultMessage */ public static void mapTModel(org.uddi.api_v3.TModel apiTModel, org.apache.juddi.model.Tmodel modelTModel) throws DispositionReportFaultMessage { modelTModel.setEntityKey(apiTModel.getTModelKey()); modelTModel.setName(apiTModel.getName().getValue()); modelTModel.setLangCode(apiTModel.getName().getLang()); modelTModel.setDeleted(apiTModel.isDeleted()); mapTModelDescriptions(apiTModel.getDescription(), modelTModel.getTmodelDescrs(), modelTModel); mapTModelIdentifiers(apiTModel.getIdentifierBag(), modelTModel.getTmodelIdentifiers(), modelTModel); if (apiTModel.getCategoryBag() != null) { modelTModel.setCategoryBag(new org.apache.juddi.model.TmodelCategoryBag(modelTModel)); mapCategoryBag(apiTModel.getCategoryBag(), modelTModel.getCategoryBag()); } mapTModelOverviewDocs(apiTModel.getOverviewDoc(), modelTModel.getOverviewDocs(), modelTModel); mapTmodelSignatures(apiTModel.getSignature(), modelTModel); }
/** * * @param apiTModel * @param modelTModel * @throws DispositionReportFaultMessage */ public static void mapTModel(org.uddi.api_v3.TModel apiTModel, org.apache.juddi.model.Tmodel modelTModel) throws DispositionReportFaultMessage { modelTModel.setEntityKey(apiTModel.getTModelKey()); modelTModel.setName(apiTModel.getName().getValue()); modelTModel.setLangCode(apiTModel.getName().getLang()); modelTModel.setDeleted(apiTModel.isDeleted()); mapTModelDescriptions(apiTModel.getDescription(), modelTModel.getTmodelDescrs(), modelTModel); mapTModelIdentifiers(apiTModel.getIdentifierBag(), modelTModel.getTmodelIdentifiers(), modelTModel); if (apiTModel.getCategoryBag() != null) { modelTModel.setCategoryBag(new org.apache.juddi.model.TmodelCategoryBag(modelTModel)); mapCategoryBag(apiTModel.getCategoryBag(), modelTModel.getCategoryBag()); } mapTModelOverviewDocs(apiTModel.getOverviewDoc(), modelTModel.getOverviewDocs(), modelTModel); mapTmodelSignatures(apiTModel.getSignature(), modelTModel); }