Package org.apache.ws.scout.uddi

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


     if (cbag != null) {
        classifications = new ArrayList<Classification>();
      KeyedReference[] keyrarr = cbag.getKeyedReferenceArray();
      for (int i = 0; keyrarr != null && i < keyrarr.length; i++)
      {
        KeyedReference keyr = (KeyedReference)keyrarr[i];
        Classification classification = new ClassificationImpl(lcm);
        classification.setValue(keyr.getKeyValue());
        classification.setName(new InternationalStringImpl(keyr.getKeyName()));
        
        String tmodelKey = keyr.getTModelKey();
        if (tmodelKey != null) {
          ClassificationScheme scheme = new ClassificationSchemeImpl(lcm);
          scheme.setKey(new KeyImpl(tmodelKey));
          classification.setClassificationScheme(scheme);
        }
View Full Code Here


      if (ibag != null) {
        extidentifiers = new ArrayList<ExternalIdentifier>();
          KeyedReference[] keyrarr = ibag.getKeyedReferenceArray();
          for (int i = 0; keyrarr != null && i < keyrarr.length; i++)
          {
             KeyedReference keyr = (KeyedReference)keyrarr[i];
             ExternalIdentifier extId = new ExternalIdentifierImpl(lcm);
             extId.setValue(keyr.getKeyValue());
             extId.setName(new InternationalStringImpl(keyr.getKeyName()));
            
             String tmodelKey = keyr.getTModelKey();
             if (tmodelKey != null) {
               ClassificationScheme scheme = new ClassificationSchemeImpl(lcm);
               scheme.setKey(new KeyImpl(tmodelKey));
               extId.setIdentificationScheme(scheme);
             }
View Full Code Here

                orgcol.add(new KeyImpl(sourceKey));
                orgcol.add(new KeyImpl(targetKey));
                BulkResponse bl = getRegistryObjects(orgcol, LifeCycleManager.ORGANIZATION);
                Association asso = ScoutUddiJaxrHelper.getAssociation(bl.getCollection(),
                                             registryService.getBusinessLifeCycleManager());
                KeyedReference keyr = pas.getKeyedReference();
                Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
                c.setName(new InternationalStringImpl(keyr.getKeyName()));
                c.setKey( new KeyImpl(keyr.getTModelKey()) );
                c.setValue(keyr.getKeyValue());
                asso.setAssociationType(c);
                col.add(asso);
            }
            return new BulkResponseImpl(col);
        } catch (RegistryException e)
View Full Code Here

                if(confirm != Constants.COMPLETION_STATUS_COMPLETE)
                     ((AssociationImpl)asso).setConfirmed(false);

                Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
                KeyedReference keyr = asi.getKeyedReference();
                c.setKey(new KeyImpl(keyr.getTModelKey()));
                c.setName(new InternationalStringImpl(keyr.getKeyName()));
                c.setValue(keyr.getKeyValue());
                asso.setKey(new KeyImpl(keyr.getTModelKey())); //TODO:Validate this
                asso.setAssociationType(c);
                col.add(asso);
            }

View Full Code Here

        assc.getTargetObject().getKey().getId() != null) {
            pa.setToKey(assc.getTargetObject().getKey().getId());
      }
            Concept c = assc.getAssociationType();
            String v = c.getValue();
      KeyedReference kr = KeyedReference.Factory.newInstance();
            Key key = c.getKey();
      if (key == null) {
        // TODO:Need to check this. If the concept is a predefined
        // enumeration, the key can be the parent classification scheme
                key = c.getClassificationScheme().getKey();
            }
      if (key == null || key.getId() == null) {
        // The parent classification scheme may not always contain the
        // key. It is okay if it doesn't, since the UDDI v2 spec allows
        // TModelKey to be absent.

        // TODO: This setting to "" should not be needed at all.
        // However, a bug in jUDDI needs it to be there. See:
        // http://issues.apache.org/jira/browse/JUDDI-78
        //kr.setTModelKey("");
      } else {
                kr.setTModelKey(key.getId());
      }
            kr.setKeyName("Concept");

      if (v != null) {
            kr.setKeyValue(v);
      }

            pa.setKeyedReference(kr);
    } catch (Exception ud) {
            throw new JAXRException("Apache JAXR Impl:", ud);
View Full Code Here

    try {
      StringTokenizer token = new StringTokenizer(key, ":");
      if (token.hasMoreTokens()) {
               pa.setFromKey(getToken(token.nextToken()));
               pa.setToKey(getToken(token.nextToken()));
        KeyedReference kr = KeyedReference.Factory.newInstance();
        // Sometimes the Key is UUID:something
               String str = getToken(token.nextToken());
        if ("UUID".equals(str))
          str += ":" + getToken(token.nextToken());
               kr.setTModelKey(str);
               kr.setKeyName(getToken(token.nextToken()));
               kr.setKeyValue(getToken(token.nextToken()));
               pa.setKeyedReference(kr);
            }

    } catch (Exception ud) {
            throw new JAXRException("Apache JAXR Impl:", ud);
View Full Code Here

      CategoryBag cbag = (CategoryBag)(XmlObject.Factory.newInstance()).changeType(CategoryBag.type);
      Iterator classiter = classifications.iterator();
      while (classiter.hasNext()) {
        Classification classification = (Classification) classiter.next();
        if (classification != null ) {
          KeyedReference keyr = cbag.addNewKeyedReference();
 
          InternationalStringImpl iname = null;
          String value = null;
          ClassificationScheme scheme = classification.getClassificationScheme();
                    if (scheme==null || (classification.isExternal() && classification.getConcept()==null)) {
                        /*
                        * JAXR 1.0 Specification: Section D6.4.4
                        * Specification related tModels mapped from Concept may be automatically
                        * categorized by the well-known uddi-org:types taxonomy in UDDI (with
                        * tModelKey uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4) as follows:
                        * The keyed reference is assigned a taxonomy value of specification.
                        */
                        keyr.setTModelKey(UDDI_ORG_TYPES);
                        keyr.setKeyValue("specification");
                    } else {
              if (classification.isExternal()) {
                            iname = (InternationalStringImpl) ((RegistryObject) classification).getName();
                            value = classification.getValue();
              } else {
                Concept concept = classification.getConcept();
                if (concept != null) {
                  iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
                  value = concept.getValue();
                  scheme = concept.getClassificationScheme();
                }
              }
     
              String name = iname.getValue();
              if (name != null)
                keyr.setKeyName(name);
     
              if (value != null)
                keyr.setKeyValue(value);
             
              if (scheme != null) {
                Key key = scheme.getKey();
                if (key != null && key.getId() != null)
                  keyr.setTModelKey(key.getId());
              }
            }
                }
      }
      return cbag;
View Full Code Here

      IdentifierBag ibag = (IdentifierBag)(XmlObject.Factory.newInstance()).changeType(IdentifierBag.type);
      Iterator iditer = identifiers.iterator();
      while (iditer.hasNext()) {
        ExternalIdentifier extid = (ExternalIdentifier) iditer.next();
        if (extid != null ) {
          KeyedReference keyr = ibag.addNewKeyedReference();
 
          InternationalStringImpl iname = (InternationalStringImpl) ((RegistryObject) extid).getName();
          String value = extid.getValue();
          ClassificationScheme scheme = extid.getIdentificationScheme();
 
          String name = iname.getValue();
          if (name != null)
            keyr.setKeyName(name);
 
          if (value != null)
            keyr.setKeyValue(value);
         
          if (scheme != null) {
            Key key = scheme.getKey();
            if (key != null && key.getId() != null)
              keyr.setTModelKey(key.getId());
          }
        }
      }
      return ibag;
      } catch (Exception ud) {
View Full Code Here

                if(bd != null)
                {
                  PublisherAssertion[] keyarr = bd.getPublisherAssertionArray();
                  for (int i = 0; keyarr != null && i < keyarr.length; i++) {
                    PublisherAssertion result = (PublisherAssertion) keyarr[i];
                        KeyedReference keyr = result.getKeyedReference();
                        Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
                        c.setName(new InternationalStringImpl(keyr.getKeyName()));
                        c.setKey( new KeyImpl(keyr.getTModelKey()) );
                        c.setValue(keyr.getKeyValue());
                        association.setAssociationType(c);
                        coll.add(association.getKey());
                   }
                }
        }
View Full Code Here

       
        if (targetKey != null) {
        pa.setToKey(targetKey);
        }
       
        KeyedReference keyr = asi.getKeyedReference();
       
        if (keyr != null) {
        pa.setKeyedReference(keyr);
        }
        //pa.setTModelKey(keyr.getTModelKey());
View Full Code Here

TOP

Related Classes of org.apache.ws.scout.uddi.KeyedReference

Copyright © 2018 www.massapicom. 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.