List of usage examples for javax.xml.registry.infomodel Concept getName
InternationalString getName() throws JAXRException;
From source file:it.cnr.icar.eric.client.xml.registry.infomodel.ClassificationSchemeImpl.java
/** * This constructor is to do a type-safe cast from a Concept with no parent to a scheme. * This has history in UDDI and we are not sure what value it has in ebXML. * We are implementing it as it is required by the JAXR API. * Needs evaluation for relevance in JAXR 2.0?? **///from w w w. j a v a2s .c o m public ClassificationSchemeImpl(LifeCycleManagerImpl lcm, Concept concept) throws JAXRException { super(lcm); if (concept.getParent() != null) { throw new InvalidRequestException(JAXRResourceBundle.getInstance() .getString("message.error.cannot.create.concept.parent.classScheme")); } setName(concept.getName()); setDescription(concept.getDescription()); addClassifications(concept.getClassifications()); addExternalIdentifiers(concept.getExternalIdentifiers()); //??incomplete }
From source file:it.cnr.icar.eric.client.ui.thin.components.components.QueryPanelComponent.java
private SelectItem loadConceptItem(Concept concept, String indent) { SelectItem item = null;/*from w ww.j a v a2 s.co m*/ try { String name = indent + ((InternationalStringImpl) concept.getName()) .getClosestValue(FacesContext.getCurrentInstance().getViewRoot().getLocale()); if (name == null || name.indexOf("null") != -1) { name = indent + concept.getValue(); } Object path = concept.getPath(); item = new SelectItem(path, name); } catch (JAXRException ex) { log.error(WebUIResourceBundle.getInstance().getString("message.ErrorGettingDataFromConcept"), ex); } return item; }
From source file:org.apache.ws.scout.registry.BusinessQueryManagerImpl.java
public RegistryObject getRegistryObject(String id, String objectType) throws JAXRException { IRegistry registry = (IRegistry) registryService.getRegistry(); BusinessLifeCycleManager lcm = registryService.getBusinessLifeCycleManager(); if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType)) { try {/*from w w w .j av a 2 s .com*/ TModelDetail tmodeldetail = registry.getTModelDetail(id); Concept c = ScoutUddiJaxrHelper.getConcept(tmodeldetail, lcm); /* * now turn into a concrete ClassificationScheme */ ClassificationScheme scheme = new ClassificationSchemeImpl(lcm); scheme.setName(c.getName()); scheme.setDescription(c.getDescription()); scheme.setKey(c.getKey()); return scheme; } catch (RegistryException e) { throw new JAXRException(e.getLocalizedMessage()); } } else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType)) { try { BusinessDetail orgdetail = registry.getBusinessDetail(id); return ScoutUddiJaxrHelper.getOrganization(orgdetail, lcm); } catch (RegistryException e) { throw new JAXRException(e.getLocalizedMessage()); } } else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType)) { try { TModelDetail tmodeldetail = registry.getTModelDetail(id); return ScoutUddiJaxrHelper.getConcept(tmodeldetail, lcm); } catch (RegistryException e) { throw new JAXRException(e.getLocalizedMessage()); } } else if (LifeCycleManager.SERVICE.equalsIgnoreCase(objectType)) { try { ServiceDetail sd = registry.getServiceDetail(id); if (sd != null && sd.getBusinessService() != null) { for (BusinessService businessService : sd.getBusinessService()) { Service service = getServiceFromBusinessService(businessService, lcm); return service; } } } catch (RegistryException e) { throw new RuntimeException(e); } } return null; }
From source file:org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.java
public RegistryObject getRegistryObject(String id, String objectType) throws JAXRException { IRegistryV3 registry = (IRegistryV3) registryService.getRegistry(); BusinessLifeCycleManager lcm = registryService.getBusinessLifeCycleManager(); if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType)) { try {/*from www. j a v a 2 s. c o m*/ TModelDetail tmodeldetail = registry.getTModelDetail(id); Concept c = ScoutUddiV3JaxrHelper.getConcept(tmodeldetail, lcm); /* * now turn into a concrete ClassificationScheme */ ClassificationScheme scheme = new ClassificationSchemeImpl(lcm); scheme.setName(c.getName()); scheme.setDescription(c.getDescription()); scheme.setKey(c.getKey()); return scheme; } catch (RegistryV3Exception e) { throw new JAXRException(e.getLocalizedMessage()); } } else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType)) { try { BusinessDetail orgdetail = registry.getBusinessDetail(id); return ScoutUddiV3JaxrHelper.getOrganization(orgdetail, lcm); } catch (RegistryV3Exception e) { throw new JAXRException(e.getLocalizedMessage()); } } else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType)) { try { TModelDetail tmodeldetail = registry.getTModelDetail(id); return ScoutUddiV3JaxrHelper.getConcept(tmodeldetail, lcm); } catch (RegistryV3Exception e) { throw new JAXRException(e.getLocalizedMessage()); } } else if (LifeCycleManager.SERVICE.equalsIgnoreCase(objectType)) { try { ServiceDetail sd = registry.getServiceDetail(id); if (sd != null && sd.getBusinessService() != null) { for (BusinessService businessService : sd.getBusinessService()) { Service service = getServiceFromBusinessService(businessService, lcm); return service; } } } catch (RegistryV3Exception e) { throw new RuntimeException(e); } } return null; }
From source file:org.apache.ws.scout.util.ScoutJaxrUddiHelper.java
public static TModel getTModelFromJAXRConcept(Concept concept) throws JAXRException { TModel tm = objectFactory.createTModel(); if (concept == null) return null; try {/*from w ww . j av a 2 s . c o m*/ Key key = concept.getKey(); if (key != null && key.getId() != null) tm.setTModelKey(key.getId()); Slot sl1 = concept.getSlot("authorizedName"); if (sl1 != null && sl1.getName() != null) tm.setAuthorizedName(sl1.getName()); Slot sl2 = concept.getSlot("operator"); if (sl2 != null && sl2.getName() != null) tm.setOperator(sl2.getName()); InternationalString iname = concept.getName(); tm.setName(getFirstName(iname)); InternationalString idesc = concept.getDescription(); addDescriptions(tm.getDescription(), idesc); // External Links Collection<ExternalLink> externalLinks = concept.getExternalLinks(); if (externalLinks != null && externalLinks.size() > 0) { tm.setOverviewDoc(getOverviewDocFromExternalLink((ExternalLink) externalLinks.iterator().next())); } IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(concept.getExternalIdentifiers()); if (idBag != null) { tm.setIdentifierBag(idBag); } CategoryBag catBag = getCategoryBagFromClassifications(concept.getClassifications()); if (catBag != null) { tm.setCategoryBag(catBag); } } catch (Exception ud) { throw new JAXRException("Apache JAXR Impl:", ud); } return tm; }
From source file:org.apache.ws.scout.util.ScoutJaxrUddiV3Helper.java
public static TModel getTModelFromJAXRConcept(Concept concept) throws JAXRException { TModel tm = objectFactory.createTModel(); if (concept == null) return null; try {/*from w w w .j a v a 2s . co m*/ Key key = concept.getKey(); if (key != null && key.getId() != null) tm.setTModelKey(key.getId()); Slot sl1 = concept.getSlot("authorizedName"); /* if (sl1 != null && sl1.getName() != null) tm.setAuthorizedName(sl1.getName()); Slot sl2 = concept.getSlot("operator"); if (sl2 != null && sl2.getName() != null) tm.setOperator(sl2.getName()); */ InternationalString iname = concept.getName(); tm.setName(getFirstName(iname)); InternationalString idesc = concept.getDescription(); addDescriptions(tm.getDescription(), idesc); // External Links Collection<ExternalLink> externalLinks = concept.getExternalLinks(); if (externalLinks != null && externalLinks.size() > 0) { tm.getOverviewDoc() .add(getOverviewDocFromExternalLink((ExternalLink) externalLinks.iterator().next())); } IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(concept.getExternalIdentifiers()); if (idBag != null) { tm.setIdentifierBag(idBag); } CategoryBag catBag = getCategoryBagFromClassifications(concept.getClassifications()); if (catBag != null) { tm.setCategoryBag(catBag); } } catch (Exception ud) { throw new JAXRException("Apache JAXR Impl:", ud); } return tm; }