def construct(self, data):
occurrences = {}<EOL>main_occurrences = {}<EOL>for pkg in data["<STR_LIT:data>"]["<STR_LIT>"]:<EOL><INDENT>package = pkg["<STR_LIT>"]<EOL>for item in pkg["<STR_LIT>"]:<EOL><INDENT>dep = item["<STR_LIT:name>"]<EOL>if package != "<STR_LIT:.>":<EOL><INDENT>deps = map(lambda l: "<STR_LIT>" % (package, l), item["<STR_LIT:location>"])<EOL><DEDENT>else:<EOL><INDENT>deps = item["<STR_LIT:location>"]<EOL><DEDENT>if dep not in occurrences:<EOL><INDENT>occurrences[dep] = deps<EOL><DEDENT>else:<EOL><INDENT>occurrences[dep] = occurrences[dep] + deps<EOL><DEDENT><DEDENT><DEDENT>self.occurrences = occurrences<EOL>for main in data["<STR_LIT:data>"]["<STR_LIT>"]:<EOL><INDENT>filename = main["<STR_LIT:filename>"]<EOL>for dep in main["<STR_LIT>"]:<EOL><INDENT>if dep not in main_occurrences:<EOL><INDENT>main_occurrences[dep] = [filename]<EOL><DEDENT>else:<EOL><INDENT>main_occurrences[dep].append(filename)<EOL><DEDENT><DEDENT><DEDENT>self.main_occurrences = main_occurrences<EOL>self.test_directories = sorted(map(lambda l: l["<STR_LIT:test>"], data["<STR_LIT:data>"]["<STR_LIT>"]))<EOL>self.provided_packages = sorted(data["<STR_LIT:data>"]["<STR_LIT>"])<EOL>imported_packages = []<EOL>imported_native_packages = []<EOL>for path in occurrences:<EOL><INDENT>try:<EOL><INDENT>self.ipparser.parse(path)<EOL><DEDENT>except ValueError:<EOL><INDENT>continue<EOL><DEDENT>if self.ipparser.isNative():<EOL><INDENT>imported_native_packages.append(path)<EOL><DEDENT>else:<EOL><INDENT>imported_packages.append(path)<EOL><DEDENT><DEDENT>self.imported_packages = sorted(imported_packages)<EOL>self.imported_native_packages = sorted(imported_native_packages)<EOL>self.main_packages = map(lambda l: l["<STR_LIT:filename>"], data["<STR_LIT:data>"]["<STR_LIT>"])<EOL>
Construct info about a project from artefact

        :param data:	golang-project-packages artefact
        :type  data:	json/dict