I used to think that folders needed to have an extension so that they are recognized as packages by the Finder. That extension would be declared in the owning application\'s Inf
File and protocol are, to the best of my knowledge, only setup inside your apps Info.plist.
Apps get scanned, and the info in their plists get's added to LaunchServices settings.
Linkinus has 6 different Document Types declared, TextMate has 97, and CyberDuck has 3. I'll do some more searching but I think this is likely the preferred method.