code: def construct(self, data):
  		occurrences = {}
  		main_occurrences = {}
  		for pkg in data["data"]["dependencies"]:
  			package = pkg["package"]
  			for item in pkg["dependencies"]:
  				dep = item["name"]
  				if package != ".":
  					deps = map(lambda l: "%s/%s" % (package, l), item["location"])
  				else:
  					deps = item["location"]
  				if dep not in occurrences:
  					occurrences[dep] = deps
  				else:
  					occurrences[dep] = occurrences[dep] + deps
  		self.occurrences = occurrences
  		for main in data["data"]["main"]:
  			filename = main["filename"]
  			for dep in main["dependencies"]:
  				if dep not in main_occurrences:
  					main_occurrences[dep] = [filename]
  				else:
  					main_occurrences[dep].append(filename)
  		self.main_occurrences = main_occurrences
  		self.test_directories = sorted(map(lambda l: l["test"], data["data"]["tests"]))
  		self.provided_packages = sorted(data["data"]["packages"])
  		imported_packages = []
  		imported_native_packages = []
  		for path in occurrences:
  			try:
  				self.ipparser.parse(path)
  			except ValueError:
  				continue
  			if self.ipparser.isNative():
  				imported_native_packages.append(path)
  			else:
  				imported_packages.append(path)
  		self.imported_packages = sorted(imported_packages)
  		self.imported_native_packages = sorted(imported_native_packages)
  		self.main_packages = map(lambda l: l["filename"], data["data"]["main"])