Examples of PublisherAssertion


Examples of org.apache.juddi.datatype.assertion.PublisherAssertion

    Element child = null;

    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    PublisherAssertion assertion1 = new PublisherAssertion();
    assertion1.setFromKey("6f157513-844e-4a95-a856-d257e6ba0000");
    assertion1.setToKey("6f157513-844e-4a95-a856-d257e6ba1111");

    PublisherAssertion assertion2 = new PublisherAssertion();
    assertion2.setFromKey("6f157513-844e-4a95-a856-d257e6ba2222");
    assertion2.setToKey("6f157513-844e-4a95-a856-d257e6ba3333");

    DeletePublisherAssertions service = new DeletePublisherAssertions();
    service.setAuthInfo(authInfo);
    service.addPublisherAssertion(assertion1);
    service.addPublisherAssertion(assertion2);
View Full Code Here

Examples of org.apache.juddi.datatype.assertion.PublisherAssertion

        "select from PUBLISHER_ASSERTION table:\n\n\t" + selectSQL + "\n");

      resultSet = statement.executeQuery();
      while (resultSet.next())
      {
        PublisherAssertion assertion = new PublisherAssertion();
        assertion.setFromKey(resultSet.getString(1));//("FROM_KEY"));
        assertion.setToKey(resultSet.getString(2));//("TO_KEY"));

        // construct and set the KeyedReference instance
        KeyedReference keyedRef = new KeyedReference();
        keyedRef.setKeyName(resultSet.getString(4));//("KEY_NAME"));
        keyedRef.setKeyValue(resultSet.getString(5));//("KEY_VALUE"));
        keyedRef.setTModelKey(resultSet.getString(3));//("TMODEL_KEY"));
        assertion.setKeyedReference(keyedRef);

        // add the assertionStatusItem
        assertionList.addElement(assertion);
      }
View Full Code Here

Examples of org.apache.juddi.datatype.assertion.PublisherAssertion

  public static PublisherAssertion select(
    PublisherAssertion assertionIn,
    Connection connection)
    throws java.sql.SQLException
  {
    PublisherAssertion assertionOut = null;
    PreparedStatement statement = null;
    ResultSet resultSet = null;

    try
    {
      KeyedReference keyedRefIn = assertionIn.getKeyedReference();

      statement = connection.prepareStatement(selectSQL);
      statement.setString(1, assertionIn.getFromKey());
      statement.setString(2, assertionIn.getToKey());
      statement.setString(3, keyedRefIn.getTModelKey());
      statement.setString(4, keyedRefIn.getKeyName());
      statement.setString(5, keyedRefIn.getKeyValue());

      log.debug(
        "select from PUBLISHER_ASSERTION table:\n\n\t"
          + selectSQL
          + "\n\t FROM_KEY="
          + assertionIn.getFromKey()
          + "\n\t TO_KEY="
          + assertionIn.getToKey()
          + "\n\t TMODEL_KEY="
          + keyedRefIn.getTModelKey()
          + "\n\t KEY_NAME="
          + keyedRefIn.getKeyName()
          + "\n\t KEY_VALUE="
          + keyedRefIn.getKeyValue()
          + "\n");

      resultSet = statement.executeQuery();
      if (resultSet.next())
      {
        KeyedReference keyedRefOut = new KeyedReference();
        keyedRefOut.setKeyName(resultSet.getString(4)); //("KEY_NAME"));
        keyedRefOut.setKeyValue(resultSet.getString(5)); //("KEY_VALUE"));
        keyedRefOut.setTModelKey(resultSet.getString(3)); //("TMODEL_KEY"));

        assertionOut = new PublisherAssertion();
        assertionOut.setFromKey(resultSet.getString(1)); //("FROM_KEY"));
        assertionOut.setToKey(resultSet.getString(2)); //("TO_KEY"));
        assertionOut.setKeyedReference(keyedRefOut);
      }

      return assertionOut;
    }
    catch (java.sql.SQLException sqlex)
View Full Code Here

Examples of org.apache.juddi.datatype.assertion.PublisherAssertion

    Element child = null;

    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    PublisherAssertion assertion = new PublisherAssertion();
    assertion.setFromKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setToKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setKeyName("paKeyName");
    assertion.setKeyValue("paKeyValue");
    assertion.setTModelKey("uuid:3379ec11-a509-4668-9fee-19b134d0d09b");

    SetPublisherAssertions service = new SetPublisherAssertions();
    service.setAuthInfo(authInfo);
    service.addPublisherAssertion(assertion);
    service.addPublisherAssertion(assertion);
View Full Code Here

Examples of org.apache.juddi.datatype.assertion.PublisherAssertion

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    PublisherAssertion obj = new PublisherAssertion();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,"fromKey");
    if (nodeList.size() > 0)
    {
      String fromKey = XMLUtils.getText((Element)nodeList.elementAt(0));
      obj.setFromKey(fromKey);
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,"toKey");
    if (nodeList.size() > 0)
    {
      String toKey = XMLUtils.getText((Element)nodeList.elementAt(0));
      obj.setToKey(toKey);
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,KeyedReferenceHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(KeyedReferenceHandler.TAG_NAME);
      obj.setKeyedReference((KeyedReference)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here

Examples of org.apache.juddi.datatype.assertion.PublisherAssertion

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    PublisherAssertion assertion = (PublisherAssertion)object;
    Element element = parent.getOwnerDocument().createElement(TAG_NAME);
    AbstractHandler handler = null;

    String fromKey = assertion.getFromKey();
    if (fromKey != null)
    {
      Element fkElement = parent.getOwnerDocument().createElement("fromKey");
      fkElement.appendChild(parent.getOwnerDocument().createTextNode(fromKey));
      element.appendChild(fkElement);
    }

    String toKey = assertion.getToKey();
    if (toKey != null)
    {
      Element tkElement = parent.getOwnerDocument().createElement("toKey");
      tkElement.appendChild(parent.getOwnerDocument().createTextNode(toKey));
      element.appendChild(tkElement);
    }

    KeyedReference keyedRef = assertion.getKeyedReference();
    if (keyedRef != null)
    {
      handler = maker.lookup(KeyedReferenceHandler.TAG_NAME);
      handler.marshal(keyedRef,element);
    }
View Full Code Here

Examples of org.apache.ws.scout.model.uddi.v2.PublisherAssertion

        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

Examples of org.apache.ws.scout.model.uddi.v2.PublisherAssertion

        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

Examples of org.apache.ws.scout.model.uddi.v2.PublisherAssertion

        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

Examples of org.apache.ws.scout.model.uddi.v2.PublisherAssertion

        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
TOP
Copyright © 2018 www.massapi.com. 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.