nl_tokens: The property tree for a single subject or anonymous node
pl_tokens: function propertyTree ( subject ) { // print('Proprty tree for '+subject) var rep = myDocument . createElement ( 'table' ) var lastPred = null var sts = subjects [ sz . toStr ( subject ) ] // relevant statements if ( ! sts ) { // No statements in tree rep . appendChild ( myDocument . createTextNode ( '...' ) ) // just empty bnode as object return <mask> } sts . sort ( ) var same = 0 var predicateTD // The cell which holds the predicate for ( var i = 0 ; i < sts . length ; i ++ ) { var st = sts [ i ] var tr = myDocument . createElement ( 'tr' ) if ( st . predicate . uri !== lastPred ) { if ( lastPred && same > 1 ) predicateTD . setAttribute ( 'rowspan' , '' + same ) predicateTD = myDocument . createElement ( 'td' ) predicateTD . setAttribute ( 'class' , 'pred' ) var anchor = myDocument . createElement ( 'a' ) anchor . setAttribute ( 'href' , st . predicate . uri ) anchor . addEventListener ( 'click' , UI . widgets . openHrefInOutlineMode , true ) anchor . appendChild ( myDocument . createTextNode ( UI . utils . predicateLabelForXML ( st . predicate ) ) ) predicateTD . appendChild ( anchor ) tr . appendChild ( predicateTD ) lastPred = st . predicate . uri same = 0 } same ++ var objectTD = myDocument . createElement ( 'td' ) objectTD . appendChild ( objectTree ( st . object ) ) tr . appendChild ( objectTD ) rep . appendChild ( tr ) } if ( lastPred && same > 1 ) predicateTD . setAttribute ( 'rowspan' , '' + same ) return rep }