Package com.hp.hpl.jena.sparql.core

Examples of com.hp.hpl.jena.sparql.core.Prologue


   
    public SerializationContext(Prologue prologue, NodeToLabelMap bMap)
    {
        this.prologue = prologue ;
        if ( this.prologue == null )
            this.prologue = new Prologue() ;
       
        bNodeMap = bMap ;
        if ( bMap == null )
            bNodeMap = new NodeToLabelMap("b", false) ;
    }
View Full Code Here


   
    private void parse(String string) { parse(string, true) ; }
   
    private void parse(String string, boolean expectLegal)
    {
        Prologue prologue = new Prologue(pmap) ;
        Path p = null ;
        try {
            p = PathParser.parse(string, prologue) ;
//            System.out.println(string+" ==> "+p.toString(new Prologue(pmap))) ;
//            System.out.println(PathWriterSSE.asString(p, new Prologue(pmap))) ;
View Full Code Here

    }
   
   
    private static void parse(String path1, String path2)
    {
        Prologue prologue = new Prologue(pmap) ;
        Path p1 = PathParser.parse(path1, prologue) ;
        Path p2 = PathParser.parse(path2, prologue) ;
        assertEquals(p1, p2) ;
    }
View Full Code Here

   
    public static void outputResultSet(ResultSet results, Prologue prologue, ResultsFormat outputFormat)
    {
        boolean done = false ;
        if ( prologue == null )
            prologue = new Prologue(globalPrefixMap) ;

        if ( outputFormat.equals(ResultsFormat.FMT_UNKNOWN) )
            outputFormat = ResultsFormat.FMT_TEXT ;
       
        if ( outputFormat.equals(ResultsFormat.FMT_NONE) ||
View Full Code Here

   
    private static ParseHandler createParseHandler(PrefixMapping pmap)
    {
        if ( useResolver )
        {
            Prologue prologue = new Prologue(pmap) ;
            return new ParseHandlerResolver(prologue) ;
        }
        else
            return new ParseHandlerPlain() ;
    }
View Full Code Here

   
    // -- Convenience static methods -----------------------
   
    public static void output(UpdateRequest request, IndentedWriter out)
    {
        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

        DatasetGraph dsg = desc.dataset ;
       
        if ( dsg instanceof DatasetGraphTDB )
        {
            PrefixMapping pmap = ((DatasetGraphTDB)dsg).getPrefixes().getPrefixMapping() ;
            Prologue prologue = new Prologue(pmap) ;
            IndentedLineBuffer buff = new IndentedLineBuffer() ;
            PrologueSerializer.output(buff, prologue) ;
            buff.append("\n") ;
            return buff.asString() ;
        }
View Full Code Here

                if ( actionPrint )
                {
                    if ( actionPrintSPARQL )
                        System.out.println(ExprUtils.fmtSPARQL(expr)) ;
                    if ( actionPrintPrefix )
                        WriterSSE.out(IndentedWriter.stdout, expr, new Prologue(pmap)) ;
                    continue ;
                }
               
                try {
                    if ( actionCopySubstitute )
View Full Code Here

   
    private void parse(String string) { parse(string, true) ; }
   
    private void parse(String string, boolean expectLegal)
    {
        Prologue prologue = new Prologue(pmap) ;
        Path p = null ;
        try {
            p = PathParser.parse(string, prologue) ;
//            System.out.println(string+" ==> "+p.toString(new Prologue(pmap))) ;
//            System.out.println(PathWriterSSE.asString(p, new Prologue(pmap))) ;
View Full Code Here

    }
   
   
    private static void parse(String path1, String path2)
    {
        Prologue prologue = new Prologue(pmap) ;
        Path p1 = PathParser.parse(path1, prologue) ;
        Path p2 = PathParser.parse(path2, prologue) ;
        assertEquals(p1, p2) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.Prologue

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.