Example #1
0
        public static void printVarOrResource(ISparqlPrinter p, IResource resource)
        {
            IVariable variable = SPINFactory.asVariable(resource);

            if (variable != null)
            {
                variable.Print(p);
            }
            else if (resource.isUri())
            {
                p.printURIResource(resource);
            }
            else if (p.isNamedBNodeMode())
            {
                // TODO is this correct ?
                p.print(resource.ToString());
            }
            else
            {
                p.print("[]");
            }
        }