public function getNodeInSparqlFormat(Node $node, $var = null)
    {
        if ($node->isConcrete()) {
            return $node->toNQuads();
        }

        if (null !== $var) {
            return '?'.$var;
        } else {
            return '?'.uniqid('tempVar');
        }
    }
public function getNodeInSparqlFormat(Node $node, $var = null)
    {
        if ($node->isConcrete()) {
            return $node->toNQuads();
        }

        if (null !== $var) {
            return '?'.$var;
        } else {
            return '?'.uniqid('tempVar');
        }
    }
public function getNodeInSparqlFormat ( Node $ node , $ var = null ) { if ( $ node -> isConcrete ( ) ) { return $ node -> toNQuads ( ) ; } if ( null !== $ var ) { return '?' . $ var ; } else { return '?' . uniqid ( 'tempVar' ) ; } }
Returns given Node instance in SPARQL format, which is in NQuads or as Variable.

@param Node   $node node instance to format
@param string $var  The variablename, which should be used, if the node is not concrete

@return string either NQuad notation (if node is concrete) or as variable
Returns given Node instance in SPARQL format which is in NQuads or as Variable .