@@ -709,9 +709,9 @@ function getClauseAndRemainder(pat) {
709709
710710function compilePredicate ( pp , q ) {
711711 if ( pp . indexOf ( '<' ) !== - 1 && pp . indexOf ( '>' ) !== - 1 ) {
712- let pred = pp . slice ( 1 , pp . length - 1 ) ;
712+ const pred = pp . slice ( 1 , pp . length - 1 ) ;
713713 // eslint-disable-next-line no-multi-assign,no-constant-condition
714- const cleaned = ( pred = '* ' ? 'owl:topObjectProperty' : q . cleanPathPredicate ( pred ) ) ;
714+ const cleaned = pred === '. ' ? null : q . cleanPathPredicate ( pred ) ;
715715 return {
716716 '@type' : 'PathOr' ,
717717 or : [ {
@@ -725,18 +725,15 @@ function compilePredicate(pp, q) {
725725 } ;
726726 } if ( pp . indexOf ( '<' ) !== - 1 ) {
727727 const pred = pp . slice ( 1 , pp . length ) ;
728- // let cleaned = pred === '*' ? 'owl:topObjectProperty' : q.cleanPathPredicate(pred)
729- const cleaned = q . cleanPathPredicate ( pred ) ;
728+ const cleaned = pred === '.' ? null : q . cleanPathPredicate ( pred ) ;
730729 return { '@type' : 'InversePathPredicate' , predicate : cleaned } ;
731730 } if ( pp . indexOf ( '>' ) !== - 1 ) {
732731 const pred = pp . slice ( 0 , pp . length - 1 ) ;
733- // let cleaned = pred === '*' ? 'owl:topObjectProperty' : q.cleanPathPredicate(pred)
734- const cleaned = q . cleanPathPredicate ( pred ) ;
732+ const cleaned = pred === '.' ? null : q . cleanPathPredicate ( pred ) ;
735733 return { '@type' : 'PathPredicate' , predicate : cleaned } ;
736734 }
737- // let pred = pp === '*' ? 'owl:topObjectProperty' : q.cleanPathPredicate(pp)
738- const pred = q . cleanPathPredicate ( pp ) ;
739- return { '@type' : 'PathPredicate' , predicate : pred } ;
735+ const cleaned = pp === '.' ? null : q . cleanPathPredicate ( pp ) ;
736+ return { '@type' : 'PathPredicate' , predicate : cleaned } ;
740737}
741738
742739/**
@@ -843,6 +840,8 @@ function copyJSON(orig, rollup) {
843840 }
844841 }
845842 nuj [ k ] = nupart ;
843+ } else if ( part === null ) {
844+ // do nothing
846845 } else if ( typeof part === 'object' ) {
847846 const q = copyJSON ( part , rollup ) ;
848847 if ( ! q || ! UTILS . empty ( q ) ) nuj [ k ] = q ;
0 commit comments