Package org.dcm4che3.net

Examples of org.dcm4che3.net.Connection


        protected RetrieveTask calculateMatches(Association as, PresentationContext pc,
                final Attributes rq, Attributes keys) throws DicomServiceException {
            QueryRetrieveLevel level = QueryRetrieveLevel.valueOf(keys, qrLevels);
            level.validateRetrieveKeys(keys, rootLevel, relational(as, rq));
            String moveDest = rq.getString(Tag.MoveDestination);
            final Connection remote = getRemoteConnection(moveDest);
            if (remote == null)
                throw new DicomServiceException(Status.MoveDestinationUnknown,
                        "Move Destination: " + moveDest + " unknown");
            List<InstanceLocator> matches = DcmQRSCP.this.calculateMatches(keys);
            if (matches.isEmpty())
View Full Code Here


    private void loadChilds(Device device, Preferences deviceNode)
            throws BackingStoreException, ConfigurationException {
        Preferences connsNode = deviceNode.node("dcmNetworkConnection");
        for (int connIndex : sort(connsNode.childrenNames())) {
            Connection conn = newConnection();
            loadFrom(conn, connsNode.node("" + connIndex));
            device.addConnection(conn);
        }
        List<Connection> devConns = device.listConnections();
        Preferences aesNode = deviceNode.node("dcmNetworkAE");
View Full Code Here

    private Device newDevice(Preferences deviceNode) {
        return new Device(deviceNode.name());
    }

    private Connection newConnection() {
        return new Connection();
    }
View Full Code Here

                search(deviceDN, "(objectclass=dicomNetworkConnection)");
        try {
            while (ne.hasMore()) {
                SearchResult sr = ne.next();
                Attributes attrs = sr.getAttributes();
                Connection conn = new Connection();
                loadFrom(conn, attrs);
                device.addConnection(conn);
            }
        } finally {
           LdapUtils.safeClose(ne);
View Full Code Here

    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

            if (LdapUtils.findByDN(deviceDN, conns, dn) == null)
                destroySubcontext(dn);
        }
        for (Connection conn : conns) {
            String dn = LdapUtils.dnOf(conn, deviceDN);
            Connection prev = LdapUtils.findByDN(deviceDN, prevs, dn);
            if (prev == null)
                createSubcontext(dn, storeTo(conn, new BasicAttributes(true)));
            else
                modifyAttributes(dn, storeDiffs(prev, conn, new ArrayList<ModificationItem>()));
        }
View Full Code Here

        hl7Ext.addHL7Application(app);
        return device ;
    }

    private static Connection createConn(String hostname, int port) {
        Connection conn = new Connection();
        conn.setHostname(hostname);
        conn.setPort(port);
        conn.setProtocol(Protocol.HL7);
        return conn;
    }
View Full Code Here

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

    private static Device createDevice(String name, String aet) throws Exception {
        Device device = new Device(name);
        Connection conn = createConn("host.dcm4che.org", 11112);
        device.addConnection(conn);
        ApplicationEntity ae = createAE(aet, conn);
        device.addApplicationEntity(ae);
        return device ;
    }
View Full Code Here

        device.addApplicationEntity(ae);
        return device ;
    }

    private static Connection createConn(String hostname, int port) {
        Connection conn = new Connection();
        conn.setHostname(hostname);
        conn.setPort(port);
        return conn;
    }
View Full Code Here

                .setStorageOptions(STORAGE_OPTIONS);
        ae.getTransferCapabilityFor(
                    UID.StudyRootQueryRetrieveInformationModelFIND,
                    TransferCapability.Role.SCP)
                .getQueryOptions().add(QueryOption.DATETIME);
        Connection conn = createConn("host.dcm4che.org", 11114);
        device.addConnection(conn);
        ApplicationEntity ae2 = createAE("TEST-AET2", conn);
        device.addApplicationEntity(ae2);
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.Connection

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.