Package org.apache.muse.ws.dm.muws

Examples of org.apache.muse.ws.dm.muws.RelationshipType


        throws BaseFault
    {
        String name = XmlUtils.getElementText(xml, MuwsConstants.NAME_QNAME);
       
        Element typeXML = XmlUtils.getElement(xml, MuwsConstants.TYPE_QNAME);
        RelationshipType type = new SimpleRelationshipType(typeXML);
       
        Element[] participantsXML = XmlUtils.getElements(xml, MuwsConstants.PARTICIPANT_QNAME);
        Participant[] participants = new SimpleParticipant[participantsXML.length];
       
        for (int n = 0; n < participantsXML.length; ++n)
View Full Code Here


        throws BaseFault
    {
        String name = XmlUtils.getElementText(xml, MuwsConstants.NAME_QNAME);
       
        Element typeXML = XmlUtils.getElement(xml, MuwsConstants.TYPE_QNAME);
        RelationshipType type = new SimpleRelationshipType(typeXML);
       
        Element[] participantsXML = XmlUtils.getElements(xml, MuwsConstants.PARTICIPANT_QNAME);
        Participant[] participants = new SimpleParticipant[participantsXML.length];
       
        for (int n = 0; n < participantsXML.length; ++n)
View Full Code Here

        if(targetResource == null){
          continue;
        }
        Participant[] participants = new Participant[2];
        QName typeNames[] = {new QName("http://resource.management.osgi/Bundle","Requires","osgi")};
        RelationshipType type = new SimpleRelationshipType(typeNames);
        participants[0] = new SimpleParticipant(resource, "required");
        participants[1] = new SimpleParticipant(targetResource, "requires");
        relCap.addRelationship("Bundle Requirement", type, participants);
      }
    } catch(Throwable t){
View Full Code Here

      if(provider != null){
        WsResource targetResource = (WsResource)resourceForContribution.get(provider);
        if(targetResource != null){
          Participant[] participants = new Participant[2];
          QName typeNames[] = {new QName("http://resource.management.osgi/Service","ServiceProvider","osgi")};
          RelationshipType type = new SimpleRelationshipType(typeNames);
          participants[0] = new SimpleParticipant(resource, "service");
          participants[1] = new SimpleParticipant(targetResource, "provider");
          relCap.addRelationship("ServiceConsumer", type, participants);

          //Now add reciprocal relationship to the bundle resource
          relCap = (Relationships)targetResource.getCapability(MuwsConstants.RELATIONSHIPS_URI);
          participants = new Participant[2];
          QName serviceTypeNames[] = {new QName("http://resource.management.osgi/Bundle","RegisteredService","osgi")};
          type = new SimpleRelationshipType(serviceTypeNames);
          participants[0] = new SimpleParticipant(resource, "service");
          participants[1] = new SimpleParticipant(targetResource, "provider");
          relCap.addRelationship("RegisteredService", type, participants);
        }
      }

      BundleContribution[] consumers = contribution.getServiceConsumers();
      if(consumers == null) return;
      for(int i=0;i<consumers.length;i++){
        BundleContribution dependency = consumers[i];
        WsResource targetResource = (WsResource)resourceForContribution.get(dependency);
        if(targetResource == null){
          continue;
        }
        Participant[] participants = new Participant[2];
        QName typeNames[] = {new QName("http://resource.management.osgi/Service","ServiceConsumer")};
        RelationshipType type = new SimpleRelationshipType(typeNames);
        participants[0] = new SimpleParticipant(resource, "service");
        participants[1] = new SimpleParticipant(targetResource, "consumer");
        relCap.addRelationship("Service Consumer", type, participants);
      }
    } catch(Throwable t){
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.dm.muws.RelationshipType

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.