Examples of StorageOptions


Examples of org.dcm4che3.net.StorageOptions

            PreferencesUtils.storeNotDef(prefs, "dcmFuzzySemanticMatching",
                    queryOpts.contains(QueryOption.FUZZY), false);
            PreferencesUtils.storeNotDef(prefs, "dcmTimezoneQueryAdjustment",
                    queryOpts.contains(QueryOption.TIMEZONE), false);
        }
        StorageOptions storageOpts = tc.getStorageOptions();
        if (storageOpts != null) {
            prefs.putInt("dcmStorageConformance",
                    storageOpts.getLevelOfSupport().ordinal());
            prefs.putInt("dcmDigitalSignatureSupport",
                    storageOpts.getDigitalSignatureSupport().ordinal());
            prefs.putInt("dcmDataElementCoercion",
                    storageOpts.getElementCoercion().ordinal());
        }
    }
View Full Code Here

Examples of org.dcm4che3.net.StorageOptions

        int levelOfSupport = prefs.getInt("dcmStorageConformance", -1);
        int signatureSupport = prefs.getInt("dcmDigitalSignatureSupport", -1);
        int coercion = prefs.getInt("dcmDataElementCoercion", -1);
        if (levelOfSupport == -1 && signatureSupport == -1 && coercion == -1)
            return null;
        StorageOptions opts = new StorageOptions();
        if (levelOfSupport != -1)
            opts.setLevelOfSupport(StorageOptions.LevelOfSupport.valueOf(levelOfSupport));
        if (signatureSupport != -1)
            opts.setDigitalSignatureSupport(
                    StorageOptions.DigitalSignatureSupport.valueOf(signatureSupport));
        if (coercion != -1)
            opts.setElementCoercion(StorageOptions.ElementCoercion.valueOf(coercion));
        return opts;
    }
View Full Code Here

Examples of org.dcm4che3.net.StorageOptions

            LdapUtils.storeNotDef(attrs, "dcmFuzzySemanticMatching",
                    queryOpts.contains(QueryOption.FUZZY), false);
            LdapUtils.storeNotDef(attrs, "dcmTimezoneQueryAdjustment",
                    queryOpts.contains(QueryOption.TIMEZONE), false);
        }
        StorageOptions storageOpts = tc.getStorageOptions();
        if (storageOpts != null) {
            LdapUtils.storeInt(attrs, "dcmStorageConformance",
                    storageOpts.getLevelOfSupport().ordinal());
            LdapUtils.storeInt(attrs, "dcmDigitalSignatureSupport",
                    storageOpts.getDigitalSignatureSupport().ordinal());
            LdapUtils.storeInt(attrs, "dcmDataElementCoercion",
                    storageOpts.getElementCoercion().ordinal());
        }
        return attrs;
    }
View Full Code Here

Examples of org.dcm4che3.net.StorageOptions

        Attribute levelOfSupport = attrs.get("dcmStorageConformance");
        Attribute signatureSupport = attrs.get("dcmDigitalSignatureSupport");
        Attribute coercion = attrs.get("dcmDataElementCoercion");
        if (levelOfSupport == null && signatureSupport == null && coercion == null)
            return null;
        StorageOptions opts = new StorageOptions();
        opts.setLevelOfSupport(
                StorageOptions.LevelOfSupport.valueOf(LdapUtils.intValue(levelOfSupport, 3)));
        opts.setDigitalSignatureSupport(
                StorageOptions.DigitalSignatureSupport.valueOf(LdapUtils.intValue(signatureSupport, 0)));
        opts.setElementCoercion(
                StorageOptions.ElementCoercion.valueOf(LdapUtils.intValue(coercion, 2)));
        return opts;
    }
View Full Code Here

Examples of ru.aristar.jnuget.common.StorageOptions

    public void testCreateFilePackageSource() throws Exception {
        //GIVEN
        final String userHomeFolder = System.getProperty("user.home");
        PackageSourceFactory sourceFactory = new PackageSourceFactory();
        PackageSourceFactory.instance = sourceFactory;
        StorageOptions storageOptions = new StorageOptions();
        storageOptions.setStorageName("storage");
        storageOptions.setClassName(ClassicPackageSource.class.getCanonicalName());
        storageOptions.setIndexed(false);
        storageOptions.getProperties().put("folderName", "${user.home}/Packages/");
        //WHEN
        PackageSource result = sourceFactory.createPackageSource(storageOptions);
        final File expectedFolder = new File(userHomeFolder + "/Packages/");
        //THEN       
        assertEquals("Класс хранилища", ClassicPackageSource.class, result.getClass());
View Full Code Here

Examples of ru.aristar.jnuget.common.StorageOptions

        //Триггер до помещения пакета
        final TriggerOptions beforeTriggerOptions = new TriggerOptions();
        beforeTriggerOptions.setClassName(TestBeforeTrigger.class.getCanonicalName());
        beforeTriggerOptions.getProperties().put("testProperty", "15");
        //Стратегия фиксации
        StorageOptions storageOptions = new StorageOptions();
        storageOptions.setStorageName("storage");
        storageOptions.getAftherTriggersOptions().add(aftherTriggerOptions);
        storageOptions.getBeforeTriggersOptions().add(beforeTriggerOptions);
        //WHEN
        ModifyStrategy result = sourceFactory.createPushStrategy(storageOptions);
        //THEN
        assertThat("Стратегия фиксации", result, instanceOf(ModifyStrategy.class));
        assertThat("Количество созданых before тригеров", result.getBeforePushTriggers().size(), equalTo(1));
View Full Code Here

Examples of ru.aristar.jnuget.common.StorageOptions

     */
    @Test
    public void testCreateGroupPackageSource() {
        //GIVEN
        Options options = new Options();
        StorageOptions innerStorage = new StorageOptions();
        innerStorage.setClassName(ClassicPackageSource.class.getCanonicalName());
        innerStorage.setStorageName("innerStorage");
        innerStorage.setIndexed(false);
        innerStorage.setPublic(false);
        innerStorage.getProperties().put("folderName", "${user.home}/Packages/");
        options.getStorageOptionsList().add(innerStorage);
        StorageOptions outerStorage = new StorageOptions();
        outerStorage.setClassName(PackageSourceGroup.class.getCanonicalName());
        outerStorage.setStorageName("outerStorage");
        outerStorage.setIndexed(false);
        outerStorage.setPublic(true);
        outerStorage.getProperties().put("innerSourceNames", "innerStorage");
        options.getStorageOptionsList().add(outerStorage);

        PackageSourceFactory sourceFactory = new PackageSourceFactory();
        PackageSourceFactory.instance = sourceFactory;
        //WHEN
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.