Package org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01

Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.PauseSubscriptionResponseDocument


     * @param subTopic  The current topic being added.
     * @param resourceProp  The ResourceProperty associated with the Topic being added to.
     */
    private static void addConcreteTopics(QName rootTopicQName, Topic subTopic, ResourceProperty resourceProp)
    {
        TopicDocument topicDocument = TopicDocument.Factory.newInstance();
        String topicName = subTopic.getName();
        QName concreteTopicName = new QName(rootTopicQName.getNamespaceURI(), rootTopicQName.getLocalPart() + "/" + topicName);
        TopicExpressionType topicExpressionType = topicDocument.addNewTopic();
        topicExpressionType.setDialect(TopicsConstants.TOPIC_EXPR_DIALECT_CONCRETE);
        XmlBeanUtils.setValueAsQName(topicExpressionType, concreteTopicName);
        resourceProp.add(topicDocument);
        Iterator iterator = subTopic.topicIterator();
        while (iterator.hasNext())
View Full Code Here


      if ( prop.isEmpty(  ) )
      {
         String[] supportedDialects = TopicExpressionEngineImpl.getInstance(  ).getSupportedDialects(  );
         for ( int i = 0; i < supportedDialects.length; i++ )
         {
            TopicExpressionDialectsDocument topicExpressionDialectsDocument =
               TopicExpressionDialectsDocument.Factory.newInstance(  );
            topicExpressionDialectsDocument.setTopicExpressionDialects( supportedDialects[i] );
            prop.add( topicExpressionDialectsDocument );
         }
      }

      return prop;
View Full Code Here

   {
      PropertiesResource              resource                        =
         (PropertiesResource) m_resourceContext.getResourceHome(  ).find( UnitExampleHome.RESOURCE_ID );
      ResourceProperty                resourceProperty                =
         resource.getResourcePropertySet(  ).get( NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS );
      TopicExpressionDialectsDocument topicExpressionDialectsDocument =
         TopicExpressionDialectsDocument.Factory.newInstance(  );
      topicExpressionDialectsDocument.setTopicExpressionDialects( "foo-dialect" );
      resourceProperty.add( topicExpressionDialectsDocument );
   }
View Full Code Here

    private void triggerChangeEvent() throws ResourceContextException, ResourceException
    {
        PropertiesResource resource = (PropertiesResource) m_resourceContext.getResourceHome().find(UnitExampleHome.RESOURCE_KEY);
        ResourceProperty resourceProperty = resource.getResourcePropertySet().get(NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS);
        TopicExpressionDialectsDocument topicExpressionDialectsDocument = TopicExpressionDialectsDocument.Factory.newInstance();
        topicExpressionDialectsDocument.setTopicExpressionDialects("foo-dialect");
        resourceProperty.add(topicExpressionDialectsDocument);
    }
View Full Code Here

        resourceProperty = propSet.get(NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS);
        String[] supportedDialects = TopicExpressionEngineImpl.getInstance().getSupportedDialects();
        //add a TopicExpressionDialectsDocument for each TopicExpressionDialect.
        for (int i = 0; i < supportedDialects.length; i++)
        {
            TopicExpressionDialectsDocument topicExpressionDialectsDocument = TopicExpressionDialectsDocument.Factory.newInstance();
            topicExpressionDialectsDocument.setTopicExpressionDialects(supportedDialects[i]);
            resourceProperty.add(topicExpressionDialectsDocument);
        }
    }
