from TRIAD.CacheTriad import TriadFramework
triad=TriadFramework('_SYSTEM', 'SYS', 1)
print(triad.binding_classes())
triad.get(what='Query Node', frm='NodeDict', key='33||1024||0||0')
print(triad.dic)
triad.get(what='Object Node', frm='NodeDict', key='33||1024||0||0')
print(triad.dic)
print(triad.dic.get_node('44||1111||0||0'))
[triad.dic.path, triad.dic.name, triad.dic.abbr, triad.dic.type, triad.dic.typedic, triad.dic.count]
# This creates a new connection to CACHE database
triad.get(what='Object Node', frm='NodeVia', key='11||6000||40||9')
# This creates a new connection to CACHE database
link=triad.via(objectID='11||6000||40||9')
link
# This is using the existing CACHE connection to open another CACHE object NodeVia Node object
link.get_node('11||6000||40||10')
print(link)
[link.get_labels(2), link.get_labels(3), link.get_labels(4)]
hedges=triad.get(what='HyperEdges', sys=1032)
hedges
hedge = triad.tail()
hedge
for k in list(triad.get(what='HyperEdges', sys=1032, con=10).KEY):
print(hedge.get_node(k).get_hypernodes(True))
for k in list(triad.get(what='HyperEdges', sys=1032, con=20).KEY):
print(hedge.get_node(k).get_hypernodes(True))
for k in list(triad.get(what='HyperEdges', sys=1032, con=30).KEY):
print(hedge.get_node(k).get_hypernodes(True))