Commit 8068f7ed authored by lambdamusic's avatar lambdamusic

namepsaces

parent 0ea15d87
......@@ -10,6 +10,8 @@ Summary of changes.
- implicit/explicit classes and predicates switch '-x'
- this is useful to inspect a small RDF snippet for example too see what predicates are being used
- option to show raw RDF data (-r)
- improvements to shell command
- namespaces printed out by default
## December, 2018: v1.9.7
......
......@@ -84,10 +84,10 @@ class RDF_Entity(object):
def printTriples(self):
""" display triples """
printDebug(Style.BRIGHT + self.uri + Style.RESET_ALL)
printDebug(Fore.RED + self.uri + Style.RESET_ALL)
for x in self.triples:
printDebug(Fore.MAGENTA + "=> " + unicode(x[1]))
printDebug(Fore.GREEN + ".... " + unicode(x[2]) + Fore.RESET)
printDebug(Fore.BLACK + "=> " + unicode(x[1]))
printDebug(Style.DIM + ".... " + unicode(x[2]) + Fore.RESET)
print("")
def _build_qname(self, uri=None, namespaces=None):
......
......@@ -819,6 +819,14 @@ def shellPrintOverview(g, opts={'labels': False}):
except:
labels = False
print(Style.BRIGHT + "Namespaces\n-----------" + Style.RESET_ALL)
if g.namespaces:
for p, u in g.namespaces:
row = Fore.GREEN + "%s" % p + Fore.BLACK + " %s" % u + Fore.RESET
print(row)
else:
printDebug("None found", "comment")
print(Style.BRIGHT + "\nOntologies\n-----------" + Style.RESET_ALL)
if ontologies:
for o in ontologies:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment