Package org.wso2.carbon.business.messaging.hl7.message

Examples of org.wso2.carbon.business.messaging.hl7.message.HL7MessageBuilder


    }

    public byte[] getProcessImage(String processId) {

        QName qName = decode(processId);
        SVGInterface svg = createSVG(qName);
        return svg.toPNGBytes();
    }
View Full Code Here


    private SVGInterface createSVG(QName qName) {

        // generate new
        InputStream in = getBpelDescriptor(qName);

        SVGInterface svg = null;

        try {
            svg = BPEL2SVGUtil.generate(in);

            if (svg == null)
View Full Code Here

   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

            } else {
                throw new Exception(
                        "ConfigurationContext is not found while loading org.wso2.carbon.transport.fix bundle");
            }
            configContext.getAxisConfiguration()
                    .addMessageBuilder("application/edi-hl7", new HL7MessageBuilder());
            configContext.getAxisConfiguration()
                    .addMessageFormatter("application/edi-hl7", new HL7MessageFormatter());
            if (log.isDebugEnabled()) {
                log.info("Set the HL7 message builder and formatter in the Axis2 context");
            }
View Full Code Here

                        "ConfigurationContext is not found while loading org.wso2.carbon.transport.fix bundle");
            }
            configContext.getAxisConfiguration()
                    .addMessageBuilder("application/edi-hl7", new HL7MessageBuilder());
            configContext.getAxisConfiguration()
                    .addMessageFormatter("application/edi-hl7", new HL7MessageFormatter());
            if (log.isDebugEnabled()) {
                log.info("Set the HL7 message builder and formatter in the Axis2 context");
            }
            if (log.isDebugEnabled()) {
                log.debug("Successfully registered the HL7 Message Service");
View Full Code Here

    public MLLPTransportServiceComponent() {
    }

    protected void activate(ComponentContext ctxt) {
        ConfigurationContext configContext;
        HL7TransportService HL7Transport;
        Properties props;
        if (log.isDebugEnabled()) {
            log.debug("MLLP Transport bundle is activated");
        }

        try {
            if (contextService != null) {
                // Getting server's configContext instance
                configContext = contextService.getServerConfigContext();
            } else {
                throw new Exception(
                        "ConfigurationContext is not found while loading org.wso2.carbon.business.messaging.hl7.transport bundle");
            }

            // Save the transport configuration in the registry if not already done so
            new TransportPersistenceManager(configContext.getAxisConfiguration()).saveTransportConfiguration(HL7TransportService.TRANSPORT_NAME,
                    ctxt.getBundleContext().getBundle().getResource(HL7TransportService.TRANSPORT_CONF));

            // Instantiate HL7TransportService
            HL7Transport = new HL7TransportService();

            // This should ideally contain properties of HL7TransportService as a collection of
            // key/value pair. Here we do not require to add any elements.
            props = new Properties();
View Full Code Here

    @Override
    protected void startEndpoint(HL7Endpoint endpoint) throws AxisFault {
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP();
        PipeParser parser = new PipeParser();
        SimpleServer server = new SimpleServer(endpoint.getPort(), llp, parser);
        Application callback = new HL7MessageProcessor(endpoint);
        server.registerApplication("*", "*", callback);
        server.start();
        serverTable.put(endpoint, server);

        log.info("Started HL7 endpoint on port: " + endpoint.getPort());
View Full Code Here

        } else if (scheme.equals(ClusteringConstants.MembershipScheme.MULTICAST_BASED)) {
            membershipScheme = new MulticastBasedMembershipScheme(parameters, primaryDomain,
                                                                  nwConfig.getJoin().getMulticastConfig());
            membershipScheme.init();
        } else if (scheme.equals(HazelcastConstants.AWS_MEMBERSHIP_SCHEME)) {
            membershipScheme = new AWSBasedMembershipScheme(parameters, primaryDomain,
                                                            nwConfig.getJoin().getAwsConfig());
            membershipScheme.init();
        } else {
            String msg = "Invalid membership scheme '" + scheme +
                         "'. Supported schemes are multicast & wka";
View Full Code Here

TOP

Related Classes of org.wso2.carbon.business.messaging.hl7.message.HL7MessageBuilder

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.