Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-195

[configuration] Support the OpenStep property list format

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      This is a RFE to implement a configuration implementation supporting the
      OpenStep property list format. This format is used in Mac OSX.

      Example file:
      {
      "map" =

      { "key1" = "value1"; "key2" = "value2"; "key3" = "value3"; }

      ;

      "string" = "foo";

      "list" =
      (
      "value1",
      "value2",
      "value3"
      );

      "nested" =
      {
      "map" =

      { "key1" = "value1"; "key2" = "value2"; "key3" = "value3"; }

      ;

      "string" = "bar";

      "list" =
      (
      "value1",
      "value2",
      "value3"
      );
      };
      }

      References:
      http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Concepts/OldStylePListsConcept.html
      http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html

      Java implementation:
      http://zoe.nu/misc/SZProperties.tgz

        Activity

        Hide
        Emmanuel Bourg added a comment -

        Two new configurations are now in SVN, PropertyListConfiguration and
        XMLPropertyListConfiguration in the org.apache.commons.configuration.plist
        package. Both classes are hierarchical configurations, I introducted
        AbstractHierarchicalFileConfiguration to factorize some code (XMLConfiguration
        may benefit from extending this class as well). PropertyListConfiguration uses a
        parser generated by JavaCC, the grammar is in the same package, it's not based
        on the Cayenne grammar mentionned in Comment #1. XMLPropertyListConfiguration
        uses Digester. Both configurations have an additional dependency on
        commons-codec (used for encoding/decoding byte[] values).

        Show
        Emmanuel Bourg added a comment - Two new configurations are now in SVN, PropertyListConfiguration and XMLPropertyListConfiguration in the org.apache.commons.configuration.plist package. Both classes are hierarchical configurations, I introducted AbstractHierarchicalFileConfiguration to factorize some code (XMLConfiguration may benefit from extending this class as well). PropertyListConfiguration uses a parser generated by JavaCC, the grammar is in the same package, it's not based on the Cayenne grammar mentionned in Comment #1. XMLPropertyListConfiguration uses Digester. Both configurations have an additional dependency on commons-codec (used for encoding/decoding byte[] values).
        Hide
        Emmanuel Bourg added a comment -

        There is a XML variant used in Mac OS X:
        http://www.apple.com/DTDs/PropertyList-1.0.dtd

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
        <plist version="0.9">
        <dict>
        <key>key1</key>
        <string>value1</string>

        <key>node</key>
        <dict>
        <key>key2</key>
        <string>value2</string>
        <key>key3</key>
        <string>value3</string>
        </dict>
        </dict>
        </plist>

        Show
        Emmanuel Bourg added a comment - There is a XML variant used in Mac OS X: http://www.apple.com/DTDs/PropertyList-1.0.dtd <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.9"> <dict> <key>key1</key> <string>value1</string> <key>node</key> <dict> <key>key2</key> <string>value2</string> <key>key3</key> <string>value3</string> </dict> </dict> </plist>
        Hide
        Emmanuel Bourg added a comment -

        Another PL resource:
        http://alt.textdrive.com/pl/

        Show
        Emmanuel Bourg added a comment - Another PL resource: http://alt.textdrive.com/pl/
        Show
        Emmanuel Bourg added a comment - Cayenne has a plist parser generated by JavaCC: http://cvs.sourceforge.net/viewcvs.py/cayenne/cayenne/src/cayenne/java/org/objectstyle/cayenne/wocompat/parser/

          People

          • Assignee:
            Unassigned
            Reporter:
            Emmanuel Bourg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development