STIXProject/python-stix — pull request #126 by bworrell (2014-04-30 22:05:27+00:00)
Title: VocabStrings

This pull request includes a rework of the way in which `VocabString` instances are created during `from_obj()` and `from_dict()` calls.

Basically, we now inspect the `xsi:type` attribute/key and instantiate the correct `stix.common.vocabs` derivation of `VocabString`. If there is no `xsi:type` declared, we instantiate `VocabString` itself.

The `stix.common.vocabs` module also provides an `add_vocab()` method which allows developers to register their own `VocabString` derivation (their own Controlled Vocabulary).