public void rulesNew(String ruleName, String ruleString) {
        try {
            translateRulesFolder = (Folder) session.getObjectByPath("/TranslateRules");
            Map<String, String> properties = new HashMap<String, String>();
            properties.put(PropertyIds.OBJECT_TYPE_ID,
                    "cmis:folder,P:trans:translateRule");
            // properties.put(PropertyIds.OBJECT_TYPE_ID,
            // "cmis:folder,P:trans:folder");
            properties.put(PropertyIds.NAME, ruleName);
            properties.put("trans:rule", ruleString);
            try {
                translateRulesFolder.createFolder(properties);
            } catch (CmisContentAlreadyExistsException e) {
                System.out.println("Could not create rule '" + ruleName + "': "
                        + e.getMessage());
            }

        } catch (CmisObjectNotFoundException e) {
            System.out.println("TranslateRules folder not found: "
                    + e.getMessage());
        } catch (ClassCastException e) {
            System.out.println("Object is not a CMIS folder.");
        }

    }