Package com.hp.hpl.jena.sparql.serializer

Examples of com.hp.hpl.jena.sparql.serializer.SerializationContext


     *
     * @param n
     *            Node to append
     */
    public void appendNode(Node n) {
        SerializationContext context = new SerializationContext(this.prefixes);
        context.setBaseIRI(this.baseUri);
        this.cmd.append(this.stringForNode(n, context));
    }
View Full Code Here


    public String toString() {
        String command = this.cmd.toString();
        Pattern p;

        // Go ahead and inject Variable Parameters
        SerializationContext context = new SerializationContext(this.prefixes);
        context.setBaseIRI(this.baseUri);
        for ( String var : this.params.keySet() )
        {
            Node n = this.params.get( var );
            if ( n == null )
            {
View Full Code Here

        boolean donePrefix = false ;
       
        Print(IndentedWriter out, SerializationContext sCxt)
        {
            if ( sCxt == null )
                sCxt = new SerializationContext() ;
            this.out = out ;
            this.sCxt = sCxt ;
        }
View Full Code Here

    public static void output(IndentedWriter iWriter, Op op, PrefixMapping pMap)
    {
        if ( pMap == null )
            pMap = OpPrefixesUsed.used(op, ARQConstants.getGlobalPrefixMap()) ;
        SerializationContext sCxt = new SerializationContext(pMap) ;
        output(iWriter, op, sCxt) ;
    }
View Full Code Here

        output(iWriter, op, sCxt) ;
    }

    public static void output(IndentedWriter iWriter, Op op, Prologue prologue)
    {
        SerializationContext sCxt = new SerializationContext(prologue) ;
        output(iWriter, op, sCxt) ;
    }
View Full Code Here

    // Actual work
    public static void output(final IndentedWriter iWriter, final Op op, SerializationContext sCxt)
    {
        if ( sCxt == null )
            sCxt = new SerializationContext() ;
        final SerializationContext sCxt2 = sCxt ;
        WriterBasePrefix.Fmt fmt =
            new WriterBasePrefix.Fmt() {
                @Override
                public void format() {op.visit(new OpWriterWorker(iWriter, sCxt2)) ;}
                } ;
        WriterBasePrefix.output(iWriter, fmt, sCxt2.getPrologue()) ;
    }       
View Full Code Here

        return sCxt(ARQConstants.getGlobalPrefixMap()) ;
    }
   
    public static SerializationContext sCxt(PrefixMapping pmap)
    {
        return new SerializationContext(pmap) ;
    }
View Full Code Here

   
    static public void resetBNodeLabels() { bNodeMap = new NodeToLabelMapBNode("b", false) ; }
   
    private static SerializationContext newSerializationContext(PrefixMapping prefixMapping)
    {
        return new SerializationContext(prefixMapping, bNodeMap) ;
    }
View Full Code Here

        IndentedWriter out = new IndentedWriter(System.out, lineNumbers) ;
       
        // Need to check if used.
        //PrefixMapping pmap = SSE.getDefaultPrefixMapWrite() ;
        PrefixMapping pmap = null ;
        SerializationContext sCxt = new SerializationContext(pmap) ;
        ItemWriter.write(out, item, sCxt) ;
        //item.output(out) ;
        out.ensureStartOfLine() ;
        out.flush();
    }
View Full Code Here

            throw new IllegalArgumentException("out may not be null") ;
        }
       
        if (sCxt == null)
        {
            sCxt = new SerializationContext();
        }
       
        this.out = out;
        this.sCxt = sCxt;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.serializer.SerializationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.