List of usage examples for javax.xml.registry.infomodel Service getProvidingOrganization
Organization getProvidingOrganization() throws JAXRException;
From source file:it.cnr.icar.eric.client.ui.swing.graph.JBGraph.java
/** * DOCUMENT ME!/* ww w .ja v a 2s. c om*/ * * @param cell DOCUMENT ME! * @param service DOCUMENT ME! * * @return DOCUMENT ME! */ private ArrayList<DefaultGraphCell> showRelatedObjects(JBGraphCell cell, Service service) { ArrayList<DefaultGraphCell> relatedCells = new ArrayList<DefaultGraphCell>(); if (service == null) { return relatedCells; } try { //bindings Collection<?> bindings = service.getServiceBindings(); DefaultGraphCell groupCell = createGroupFromObjectCollection(bindings); if (groupCell != null) { connectCells(cell, groupCell, "service bindings", false); relatedCells.add(groupCell); } //parent Organization Organization parentOrg = service.getProvidingOrganization(); if (parentOrg != null) { JBGraphCell newCell = addRelatedObject(cell, parentOrg, new Rectangle(0, 0, 50, 50), "parent Organization", false); relatedCells.add(newCell); } } catch (JAXRException e) { RegistryBrowser.displayError(e); } return relatedCells; }
From source file:org.apache.ws.scout.util.ScoutJaxrUddiHelper.java
public static BusinessService getBusinessServiceFromJAXRService(Service service) throws JAXRException { BusinessService bs = objectFactory.createBusinessService(); try {/*from w w w . ja va2s .co m*/ InternationalString iname = service.getName(); addNames(bs.getName(), iname); InternationalString idesc = service.getDescription(); addDescriptions(bs.getDescription(), idesc); Organization o = service.getProvidingOrganization(); /* * there may not always be a key... */ if (o != null) { Key k = o.getKey(); if (k != null && k.getId() != null) { bs.setBusinessKey(k.getId()); } } else { /* * gmj - I *think* this is the right thing to do */ throw new JAXRException("Service has no associated organization"); } if (service.getKey() != null && service.getKey().getId() != null) { bs.setServiceKey(service.getKey().getId()); } else { bs.setServiceKey(""); } CategoryBag catBag = getCategoryBagFromClassifications(service.getClassifications()); if (catBag != null) { bs.setCategoryBag(catBag); } //Add the ServiceBinding information BindingTemplates bt = getBindingTemplates(service.getServiceBindings()); if (bt != null) { bs.setBindingTemplates(bt); } log.debug("BusinessService=" + bs.toString()); } catch (Exception ud) { throw new JAXRException("Apache JAXR Impl:", ud); } return bs; }