Package org.dcm4che3.conf.api

Examples of org.dcm4che3.conf.api.AttributeCoercion


            String userID,
            String alternativeUserID,
            String userName,
            String hostName,
            RoleIDCode... roleIDs) {
        ActiveParticipant ap = new ActiveParticipant();
        ap.setUserID(userID);
        ap.setAlternativeUserID(alternativeUserID);
        ap.setUserName(userName);
        ap.setUserIsRequestor(requestor);
        ap.setNetworkAccessPointID(hostName);
        ap.setNetworkAccessPointTypeCode(AuditMessages.isIP(hostName)
                ? AuditMessages.NetworkAccessPointTypeCode.IPAddress
                : AuditMessages.NetworkAccessPointTypeCode.MachineName);
        for (RoleIDCode roleID : roleIDs)
            ap.getRoleIDCode().add(roleID);
        return ap;
    }
View Full Code Here


            ap.getRoleIDCode().add(roleID);
        return ap;
    }

    public AuditSourceIdentification createAuditSourceIdentification() {
        AuditSourceIdentification asi = new AuditSourceIdentification();
        asi.setAuditSourceID(auditSourceID());
        if (auditEnterpriseSiteID != null) {
            if (auditEnterpriseSiteID.equals("dicomInstitutionName")) {
                String[] institutionNames = getDevice().getInstitutionNames();
                if (institutionNames.length > 0)
                    asi.setAuditEnterpriseSiteID(institutionNames[0]);
            } else
                asi.setAuditEnterpriseSiteID(auditEnterpriseSiteID);
        }
        for (String code : auditSourceTypeCodes) {
            if (code.equals("dicomPrimaryDeviceType")) {
                for (String type : device.getPrimaryDeviceTypes()) {
                    AuditSourceTypeCode astc = new AuditSourceTypeCode();
                    astc.setCode(type);
                    astc.setCodeSystemName("DCM");
                    asi.getAuditSourceTypeCode().add(astc);
                }
            } else {
                AuditSourceTypeCode astc = new AuditSourceTypeCode();
                astc.setCode(code);
                asi.getAuditSourceTypeCode().add(astc );
            }
        }
        return asi ;
    }
View Full Code Here

                asi.setAuditEnterpriseSiteID(auditEnterpriseSiteID);
        }
        for (String code : auditSourceTypeCodes) {
            if (code.equals("dicomPrimaryDeviceType")) {
                for (String type : device.getPrimaryDeviceTypes()) {
                    AuditSourceTypeCode astc = new AuditSourceTypeCode();
                    astc.setCode(type);
                    astc.setCodeSystemName("DCM");
                    asi.getAuditSourceTypeCode().add(astc);
                }
            } else {
                AuditSourceTypeCode astc = new AuditSourceTypeCode();
                astc.setCode(code);
                asi.getAuditSourceTypeCode().add(astc );
            }
        }
        return asi ;
    }
View Full Code Here

    public static void main(String[] args) throws Exception {
        LdapDicomConfiguration dicomConf = new LdapDicomConfiguration();
        Device device = dicomConf.findDevice(args[0]);
        Main main = new Main();
        main.bind("dicomDevice", new DicomDeviceComponent(device));
        main.addRouteBuilder(new RouteBuilder(){

            @Override
            public void configure() throws Exception {
                from("dicomDevice:dicom?sopClasses=1.2.840.10008.1.1").bean(EchoSCP.class);
View Full Code Here

        main.run();
    }

    @Override
    public void process(Exchange exchange) throws Exception {
        DicomMessage in = exchange.getIn(DicomMessage.class);
        Dimse dimse = in.getHeader("dimse", Dimse.class);
        if (dimse != Dimse.C_ECHO_RQ)
            throw new DicomServiceException(Status.UnrecognizedOperation);
        DicomMessage out = new DicomMessage(
                Dimse.C_ECHO_RSP,
                Commands.mkEchoRSP(in.getCommand(), Status.Success));
        exchange.setOut(out);
    }
View Full Code Here

                acsNode.node(cn).removeNode();
        }
        for (AttributeCoercion ac : acs) {
            String cn = ac.getCommonName();
            Preferences acNode = acsNode.node(cn);
            AttributeCoercion prev = prevs.findByCommonName(cn);
            if (prev == null)
                storeTo(ac, acNode);
            else
                storeDiffs(acNode, prev, ac);
        }
View Full Code Here

    public void load(AttributeCoercions acs, Preferences aeNode)
            throws BackingStoreException {
        Preferences acsNode = aeNode.node("dcmAttributeCoercion");
        for (String cn : acsNode.childrenNames()) {
            Preferences acNode = acsNode.node(cn);
            acs.add(new AttributeCoercion(
                    cn,
                    PreferencesUtils.stringArray(acNode, "dcmSOPClass"),
                    Dimse.valueOf(acNode.get("dcmDIMSE", null)),
                    TransferCapability.Role.valueOf(
                            acNode.get("dicomTransferRole", null)),
View Full Code Here

                search(dn, "(objectclass=dcmAttributeCoercion)");
        try {
            while (ne.hasMore()) {
                SearchResult sr = ne.next();
                Attributes attrs = sr.getAttributes();
                acs.add(new AttributeCoercion(
                        LdapUtils.stringValue(attrs.get("cn"), null),
                        LdapUtils.stringArray(attrs.get("dcmSOPClass")),
                        Dimse.valueOf(LdapUtils.stringValue(attrs.get("dcmDIMSE"), null)),
                        TransferCapability.Role.valueOf(
                                LdapUtils.stringValue(attrs.get("dicomTransferRole"), null)),
View Full Code Here

                destroySubcontext(LdapUtils.dnOf("cn", cn, parentDN));
        }
        for (AttributeCoercion ac : acs) {
            String cn = ac.getCommonName();
            String dn = LdapUtils.dnOf("cn", cn, parentDN);
            AttributeCoercion prev = prevs.findByCommonName(cn);
            if (prev == null)
                createSubcontext(dn, storeTo(ac, new BasicAttributes(true)));
            else
                modifyAttributes(dn, storeDiffs(prev, ac,
                        new ArrayList<ModificationItem>()));
View Full Code Here

    private static final String URI = "file:///a.xsl";

    @Test
    public void testFindMatching() {
        AttributeCoercion ctFromAET1 = new AttributeCoercion(
                "Coerce CT from AET1",
                new String[]{UID.CTImageStorage},
                C_STORE_RQ, SCP,
                new String[]{"AET1"},
                URI);
        AttributeCoercion anyFromAET2 = new AttributeCoercion(
                "Coerce any from AET2",
                null,
                C_STORE_RQ,
                SCP,
                new String[]{"AET2"},
                URI);
        AttributeCoercion mrFromAny = new AttributeCoercion(
                "Coerce MR from any",
                new String[]{UID.MRImageStorage},
                C_STORE_RQ, SCP,
                null,
                URI);
        AttributeCoercion any = new AttributeCoercion(
                "Coerce any from any",
                null,
                C_STORE_RQ,
                SCP,
                null,
View Full Code Here

TOP

Related Classes of org.dcm4che3.conf.api.AttributeCoercion

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.