Package com.clarkparsia.sparqlowl.parser.antlr

Examples of com.clarkparsia.sparqlowl.parser.antlr.SparqlOwlTreeARQ


    final CommonTree t = (CommonTree) result.getTree();

    final CommonTreeNodeStream nodes = new CommonTreeNodeStream( t );
    nodes.setTokenStream( tokenStream );

    final SparqlOwlTreeARQ treeWalker = new SparqlOwlTreeARQ( nodes );

    try {
      treeWalker.query( query );
    } catch( RecognitionException e ) {
      throw new QueryParseException( format( "%s %s", treeWalker.getErrorHeader( e ),
          treeWalker.getErrorMessage( e, parser.getTokenNames() ) ), e.line,
          e.charPositionInLine );
    }

    return query;
  }
View Full Code Here


    final CommonTree t = (CommonTree) result.getTree();

    final CommonTreeNodeStream nodes = new CommonTreeNodeStream( t );
    nodes.setTokenStream( tokenStream );

    final SparqlOwlTreeARQ treeWalker = new SparqlOwlTreeARQ( nodes );

    try {
      treeWalker.query( query );
    } catch( RecognitionException e ) {
      throw new QueryParseException( format( "%s %s", treeWalker.getErrorHeader( e ),
          treeWalker.getErrorMessage( e, parser.getTokenNames() ) ), e.line,
          e.charPositionInLine );
    }

    return query;
  }
View Full Code Here

    CommonTree t = (CommonTree) result.getTree();

    CommonTreeNodeStream nodes = new CommonTreeNodeStream( t );
    nodes.setTokenStream( tokenStream );

    SparqlOwlTreeARQ treeWalker = new SparqlOwlTreeARQ( nodes );
    Query q = treeWalker.query( null );

    if( q.getPrefix( "rdf" ) == null )
      q.setPrefix( "rdf", RDF.getURI() );
    if( q.getPrefix( "rdfs" ) == null )
      q.setPrefix( "rdfs", RDFS.getURI() );
View Full Code Here

TOP

Related Classes of com.clarkparsia.sparqlowl.parser.antlr.SparqlOwlTreeARQ

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.