Package org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.LastResponseTimeDocument


            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

        //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);
        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();
        System.out.println("Getting the Resource ID for the EPR: " + childEpr.getAddress().getStringValue());
        String resourceId = InteropRequestUtils.getResourceId(childEpr);
        if(resourceId == null)
        {
            resourceId = "UNKNOWN";
        }
        childRelationshipParticipantType.setResourceId(resourceId);
        childRelationshipParticipantType.setRole(InteropConstants.CHILD_RELATION);//uri
        childRelationshipParticipantType.setManageabilityEndpointReferenceArray(new EndpointReferenceType[]{childEpr});

        resourceProperty.add(relationshipDocument);
    }
View Full Code Here

            RelationshipType relationship = (RelationshipType)relationshipPropElem;
            assertTrue( "muws-p2-xs:Relationship element is not valid", relationship.validate() );
            RelationshipParticipantType[] participantArray = relationship.getParticipantArray();
            for (int j = 0; j < participantArray.length; j++)
            {
                RelationshipParticipantType relationshipParticipantType = participantArray[j];
                EndpointReferenceType[] manageabilityEndpointReferenceArray = relationshipParticipantType.getManageabilityEndpointReferenceArray();
                for (int k = 0; k < manageabilityEndpointReferenceArray.length; k++)
                {
                    EndpointReferenceType endpointReferenceType = manageabilityEndpointReferenceArray[k];
                    ResourceStub resource = new ResourceStub(new XmlBeansEndpointReference(endpointReferenceType));
                    XmlObject[] resourceProperty = resource.getResourceProperty(WeatherstationPropertyQNames.FCCID);
View Full Code Here

                e.printStackTrace();
            }

            QName qName = QName.valueOf("{" + WeatherstationPropertyQNames.FCCID.getNamespaceURI() + "}ResourceID");
            //add a participant
            RelationshipParticipantType relationshipParticipantType = relationshipType.addNewParticipant();
            relationshipParticipantType.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY1);
            relationshipParticipantType.setRole("urn://parent");//uri
            EndpointReferenceType manageabilityEndpointReferenceType = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType = manageabilityEndpointReferenceType.addNewReferenceProperties();
            XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType, qName);
            XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);

            RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
            relationshipParticipantType2.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY2);//spec optional
            relationshipParticipantType2.setRole("urn://child1");//uri
            EndpointReferenceType manageabilityEndpointReferenceType2 = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType2.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType2 = manageabilityEndpointReferenceType2.addNewReferenceProperties();
            XmlObject key2 = XmlBeanUtils.addChildElement(referencePropertiesType2, qName);
            XmlBeanUtils.setValue(key2, InteropConstants.WEATHERSTATION_KEY2);
View Full Code Here

            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);
            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});
View Full Code Here

        //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();
        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);
View Full Code Here

     */
    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);
        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();
        System.out.println("Getting the Resource ID for the EPR: " + childEpr.getAddress().getStringValue());
        String resourceId = InteropRequestUtils.getResourceId(childEpr);
        if(resourceId == null)
        {
            resourceId = "UNKNOWN";
View Full Code Here

        assertTrue( "muws-p2-xs:Relationship property does not contain any elements", relationshipPropElems.length >= 1 );
        for ( int i = 0; i < relationshipPropElems.length; i++ )
        {
            XmlObject relationshipPropElem = relationshipPropElems[i];
            assertTrue( relationshipPropElem instanceof RelationshipType );
            RelationshipType relationship = (RelationshipType)relationshipPropElem;
            assertTrue( "muws-p2-xs:Relationship element is not valid", relationship.validate() );
            RelationshipParticipantType[] participantArray = relationship.getParticipantArray();
            for (int j = 0; j < participantArray.length; j++)
            {
                RelationshipParticipantType relationshipParticipantType = participantArray[j];
                EndpointReferenceType[] manageabilityEndpointReferenceArray = relationshipParticipantType.getManageabilityEndpointReferenceArray();
                for (int k = 0; k < manageabilityEndpointReferenceArray.length; k++)
View Full Code Here

            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)
            {
                e.printStackTrace();
            }

            QName qName = QName.valueOf("{" + WeatherstationPropertyQNames.FCCID.getNamespaceURI() + "}ResourceID");
            //add a participant
            RelationshipParticipantType relationshipParticipantType = relationshipType.addNewParticipant();
            relationshipParticipantType.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY1);
            relationshipParticipantType.setRole("urn://parent");//uri
            EndpointReferenceType manageabilityEndpointReferenceType = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType = manageabilityEndpointReferenceType.addNewReferenceProperties();
            XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType, qName);
            XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);

            RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
            relationshipParticipantType2.setResourceId("urn:" + InteropConstants.WEATHERSTATION_KEY2);//spec optional
            relationshipParticipantType2.setRole("urn://child1");//uri
            EndpointReferenceType manageabilityEndpointReferenceType2 = relationshipParticipantType.addNewManageabilityEndpointReference();
            manageabilityEndpointReferenceType2.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
            ReferencePropertiesType referencePropertiesType2 = manageabilityEndpointReferenceType2.addNewReferenceProperties();
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.LastResponseTimeDocument

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.