def loads(inputStr):
inCat = json.loads(inputStr)<EOL>assert CATALOGUE_TYPE in _values(inCat[CATALOGUE_METADATA], ISCONTENTTYPE_RELATION)<EOL>desc = _values(inCat[CATALOGUE_METADATA], DESCRIPTION_RELATION)[<NUM_LIT:0>]  <EOL>outCat = Hypercat(desc)<EOL>for i in inCat[ITEMS]:<EOL><INDENT>href = i[HREF]<EOL>contentType = _values(i[ITEM_METADATA], ISCONTENTTYPE_RELATION) [<NUM_LIT:0>]<EOL>desc = _values(i[ITEM_METADATA], DESCRIPTION_RELATION) [<NUM_LIT:0>]<EOL>if contentType == CATALOGUE_TYPE:<EOL><INDENT>r = Hypercat(desc)<EOL><DEDENT>else:<EOL><INDENT>r = Resource(desc, contentType)<EOL><DEDENT>outCat.addItem(r, href)<EOL><DEDENT>return outCat<EOL>
Takes a string and converts it into an internal hypercat object, with some checking