List of usage examples for javax.xml.registry.infomodel Concept getSlot
Slot getSlot(String slotName) throws JAXRException;
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 w w . j a va2 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 www .j ava2 s . c om 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; }