How to use the ontospy.core.ontospy.actions_delete function in ontospy

To help you get started, we’ve selected a few ontospy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lambdamusic / Ontospy / ontospy / core / main-manager.py View on Github external
if _location.endswith("/"):
			# dont need the final slash
			_location = _location[:-1]
		output = ontospy.action_update_library_location(_location)
		if output:
			printDebug("Note: no files have been moved or deleted (this has to be done manually)", "comment")
			printDebug("----------\n" + "New location: '%s'" % _location, "important")

		else:
			printDebug("----------\n" + "Please specify an existing folder path.", "important")
		raise SystemExit(1)


	# reset local stuff
	if opts._delete:
		res = ontospy.actions_delete()
		raise SystemExit(1)

	# reset local stuff
	if opts.erase:
		ontospy.action_erase()
		raise SystemExit(1)

	# cache local ontologies
	if opts.cache:
		sTime = time.time()
		ontospy.action_cache()
		# finally: print(some stats....)
		eTime = time.time()
		tTime = eTime - sTime
		printDebug("-" * 10)
		printDebug("Time:	   %0.2fs" %  tTime, "comment")