Package org.jruby.util.collections

Examples of org.jruby.util.collections.WeakValuedIdentityMap$KeyedReference


        association.getTargetObject().getKey().getId() != null) {
            pa.setToKey(association.getTargetObject().getKey().getId());
      }
            Concept c = association.getAssociationType();
            String v = c.getValue();
      KeyedReference kr = objectFactory.createKeyedReference();
            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) {
        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 = objectFactory.createKeyedReference();
        // 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 = objectFactory.createCategoryBag();
      Iterator classiter = classifications.iterator();
      while (classiter.hasNext()) {
        Classification classification = (Classification) classiter.next();
        if (classification != null ) {
          KeyedReference keyr = objectFactory.createKeyedReference();
          cbag.getKeyedReference().add(keyr);
 
          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 = objectFactory.createIdentifierBag();
      Iterator iditer = identifiers.iterator();
      while (iditer.hasNext()) {
        ExternalIdentifier extid = (ExternalIdentifier) iditer.next();
        if (extid != null ) {
          KeyedReference keyr = objectFactory.createKeyedReference();
          ibag.getKeyedReference().add(keyr);
 
          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

            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);
        }

            }
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

                  PublisherAssertion[] keyarr = new PublisherAssertion[publisherAssertionList.size()];
                  publisherAssertionList.toArray(keyarr);
                 
                  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

                List<KeyedReference> r = new ArrayList<KeyedReference>();
                if (keyedReference == null) {
                        return r;
                }
                for (int i = 0; i < keyedReference.size(); i++) {
                        r.add(new KeyedReference(keyedReference.get(i).getTModelKey(), keyedReference.get(i).getKeyName(), keyedReference.get(i).getKeyValue()));
                }
                return r;
        }
View Full Code Here

                FindRelatedBusinesses r = new FindRelatedBusinesses();
                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
                r.setMaxRows(body.getMaxRows());
                r.setBusinessKey(body.getBusinessKey());
                if (body.getKeyedReference() != null) {
                        r.setKeyedReference(new KeyedReference(body.getKeyedReference().getTModelKey(),
                             body.getKeyedReference().getKeyName(),
                             body.getKeyedReference().getKeyValue()));
                }
               
                r.setGeneric(VERSION);
View Full Code Here

TOP

Related Classes of org.jruby.util.collections.WeakValuedIdentityMap$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.