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

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


  /**
   * Appends a Node to the command text as a constant using appropriate formatting
   * @param n Node to append
   */
  public void appendNode(Node n) {
    SerializationContext context = new SerializationContext(this.prefixes);
    context.setBaseIRI(this.baseUri);
    this.cmd.append(FmtUtils.stringForNode(n, context));
  }
View Full Code Here


  public String toString()
  {
    String command = this.cmd.toString();
   
    //First Inject Parameters
    SerializationContext context = new SerializationContext(this.prefixes);
    context.setBaseIRI(this.baseUri);
    Iterator<String> vars = this.params.keySet().iterator();
    while (vars.hasNext())
    {
      String var = vars.next();
     
View Full Code Here

        output(outStream, query, op, lineNumbers) ;
    }
   
    private void output(ServletOutputStream outStream, Query query, final Op op, boolean lineNumbers) throws IOException
    {
        final SerializationContext sCxt = new SerializationContext(query) ;
        Content c = new Content(){
            @Override
            public void print(IndentedWriter out)
            {  op.output(out, sCxt) ; }
        } ;
View Full Code Here

        PrefixMapping pmap = new PrefixMappingImpl() ;
        pmap.setNsPrefixes(SSE.defaultPrefixMapWrite) ;
//        pmap.setNsPrefix("ppi", "http://landregistry.data.gov.uk/def/ppi/") ;
//        pmap.setNsPrefix("common", "http://landregistry.data.gov.uk/def/common/") ;
       
        SerializationContext sCxt = SSE.sCxt(pmap) ;
       
        boolean first = true ;
        for ( Triple t : bgp )
        {
            if ( !first )
View Full Code Here

    }
       
    public static void write(IndentedWriter out, Graph graph)
    {
        WriterGraph.output(out, graph,
                           new SerializationContext(graph.getPrefixMapping())) ;
        out.ensureStartOfLine() ;
    }
View Full Code Here

        iOut.flush();
    }
       
    public static void write(IndentedWriter out, Model model)
    {
        WriterGraph.output(out, model.getGraph(), new SerializationContext(model)) ;
    }
View Full Code Here

    /** Return a SerializationContext appropriate for the graph */
    public static SerializationContext sCxt(Graph graph)
    {
        if ( graph != null )
            return sCxt(graph.getPrefixMapping()) ;
        return new SerializationContext() ;
   
View Full Code Here

   
    /** Return a SerializationContext appropriate for the prfix mapping */
    public static SerializationContext sCxt(PrefixMapping pmap)
    {
        if ( pmap != null )
            return new SerializationContext(pmap) ;
        return new SerializationContext() ;
   
View Full Code Here

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

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

        return sCxt(ARQConstants.getGlobalPrefixMap()) ;
    }
   
    public static SerializationContext sCxt(PrefixMapping pmap)
    {
        return new SerializationContext(pmap) ;
    }
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.