PrefixMapping pmap = PrefixMapping.Factory.create() ;
pmap.setNsPrefixes(ARQConstants.getGlobalPrefixMap()) ;
pmap.setNsPrefix("", "http://example/") ;
pmap.setNsPrefix("ex", "http://example/ns#") ;
Expr expr = ExprUtils.parse(exprStr, pmap) ;
if ( verbose )
System.out.print(expr.toString()+" => ") ;
if ( actionPrint )
{
if ( actionPrintSPARQL )
System.out.println(ExprUtils.fmtSPARQL(expr)) ;
if ( actionPrintPrefix )
WriterSSE.out(IndentedWriter.stdout, expr, new Prologue(pmap)) ;
continue ;
}
try {
if ( actionCopySubstitute )
{
Expr e = expr.copySubstitute(BindingFactory.create(), true) ;
System.out.println(e) ;
}
else
{
// Default action