Package org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1

Examples of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityEndpointReferenceDocument$Factory


         getResourcePropertySet(  );
      org.apache.ws.resource.properties.ResourceProperty    resourceProperty = null;
      resourceProperty = resourcePropertySet.get( ApplicationPropertyQNames.RELATIONSHIP );
      org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument prop_relationship =
         org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument.Factory.newInstance(  );
      RelationshipType                                                          relationshipType =
         prop_relationship.addNewRelationship(  );
      relationshipType.setType( requestDoc.getSetRelationship(  ).getType(  ) );

      RelationshipParticipantType[] partTo              =
         requestDoc.getSetRelationship(  ).getRelationshipTo(  ).getParticipantArray(  );
      int                           numOfToParticipants = partTo.length;
      if ( numOfToParticipants > 0 )
      {
         //There is the from participant - will be in the first position in the array,
         // there needs to be at least one participant to, can be more.
         RelationshipParticipantType[] participants = new RelationshipParticipantType[numOfToParticipants + 1];
         participants[0] = requestDoc.getSetRelationship(  ).getRelationshipFrom(  ).getParticipant(  );
         for ( int i = 0; i < numOfToParticipants; i++ )
         {
            participants[i + 1] = partTo[i];
         }

         relationshipType.setParticipantArray( participants );
         resourceProperty.add( prop_relationship );
         if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "SetRelationship -   " + prop_relationship );
         }
