Package org.uddi.api_v2

Examples of org.uddi.api_v2.PublisherAssertion


    /**
     * Create an instance of {@link PublisherAssertion }
     *
     */
    public PublisherAssertion createPublisherAssertion() {
        return new PublisherAssertion();
    }
View Full Code Here


        return bt;
    }

  public static PublisherAssertion getPubAssertionFromJAXRAssociation(
      Association association) throws JAXRException {
    PublisherAssertion pa = objectFactory.createPublisherAssertion();
    try {
      if (association.getSourceObject().getKey() != null &&
        association.getSourceObject().getKey().getId() != null) {
            pa.setFromKey(association.getSourceObject().getKey().getId());
      }
     
      if (association.getTargetObject().getKey() != null &&
        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);
        }
        return pa;
    }
View Full Code Here

        return pa;
    }

  public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
      String key) throws JAXRException {
    PublisherAssertion pa = objectFactory.createPublisherAssertion();
    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

        int currLoc = 0;
        while (iter.hasNext()) {
           
                Association association = (Association) iter.next();
                association.getSourceObject();
                PublisherAssertion pa = ScoutJaxrUddiHelper.getPubAssertionFromJAXRAssociation(association);
                sarr[currLoc] = pa;
                currLoc++;
           
                // Save PublisherAssertion
                PublisherAssertions bd = null;
                try {
                    bd = (PublisherAssertions) executeOperation(sarr, "SAVE_ASSOCIATION");
                }
                catch (RegistryException e) {
                    exceptions.add(new SaveException(e));
                    bulk.setExceptions(exceptions);
                    bulk.setStatus(JAXRResponse.STATUS_FAILURE);
                    return bulk;
                }
                if(bd != null)
                {
                  List<PublisherAssertion> publisherAssertionList = bd.getPublisherAssertion();
                  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);
View Full Code Here

        return token;
    }

    private PublisherAssertion getPublisherAssertion(AssertionStatusItem asi)
    {
      PublisherAssertion pa = this.objectFactory.createPublisherAssertion();
       
      if(asi != null)
      {
            String sourceKey = asi.getFromKey();
            String targetKey = asi.getToKey();
       
            if (sourceKey != null) {
            pa.setFromKey(sourceKey);
            }
           
            if (targetKey != null) {
            pa.setToKey(targetKey);
            }
           
            KeyedReference keyr = asi.getKeyedReference();
           
            if (keyr != null) {
            pa.setKeyedReference(keyr);
            }
            //pa.setTModelKey(keyr.getTModelKey());
            //pa.setKeyName(keyr.getKeyName());
            //pa.setKeyValue(keyr.getKeyValue()); // -CBC- These are redundant?
       
View Full Code Here

        return bt;
    }

  public static PublisherAssertion getPubAssertionFromJAXRAssociation(
      Association association) throws JAXRException {
    PublisherAssertion pa = objectFactory.createPublisherAssertion();
    try {
      if (association.getSourceObject().getKey() != null &&
        association.getSourceObject().getKey().getId() != null) {
            pa.setFromKey(association.getSourceObject().getKey().getId());
      }
     
      if (association.getTargetObject().getKey() != null &&
        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);
        }
        return pa;
    }
View Full Code Here

        return pa;
    }

  public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
      String key) throws JAXRException {
    PublisherAssertion pa = objectFactory.createPublisherAssertion();
    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

        int currLoc = 0;
        while (iter.hasNext()) {
           
                Association association = (Association) iter.next();
                association.getSourceObject();
                PublisherAssertion pa = ScoutJaxrUddiHelper.getPubAssertionFromJAXRAssociation(association);
                sarr[currLoc] = pa;
                currLoc++;
           
                // Save PublisherAssertion
                PublisherAssertions bd = null;
                try {
                    bd = (PublisherAssertions) executeOperation(sarr, "SAVE_ASSOCIATION");
                }
                catch (RegistryException e) {
                    exceptions.add(new SaveException(e));
                    bulk.setExceptions(exceptions);
                    bulk.setStatus(JAXRResponse.STATUS_FAILURE);
                    return bulk;
                }
                if(bd != null)
                {
                  List<PublisherAssertion> publisherAssertionList = bd.getPublisherAssertion();
                  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);
View Full Code Here

        return token;
    }

    private PublisherAssertion getPublisherAssertion(AssertionStatusItem asi)
    {
      PublisherAssertion pa = this.objectFactory.createPublisherAssertion();
       
      if(asi != null)
      {
            String sourceKey = asi.getFromKey();
            String targetKey = asi.getToKey();
       
            if (sourceKey != null) {
            pa.setFromKey(sourceKey);
            }
           
            if (targetKey != null) {
            pa.setToKey(targetKey);
            }
           
            KeyedReference keyr = asi.getKeyedReference();
           
            if (keyr != null) {
            pa.setKeyedReference(keyr);
            }
            //pa.setTModelKey(keyr.getTModelKey());
            //pa.setKeyName(keyr.getKeyName());
            //pa.setKeyValue(keyr.getKeyValue()); // -CBC- These are redundant?
       
View Full Code Here

       
        private static AccessPoint MapAccessPoint(org.uddi.api_v3.AccessPoint accessPoint) {
                if (accessPoint == null) {
                        return null;
                }
                return new AccessPoint(accessPoint.getValue(), MapURLType(accessPoint.getValue()));
        }
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.PublisherAssertion

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.