Examples of HL7DeviceExtension


Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

        config.removeDevice("Test-Device-1");
    }

    private static Device createDevice(String name, String appName) throws Exception {
        Device device = new Device(name);
        HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
        device.addDeviceExtension(hl7Ext);
        Connection conn = createConn("host.dcm4che.org", 2575);
        device.addConnection(conn);
        HL7Application app = createHL7App(appName, conn);
        hl7Ext.addHL7Application(app);
        return device ;
    }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

    public HL7Application findHL7Application(String name)
            throws ConfigurationException {
        Device device = config.findDevice(
            "(&(objectclass=hl7Application)(hl7ApplicationName=" + name + "))",
            name);
        HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);
        return hl7Ext.getHL7Application(name);
    }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

        return hl7Ext.getHL7Application(name);
    }

    @Override
    protected void storeChilds(String deviceDN, Device device) throws NamingException {
        HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);
        if (hl7Ext == null)
            return;

        for (HL7Application hl7App : hl7Ext.getHL7Applications()) {
            String appDN = hl7appDN(hl7App.getApplicationName(), deviceDN);
            config.createSubcontext(appDN,
                    storeTo(hl7App, deviceDN, new BasicAttributes(true)));
        }
    }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

                config.search(deviceDN, "(objectclass=hl7Application)");
        try {
            if (!ne.hasMore())
                return;

            HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
            device.addDeviceExtension(hl7Ext);
            do {
                hl7Ext.addHL7Application(
                        loadHL7Application(ne.next(), deviceDN, device));
            } while (ne.hasMore());
        } finally {
            LdapUtils.safeClose(ne);
        }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

    }

    @Override
    protected void mergeChilds(Device prev, Device device, String deviceDN)
            throws NamingException {
        HL7DeviceExtension prevHL7Ext =
                prev.getDeviceExtension(HL7DeviceExtension.class);
        HL7DeviceExtension hl7Ext =
                device.getDeviceExtension(HL7DeviceExtension.class);

        if (prevHL7Ext != null)
            for (String appName : prevHL7Ext.getHL7ApplicationNames()) {
                if (hl7Ext == null || !hl7Ext.containsHL7Application(appName))
                    config.destroySubcontextWithChilds(hl7appDN(appName, deviceDN));
            }

        if (hl7Ext == null)
            return;

        for (HL7Application hl7app : hl7Ext.getHL7Applications()) {
            String appName = hl7app.getApplicationName();
            if (prevHL7Ext == null || !prevHL7Ext.containsHL7Application(appName)) {
                String appDN = hl7appDN(hl7app.getApplicationName(), deviceDN);
                config.createSubcontext(appDN,
                        storeTo(hl7app, deviceDN, new BasicAttributes(true)));
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

        config.removeDevice("Test-Device-1");
    }

    private static Device createDevice(String name, String appName) throws Exception {
        Device device = new Device(name);
        HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
        device.addDeviceExtension(hl7Ext);
        Connection conn = createConn("host.dcm4che.org", 2575);
        device.addConnection(conn);
        HL7Application app = createHL7App(appName, conn);
        hl7Ext.addHL7Application(app);
        return device ;
    }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

    protected void loadChilds(Device device, Preferences deviceNode)
            throws BackingStoreException, ConfigurationException {
        if (!deviceNode.nodeExists("hl7Application"))
            return;

        HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
        device.addDeviceExtension(hl7Ext);
        List<Connection> devConns = device.listConnections();
        Preferences appsNode = deviceNode.node("hl7Application");
        for (String appName : appsNode.childrenNames()) {
            Preferences appNode = appsNode.node(appName);
            HL7Application hl7app = newHL7Application(appNode);
            loadFrom(hl7app, appNode);
            int n = appNode.getInt("dicomNetworkConnectionReference.#", 0);
            for (int i = 0; i < n; i++) {
                hl7app.addConnection(devConns.get(
                        appNode.getInt("dicomNetworkConnectionReference." + (i+1), 0) - 1));
            }
            hl7Ext.addHL7Application(hl7app);
        }
    }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

    }

    @Override
    protected void mergeChilds(Device prev, Device device,
            Preferences deviceNode) throws BackingStoreException {
        HL7DeviceExtension prevHL7Ext = prev.getDeviceExtension(HL7DeviceExtension.class);
        HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);

        if (hl7Ext == null) {
            if (prevHL7Ext != null)
                deviceNode.node("hl7Application").removeNode();
            return;
        }

        Preferences appsNode = deviceNode.node("hl7Application");
        if (prevHL7Ext != null)
            for (String appName : prevHL7Ext.getHL7ApplicationNames()) {
                if (!hl7Ext.containsHL7Application(appName))
                    appsNode.node(appName).removeNode();
            }

        List<Connection> devConns = device.listConnections();
        for (HL7Application app : hl7Ext.getHL7Applications()) {
            String appName = app.getApplicationName();
            Preferences appNode = appsNode.node(appName);
            if (prevHL7Ext == null || !prevHL7Ext.containsHL7Application(appName)) {
                storeTo(app, appNode, devConns);
            } else {
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

    @Override
    public HL7Application findHL7Application(String name)
            throws ConfigurationException {
        Device device = config.findDevice("hl7Application", name);
        HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);
        return hl7Ext.getHL7Application(name);
    }
View Full Code Here

Examples of org.dcm4che3.net.hl7.HL7DeviceExtension

        return new HL7Application(appNode.name());
    }

    @Override
    protected void storeChilds(Device device, Preferences deviceNode) {
        HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);
        if (hl7Ext == null)
            return;

        List<Connection> devConns = device.listConnections();
        Preferences parent = deviceNode.node("hl7Application");
        for (HL7Application hl7App : hl7Ext.getHL7Applications()) {
            Preferences appNode = parent.node(hl7App.getApplicationName());
            storeTo(hl7App, appNode, devConns);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.