View Full Code Here

      EndpointReferenceType epr1 = EndpointReferenceType.Factory.newInstance(  );
      AttributedURI         uri = AttributedURI.Factory.newInstance(  );
      uri.setStringValue( "http://consumer" );
      epr1.setAddress( uri );
      EndpointReference       epr           = new XmlBeansEndpointReference( epr1 );
      TopicExpressionDocument topicExprType = null;
      try
      {
         topicExprType =
            (TopicExpressionDocument) XmlObject.Factory.parse( "<wsnt:TopicExpression xmlns:wsnt=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\" Dialect=\"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple\">fs:MountPointDirectory</wsnt:TopicExpression>" );
      }
      catch ( XmlException e )
      {
         e.printStackTrace(  );
      }

      //topicExprType.setDialect("http://foobar");
      XmlBeansTopicExpression topicExpr = new XmlBeansTopicExpression( topicExprType.getTopicExpression(  ) );
      SubscriptionResource    sub = new SubscriptionResource( epr, epr, null, "my/producer/home", topicExpr );
      sub.setNotificationProducer( new NotifProducer(  ) );

      /* EndpointReference consumerReference, EndpointReference producerReference,
         Calendar initialTerminationTime, Object policy, QueryExpression precondition,
View Full Code Here

      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME );
      CreationTimeDocument creationTimeDoc = CreationTimeDocument.Factory.newInstance(  );
      creationTimeDoc.setCreationTime( m_creationTime );
      prop.add( creationTimeDoc );
      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION );
      TopicExpressionDocument topicExprDoc = TopicExpressionDocument.Factory.newInstance(  );
      topicExprDoc.setTopicExpression( (TopicExpressionType) ( (XmlBeansTopicExpression) m_topicExpression )
                                       .getXmlObject(  ) );
      prop.add( topicExprDoc );
      prop = m_propSet.get( SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY );
      UseNotifyDocument useNotifyDoc = UseNotifyDocument.Factory.newInstance(  );
      useNotifyDoc.setUseNotify( m_useNotify );
View Full Code Here

        prop = m_propSet.get(SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME);
        CreationTimeDocument creationTimeDoc = CreationTimeDocument.Factory.newInstance();
        creationTimeDoc.setCreationTime(m_creationTime);
        prop.add(creationTimeDoc);
        prop = m_propSet.get(SubscriptionManagerPortType.PROP_QNAME_TOPIC_EXPRESSION);
        TopicExpressionDocument topicExprDoc = TopicExpressionDocument.Factory.newInstance();
        topicExprDoc.setTopicExpression((TopicExpressionType) ((XmlBeansTopicExpression) m_topicExpression).getXmlObject());
        prop.add(topicExprDoc);
        prop = m_propSet.get(SubscriptionManagerPortType.PROP_QNAME_USE_NOTIFY);
        UseNotifyDocument useNotifyDoc = UseNotifyDocument.Factory.newInstance();
        useNotifyDoc.setUseNotify(m_useNotify);
        prop.add(useNotifyDoc);
View Full Code Here

        EndpointReferenceType epr1 = EndpointReferenceType.Factory.newInstance();
        AttributedURI uri = AttributedURI.Factory.newInstance();
        uri.setStringValue("http://consumer");
        epr1.setAddress(uri);
        EndpointReference epr = new XmlBeansEndpointReference(epr1);
        TopicExpressionDocument topicExprType = null;
        try
        {
            topicExprType = (TopicExpressionDocument) XmlObject.Factory.parse("<wsnt:TopicExpression xmlns:wsnt=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\" Dialect=\"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple\">fs:MountPointDirectory</wsnt:TopicExpression>");
        }
        catch (XmlException e)
        {
            e.printStackTrace();
        }
        //topicExprType.setDialect("http://foobar");

        XmlBeansTopicExpression topicExpr = new XmlBeansTopicExpression(topicExprType.getTopicExpression());
        SubscriptionResource sub = new SubscriptionResource(epr,epr,null,"my/producer/home",topicExpr);
        sub.setNotificationProducer(new NotifProducer());

       /* EndpointReference consumerReference, EndpointReference producerReference,
                                    Calendar initialTerminationTime, Object policy, QueryExpression precondition,
View Full Code Here

         throw new IllegalArgumentException( "Unsupported property: " + propName );
      }

      if ( prop.isEmpty(  ) )
      {
         TopicExpressionDocument topicExprDoc = TopicExpressionDocument.Factory.newInstance(  );
         topicExprDoc.addNewTopicExpression(  );
         prop.add( topicExprDoc );
      }

      TopicExpressionType topicExpr        = (TopicExpressionType) prop.get( 0 );
      TopicsTypeWriter    topicsTypeWriter = TopicsTypeWriter.newInstance( TopicsConstants.NSURI_WSTOP_SCHEMA );
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.PauseSubscriptionResponseDocument

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.