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

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


    {
        Prologue prologue = request ;
        if ( ! request.explicitlySetBaseURI() )
            prologue = new Prologue(request.getPrefixMapping(), (IRIResolver)null) ;
       
        SerializationContext sCxt = new SerializationContext(prologue, new NodeToLabelMapBNode()) ;
        output(request, out, sCxt);
    }
View Full Code Here


   
    public final String asUnquotedString()
    { return asString() ; }

    public final String asQuotedString()
    { return asQuotedString(new SerializationContext()) ; }
View Full Code Here

   
    @Override
    public String toString() {
        IndentedLineBuffer out = new IndentedLineBuffer() ;

        SerializationContext sCxt = SSE.sCxt((SSE.defaultPrefixMapWrite)) ;

        boolean first = true ;
        for (Quad quad : quads) {
            if ( !first )
                out.print(" ") ;
View Full Code Here

   
    //static final String notThere = "<<unset>>" ;
    static final String notThere = " " ;
   
    public TextOutput(Prologue prologue)
    { context = new SerializationContext(prologue) ; }
View Full Code Here

   
    public TextOutput(Prologue prologue)
    { context = new SerializationContext(prologue) ; }
   
    public TextOutput(PrefixMapping pMap)
    { context = new SerializationContext(pMap) ; }
View Full Code Here

   
    private LangRIOT setupParser(Tokenizer tokenizer, Lang language, ErrorHandler errorHandler, final ServletOutputStream outStream)
    {
        Sink<Quad> sink = new Sink<Quad>()
        {
            SerializationContext sCxt = new SerializationContext() ;
            @Override
            public void send(Quad quad)
            {
                // Clean up!
                StringBuilder sb = new StringBuilder() ;
View Full Code Here

        BasicPattern basicPattern = new BasicPattern() ;
        basicPattern.add(getTriple()) ;
        basicPattern.add(getTriple2()) ;
        ByteArrayOutputStream os = new ByteArrayOutputStream() ;
        IndentedWriter iw = new IndentedWriter(os) ;
        SerializationContext sc = new SerializationContext() ;
        FmtUtils.formatPattern(iw, basicPattern, sc) ;
        iw.close() ;
        assertEquals("<n1> <n2> \"l3\" .\n" + "<nb1> <nb2> \"lb3\" .", new String(os.toByteArray())) ;
    }
View Full Code Here

    }

    public static final String aUri = "http://www.zz.org/xx#" ;

    private SerializationContext getContext() {
        return new SerializationContext(getPrefixMapping()) ;
    }
View Full Code Here

        return new SerializationContext(prefixMapping, bNodeMap) ;
    }
   
    private static SerializationContext newSerializationContext(Prologue prologue)
    {
        return new SerializationContext(prologue, bNodeMap) ;
    }
View Full Code Here

    public SinkQuadBracedOutput(IndentedWriter out, SerializationContext sCxt) {
        if ( out == null ) { 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.