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

Examples of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument


    public ResourceProperty refreshProperty(ResourceProperty propthrows CallbackFailedException
    {
        if ( prop.isEmpty() )
        {
            OperationalStatusDocument statusDoc = OperationalStatusDocument.Factory.newInstance();
            statusDoc.setOperationalStatus( getBackendStatus() );
            prop.add( statusDoc );
        }
        else
        {
            OperationalStatusDocument.OperationalStatus status = (OperationalStatusDocument.OperationalStatus) prop.get( 0 );
View Full Code Here


            EndpointReferenceType weatherStationEpr = (EndpointReferenceType) propElems[0];
            ResourcePropertySet resourcePropertySet = ((PropertiesResource) this).getResourcePropertySet();
            ResourceProperty resourceProperty = resourcePropertySet.get(WeatherClientConfigPropertyQNames.RELATIONSHIP);

            //define a relationship
            RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
            RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());

            //add self as a participant
            RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
            XmlBeansEndpointReference xmlEpr = (XmlBeansEndpointReference) this.getEndpointReference();
            EndpointReferenceType configEndpointReferenceType = (EndpointReferenceType) xmlEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
View Full Code Here

        //iterate the relationships
        Iterator iterator = resourceProperty.iterator();
        List removeList = new ArrayList();
        while (iterator.hasNext())
        {
            RelationshipDocument relationshipDocument = (RelationshipDocument) iterator.next();
            RelationshipParticipantType[] participantArray = relationshipDocument.getRelationship().getParticipantArray();

            for (int i = 0; i < participantArray.length; i++)
            {
                RelationshipParticipantType relationshipParticipantType = participantArray[i];
                if (resourceId != null && resourceId.equals(relationshipParticipantType.getResourceId()))
View Full Code Here

        //get the request epr
        org.wsdmdemo.service.weatherStationDir.AddWeatherStationDocument.AddWeatherStation addWeatherStation = requestDoc.getAddWeatherStation();
        org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType addedEpr = addWeatherStation.getEndpointReference();

        //define a relationship
        RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();


        //define the relationship type
        RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());


        //add self as a participant
        RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
        WeatherStationDirResource resource = (WeatherStationDirResource) getResource();
View Full Code Here

     * @param childEpr
     */
    private void addRelation(ResourceProperty resourceProperty, EndpointReferenceType childEpr)
    {
        //define a relationship
        RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
        RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());

        //add self as a participant
        RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
        XmlBeansEndpointReference dirEpr = (XmlBeansEndpointReference) getEndpointReference();
        EndpointReferenceType dirEndpointReferenceType = (EndpointReferenceType) dirEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
View Full Code Here

            /*----------------- MUWS Relationships props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.RELATIONSHIP);
            resourceProperty.addChangeListener(relationshipCapability);//add for management events

            RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();

            //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 WsImpl(RelationshipTypeImpl relationship,String listenerURL,Observer observer){
    this.listenerURL=listenerURL;
    //this.topicQName=topicQName;
    this.observer=observer;
    RelationshipParticipantType participant = relationship.getParticipantArray(1);
    EndpointReferenceType eprt = participant.getManageabilityEndpointReferenceArray(0);
    AttributedURI eprtAddr = eprt.getAddress();
    String addr = eprtAddr.getStringValue();
    addr=addr.replaceAll("192\\.168\\.0\\.20","12\\.35\\.246\\.160");
    eprtAddr.setStringValue(addr);
    wsEpr=(EndpointReference)new XmlBeansEndpointReference(eprt);
View Full Code Here

            //define a relationship
            RelationshipDocument relationshipDocument = RelationshipDocument.Factory.newInstance();
            RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());

            //add self as a participant
            RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
            XmlBeansEndpointReference xmlEpr = (XmlBeansEndpointReference) this.getEndpointReference();
            EndpointReferenceType configEndpointReferenceType = (EndpointReferenceType) xmlEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
            parentRelationshipParticipantType.setResourceId("urn:" + getID());
            parentRelationshipParticipantType.setRole(InteropConstants.PARENT_RELATION);//uri
            parentRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{configEndpointReferenceType});


            //add the new ws as the other participant
            RelationshipParticipantType childRelationshipParticipantType = relationshipType.addNewParticipant();
            childRelationshipParticipantType.setResourceId(InteropRequestUtils.getResourceId(weatherStationEpr));
            childRelationshipParticipantType.setResourceId(InteropConstants.WS1_KEY);
            childRelationshipParticipantType.setRole(InteropConstants.CHILD_RELATION);//uri
            childRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{weatherStationEpr});

            resourceProperty.clear();           
            resourceProperty.add(relationshipDocument);

        }
View Full Code Here

            RelationshipDocument relationshipDocument = (RelationshipDocument) iterator.next();
            RelationshipParticipantType[] participantArray = relationshipDocument.getRelationship().getParticipantArray();

            for (int i = 0; i < participantArray.length; i++)
            {
                RelationshipParticipantType relationshipParticipantType = participantArray[i];
                if (resourceId != null && resourceId.equals(relationshipParticipantType.getResourceId()))
                {
                    removeList.add(relationshipDocument); //add to list to be removed
                }
            }
        }
View Full Code Here

        //define the relationship type
        RelationshipType relationshipType = InteropRequestUtils.createRelationshipType(relationshipDocument.addNewRelationship());


        //add self as a participant
        RelationshipParticipantType parentRelationshipParticipantType = relationshipType.addNewParticipant();
        WeatherStationDirResource resource = (WeatherStationDirResource) getResource();
        XmlBeansEndpointReference xmlEpr = (XmlBeansEndpointReference) resource.getEndpointReference();
        EndpointReferenceType dirEndpointReferenceType = (EndpointReferenceType) xmlEpr.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
        parentRelationshipParticipantType.setResourceId(InteropConstants.DIR_RESOURCEID);
        parentRelationshipParticipantType.setRole(InteropConstants.PARENT_RELATION);//uri
        parentRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{dirEndpointReferenceType});


        //add the new ws as the other participant
        RelationshipParticipantType childRelationshipParticipantType = relationshipType.addNewParticipant();
        childRelationshipParticipantType.setResourceId(InteropRequestUtils.getResourceId(addedEpr));
        childRelationshipParticipantType.setRole(InteropConstants.CHILD_RELATION);//uri
        childRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{addedEpr});

        resourceProperty.add(relationshipDocument);

        return responseDocument;
    }
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument

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.