Added instantiation classmethods to MetadataBundle.


git-svn-id: http://music21.googlecode.com/svn/trunk@3571 5c16147e-a200-11de-b0cc-ab0ad15e60d0
Splitting music21.corpus.base test functions into multiple test functions.

Currently a number of corpus.base tests are failing due to the new structure
of the metadata cache. These tests will be modernized in a subsequent commit.


git-svn-id: http://music21.googlecode.com/svn/trunk@3572 5c16147e-a200-11de-b0cc-ab0ad15e60d0
Updated various files in preparation for more structural changes in the
metadata caching and search subsystems.


git-svn-id: http://music21.googlecode.com/svn/trunk@3573 5c16147e-a200-11de-b0cc-ab0ad15e60d0
Began process of migrating the metadata module into a metadata package.

Migrated all metadata.Date, metadata.Text and metadata.Contributor-related
classes into metadata.primitives.


git-svn-id: http://music21.googlecode.com/svn/trunk@3574 5c16147e-a200-11de-b0cc-ab0ad15e60d0
Migrated metadata caching logic from metadata/__init__.py into
metadata/caching.py.


git-svn-id: http://music21.googlecode.com/svn/trunk@3575 5c16147e-a200-11de-b0cc-ab0ad15e60d0
Added `dedent` function to music21/test/ which allows for human-readable
comparisons of multi-line strings in unit tests (via `assertMultiLineEqual`):

Usage from metadata/base.py (in an upcoming commit):

    def testRichMetadata(self):
        from music21 import corpus
        from music21 import metadata
        from music21 import test
        score = corpus.parse('bwv66.6')
        richMetadata = metadata.RichMetadata()
        richMetadata.merge(score.metadata)
        richMetadata.update(score)
        self.assertEqual(richMetadata.noteCount, 165)
        self.assertEqual(richMetadata.quarterLength, 36.0)
        self.assertMultiLineEqual(
            freezeThaw.JSONFreezer(richMetadata).prettyJson,
            test.dedent('''
                {
                    "__attr__": {
                        "_contributors": [], 
                        "_urls": [], 
                        "_workIds": {
                            "movementName": {
                                "__attr__": {
                                    "_data": "bwv66.6.mxl"
                                }, 
                                "__class__": "music21.metadata.primitives.Text"
                            }
                        }, 
                        "keySignatureFirst": "<music21.key.KeySignature of 3 sharps, mode minor>", 
                        "noteCount": 165, 
                        "quarterLength": 36.0, 
                        "timeSignatureFirst": "4/4"
                    }, 
                    "__class__": "music21.metadata.base.RichMetadata", 
                    "__version__": [
                        ''' + str(base.VERSION[0]) + ''', 
                        ''' + str(base.VERSION[1]) + ''', 
                        ''' + str(base.VERSION[2]) + '''
                    ]
                }
                ''',
                ))


git-svn-id: http://music21.googlecode.com/svn/trunk@3576 5c16147e-a200-11de-b0cc-ab0ad15e60d0