Package java.util.prefs

Examples of java.util.prefs.Preferences.node()


    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");
        for (String aet : aesNode.childrenNames()) {
View Full Code Here


    private void loadTransferCapabilities(ApplicationEntity ae,
            Preferences tcsNode, Role role) throws BackingStoreException {
        Preferences roleNode = tcsNode.node(role.name());
        for (String cuid : roleNode.childrenNames())
            ae.addTransferCapability(
                    loadTransferCapability(roleNode.node(cuid), cuid, role));
    }

    public void load(AttributeCoercions acs, Preferences aeNode)
            throws BackingStoreException {
        Preferences acsNode = aeNode.node("dcmAttributeCoercion");
View Full Code Here

        if (!prefs.nodeExists(pathName)) {
            System.err.println(MessageFormat.format(
                    rb.getString("no-such-path"), pathName));
            System.exit(2);
        }
        prefs.node(pathName).exportSubtree(System.out);
    }

}
View Full Code Here

    }

    private void store(List<AuditSuppressCriteria> list, Preferences parentNode) {
        Preferences ascNode = parentNode.node("dcmAuditSuppressCriteria");
        for (AuditSuppressCriteria criteria : list) {
            storeTo(criteria, ascNode.node(criteria.getCommonName()));
        }
    }

    private void storeTo(AuditSuppressCriteria criteria, Preferences prefs) {
        PreferencesUtils.storeNotEmpty(prefs, "dcmAuditEventID",
View Full Code Here

    private void loadAuditSuppressCriteria(AuditLogger logger, Preferences loggerNode)
            throws BackingStoreException {
        Preferences parentNode = loggerNode.node("dcmAuditSuppressCriteria");
        for (String cn : parentNode.childrenNames()) {
            AuditSuppressCriteria criteria = new  AuditSuppressCriteria(cn);
            loadAuditSuppressCriteria(criteria, parentNode.node(cn));
            logger.addAuditSuppressCriteria(criteria);
        }
    }

    private void loadAuditSuppressCriteria(AuditSuppressCriteria criteria,
View Full Code Here

                    throws BackingStoreException {
        Preferences parentNode = auditLoggerNode.node("dcmAuditSuppressCriteria");
        for (AuditSuppressCriteria prevCriteria : prevLogger.getAuditSuppressCriteriaList()) {
            String cn = prevCriteria.getCommonName();
            if (logger.findAuditSuppressCriteriaByCommonName(cn) == null)
                parentNode.node(cn).removeNode();
        }
        for (AuditSuppressCriteria criteria : logger.getAuditSuppressCriteriaList()) {
            String cn = criteria.getCommonName();
            AuditSuppressCriteria prev = prevLogger.findAuditSuppressCriteriaByCommonName(cn);
            Preferences node = parentNode.node(cn);
View Full Code Here

    }

    private static Preferences rootPrefs() {
        Preferences prefs = Preferences.userRoot();
        String pathName = System.getProperty(CONF_ROOT_PROPERTY);
        return pathName != null ? prefs.node(pathName) : prefs;
    }

    public PreferencesDicomConfiguration(Preferences rootPrefs) {
        this.rootPrefs = rootPrefs;
    }
View Full Code Here

       
        try {
            Preferences devicePrefs = rootPrefs.node(DICOM_DEVICES_ROOT);
            for (String deviceName : devicePrefs.childrenNames()) {
                Preferences deviceNode = devicePrefs.node(deviceName);
                for (String aet2 : deviceNode.node(nodeName).childrenNames())
                    if (aet.equals(aet2))
                        return loadDevice(deviceNode);
            }
        } catch (BackingStoreException e) {
            throw new ConfigurationException(e);
View Full Code Here

    private void storeChilds(Device device, Preferences deviceNode) throws ConfigurationException {
        Preferences connsNode = deviceNode.node("dcmNetworkConnection");
        int connIndex = 1;
        List<Connection> devConns = device.listConnections();
        for (Connection conn : devConns)
            storeTo(conn, connsNode.node("" + connIndex++));
        Preferences aesNode = deviceNode.node("dcmNetworkAE");
        for (ApplicationEntity ae : device.getApplicationEntities()) {
            Preferences aeNode = aesNode.node(ae.getAETitle());
            storeTo(ae, aeNode, devConns);
            storeChilds(ae, aeNode);
View Full Code Here

    private void storeTransferCapabilities(ApplicationEntity ae, Role role,
            Preferences tcsNode) {
        Preferences roleNode = tcsNode.node(role.name());
        for (TransferCapability tc : ae.getTransferCapabilitiesWithRole(role))
            storeTo(tc, roleNode.node(tc.getSopClass()));
    }

    public void store(AttributeCoercions acs, Preferences parentNode) {
        Preferences acsNode = parentNode.node("dcmAttributeCoercion");
        for (AttributeCoercion ac : acs)
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.