View Full Code Here


    */
   public void removeRelationship( org.apache.ws.muse.example.resourceadmin.properties.RemoveRelationshipDocument requestDoc )
   throws Exception
   {
      // get participants of relationship to be removed
      RelationshipType relationshipRemove = requestDoc.getRemoveRelationship(  ).getRelationship(  );

      // get the relationship property from properties set
      // then walk all relationships and compare them with the relationship which needs to be removed.
      // when the match exist the relationship will be removed from the relationship properties list
      // this will genarate realtionshipremoved notification
      org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet(  );
      org.apache.ws.resource.properties.ResourceProperty    resourceProperty = null;
      resourceProperty = resourcePropertySet.get( ApplicationPropertyQNames.RELATIONSHIP );

      if ( resourceProperty.isEmpty(  ) )
      {
         return;
      }

      for ( int i = 0; i < resourceProperty.size(  ); i++ )
      {
         Object relationObj = resourceProperty.get( i );
         if ( relationObj instanceof RelationshipType )
         {
            RelationshipType relationship = (RelationshipType) relationObj;
            if ( ExampleUtils.CompareRelationships( relationshipRemove, relationship ) )
            {
               resourceProperty.remove( relationObj );

               //continue to walk - you can have more then one this same relationship
View Full Code Here

    public static RelationshipType createRelationshipType(RelationshipType relationshipType)
    {
        try
        {
            //define the relationship type
            RelationshipTypeType relationshipTypeType = relationshipType.addNewType();
            XmlObject relationType = XmlObject.Factory.parse("<" + InteropConstants.RELATIONSHIP_RELATION.getPrefix() + ":" + InteropConstants.RELATIONSHIP_RELATION.getLocalPart() + " xmlns:" + InteropConstants.RELATIONSHIP_RELATION.getPrefix() + "=" + "\"" + InteropConstants.RELATIONSHIP_RELATION.getNamespaceURI() + "\" />");
            XmlBeanUtils.addChildElement(relationshipTypeType, relationType);
        }
        catch (XmlException e)
        {
View Full Code Here

            //add new type
            RelationshipType relationshipType = null;
            try
            {
                relationshipType = relationshipDocument.addNewRelationship();
                RelationshipTypeType relationshipTypeType = relationshipType.addNewType();
                XmlObject relationType = XmlObject.Factory.parse("<" + RELATIONSHIP_RELATION.getPrefix() + ":" + RELATIONSHIP_RELATION.getLocalPart() + " xmlns:" + RELATIONSHIP_RELATION.getPrefix() + "=" + "\"" + RELATIONSHIP_RELATION.getNamespaceURI() + "\" />");
                XmlBeanUtils.addChildElement(relationshipTypeType, relationType);
            }
            catch (XmlException e)
            {
View Full Code Here

    */
   public static boolean CompareRelationships( RelationshipType relationshipRemove,
                                               RelationshipType relationshipFromProp )
   {
      // get type of relationship to be removed
      RelationshipTypeType typeRemove = relationshipRemove.getType(  );
      RelationshipTypeType type = relationshipFromProp.getType(  );

      if ( !compareType( typeRemove, type ) )
      {
         return false;
      }
View Full Code Here

        return m_substitutableMsg;
    }

    public XmlObject getXmlObject()
    {
        SituationDocument situationDoc = SituationDocument.Factory.newInstance();

        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SituationType situationType = situationDoc.addNewSituation();
        org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.SituationCategoryType situationCategoryType = situationType.addNewSituationCategory();
        XmlBeanUtils.addChildElement( situationCategoryType, ( (XmlObjectWrapper) m_situationCategory ).getXmlObject() );

        if ( m_message != null )
        {
View Full Code Here

            currentOperationalStateDocument.addNewCurrentOperationalState();
            resourceProperty.add(currentOperationalStateDocument);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTOPERATIONALSTATETRANSITION);
            LastOperationalStateTransitionDocument lastOperationalStateTransitionDocument = LastOperationalStateTransitionDocument.Factory.newInstance();
            StateTransitionType stateTransitionType = lastOperationalStateTransitionDocument.addNewLastOperationalStateTransition();
            stateTransitionType.addNewEnteredState();
            stateTransitionType.addNewPreviousState();
            stateTransitionType.setTime(Calendar.getInstance());
            stateTransitionType.setTransitionIdentifier("");
            resourceProperty.add(lastOperationalStateTransitionDocument);

            /*----------------- MOWS EndpointIdentification props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.ENDPOINTREFERENCE);
            EndpointReferenceDocument endpointReferenceDocument = EndpointReferenceDocument.Factory.newInstance();
View Full Code Here

        return (String[]) m_values.toArray(new String[0]);
    }

    public XmlObject getXmlObject()
    {       
        SubstitutableMsgType substitutableMsgType = SubstitutableMsgType.Factory.newInstance();
        substitutableMsgType.setMsgId(m_messageId);
        substitutableMsgType.setMsgIdType(m_msgType);
        for (int i = 0; i < m_values.size(); i++)
        {
            String s = (String) m_values.get(i);
            org.apache.xmlbeans.XmlAnySimpleType xmlAnySimpleType = substitutableMsgType.addNewValue();
            xmlAnySimpleType.setStringValue(s);
        }
        return substitutableMsgType;
    }
View Full Code Here

      XmlObject[] relationArry = m_resource.getResourceProperty(RELATIONSHIP_QNAME);
      model = new Vector();
      IWc wc=new WcImpl(0,"Wc",null);
      model.add(wc);

      RelationshipTypeImpl relationshipSample = (RelationshipTypeImpl) relationArry[0];
     
      for (int i = 0; i < relationArry.length; i++) {
        RelationshipTypeImpl relationship = (RelationshipTypeImpl) relationArry[i];
        IWs ws1=new WsImpl(relationship,notificationListenerUrl,messagesJPanel1);
        model.add(ws1);
      }
     
      // Capture the name of the defaultActive WS
View Full Code Here

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CORRELATABLEPROPERTIES);
            CorrelatablePropertiesDocument correlatablePropertiesDocument = CorrelatablePropertiesDocument.Factory.newInstance();
            CorrelatablePropertiesType correlatablePropertiesType = correlatablePropertiesDocument.addNewCorrelatableProperties();
            correlatablePropertiesType.setDialect(MuwsConstants.PBM_DIALECT);
            correlatablePropertiesType.setNegativeAssertionPossible(false);
            MatchDocument matchDocument = MatchDocument.Factory.newInstance();
            matchDocument.setMatch(WeatherstationPropertyQNames.FCCID);
            XmlBeanUtils.addChildElement(correlatablePropertiesType, matchDocument);
            resourceProperty.add(correlatablePropertiesDocument);
            resourceProperty.addChangeListener(correlatablePropertiesCapability);//add for management events

            /*----------------- MUWS Relationships props -----------------*/
 
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityEndpointReferenceDocument$Factory

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.