Package arq.cmd

Examples of arq.cmd.CmdException


            else if ( arg.equalsIgnoreCase("opt"))      { printOpt = true ; }
            else if ( arg.equalsIgnoreCase("optquad"))  { printQuadOpt = true ; }
            else if ( arg.equalsIgnoreCase("quadopt"))  { printQuadOpt = true ; }
            else if ( arg.equalsIgnoreCase("none"))     { printNone = true ; }
            else
                throw new CmdException("Not a recognized print form: "+arg+" : Choices are: query, op, quad, opt, optquad") ;
        }
       
        if ( ! printQuery && ! printOp && ! printQuad && ! printPlan && ! printOpt && ! printQuadOpt && ! printNone )
            printQuery = true ;
    }
View Full Code Here


            ex.printStackTrace(System.err) ;
        }
        catch (QueryException qEx)
        {
            //System.err.println(qEx.getMessage()) ;
            throw new CmdException("Query Exeception", qEx) ;
        }
        catch (JenaException ex) {
            ex.printStackTrace() ;
            throw ex ; }
        catch (CmdException ex) { throw ex ; }
        catch (Exception ex)
        {
            throw new CmdException("Exception", ex) ;
        }
    }
View Full Code Here

        if ( cmdLine.contains(argSyntax) ) {
            String syntax = cmdLine.getValue(argSyntax) ;
            Lang lang$ = RDFLanguages.nameToLang(syntax) ;
            if ( lang$ == null )
                throw new CmdException("Can not detemine the synatx from '" + syntax + "'") ;
            this.lang = lang$ ;
        }

        if ( cmdLine.contains(argCheck) )
            explicitCheck = true ;

        if ( cmdLine.contains(argNoCheck) )
            explicitNoCheck = true ;

        if ( cmdLine.contains(argStrict) )
            strict = true ;

        if ( cmdLine.contains(argSkip) )
            skipOnBadTerm = true ;
        if ( cmdLine.contains(argNoSkip) )
            skipOnBadTerm = false ;

        if ( cmdLine.contains(argBase) ) {
            baseIRI = cmdLine.getValue(argBase) ;
            IRI iri = IRIResolver.resolveIRI(baseIRI) ;
            if ( iri.hasViolation(false) )
                throw new CmdException("Bad base IRI: " + baseIRI) ;
            if ( !iri.isAbsolute() )
                throw new CmdException("Base IRI must be an absolute IRI: " + baseIRI) ;
        }

        if ( cmdLine.contains(argStop) )
            stopOnBadTerm = true ;

        if ( cmdLine.contains(argSink) )
            bitbucket = true ;

        if ( cmdLine.contains(argRDFS) ) {
            try {
                rdfsVocabFilename = cmdLine.getArg(argRDFS).getValue() ;
                rdfsVocab = FileManager.get().loadModel(rdfsVocabFilename) ;
            } catch (RiotException ex) {
                throw new CmdException("Error in RDFS vocabulary: " + rdfsVocabFilename) ;
            } catch (Exception ex) {
                throw new CmdException("Error: " + ex.getMessage()) ;
            }
        }
    }
View Full Code Here

                    try {
                        // Stderr?
                        queryString = FileUtils.readWholeFileAsUTF8(System.in) ;
                        // And drop into next if
                    } catch (IOException ex) {
                        throw new CmdException("Error reading stdin", ex) ;
                    }
                } else {
                    query = QueryFactory.read(queryFilename, baseURI, getQuerySyntax()) ;
                    return query ;
                }
View Full Code Here

        NodeTupleTable nodeTupleTableTriples = dsg.getTripleTable().getNodeTupleTable() ;
        NodeTupleTable nodeTupleTableQuads = dsg.getQuadTable().getNodeTupleTable() ;

        if ( nodeTupleTableTriples.getNodeTable() != nodeTupleTableQuads.getNodeTable() )
            throw new CmdException("Different node tables for triples and quads") ;

        NodeTable nodeTable = nodeTupleTableTriples.getNodeTable() ;
        // V special.
        Set<NodeTable> dumpedNodeTables = new HashSet<NodeTable> () ;
View Full Code Here

   
    @Override
    protected void processModulesAndArgs()
    {
        if ( getNumPositional() > )
            throw new CmdException("No position arguments (specify DB in spec file or with --dbName DB") ;
        if ( ! super.contains(argDeclConfirm) )
            throw new CmdException("Argument --confirm required") ;
    }
View Full Code Here

            else if ( arg.equalsIgnoreCase("Op"))       { printOp = true ; }
            else if ( arg.equalsIgnoreCase("SqlNode"))  { printSqlNode = true ; }
            else if ( arg.equalsIgnoreCase("sql"))      { printSQL = true ; }
            else if ( arg.equalsIgnoreCase("plan"))     { printPlan = true ; }
            else
                throw new CmdException("Not a recognized print form: "+arg+" : Choices are: query, prefix, op, sqlNode, sql") ;
        }
    }
View Full Code Here

   
    @Override
    protected void processModulesAndArgs()
    {
        if ( getNumPositional() > )
            throw new CmdException("No position arguments (specify DB in spec file or with --dbName DB") ;
        if ( ! super.contains(argDeclConfirm) )
            throw new CmdException("Argument --confirm required") ;
    }
View Full Code Here

    }
   
    private void execPut(StoreConfig conf, String tag, List<String> positionalArgs)
    {
        if ( positionalArgs.size() == 0 )
            throw new CmdException("No file to load") ;
       
        Model model = conf.getModel(tag) ;
        if ( model == null )
            model = ModelFactory.createDefaultModel() ;
        for ( String filename : positionalArgs)
View Full Code Here

        NodeTupleTable nodeTupleTableTriples = dsg.getTripleTable().getNodeTupleTable() ;
        NodeTupleTable nodeTupleTableQuads = dsg.getQuadTable().getNodeTupleTable() ;

        if ( nodeTupleTableTriples.getNodeTable() != nodeTupleTableQuads.getNodeTable() )
            throw new CmdException("Different node tables for triples and quads") ;

        NodeTable nodeTable = nodeTupleTableTriples.getNodeTable() ;
        // V special.
        Set<NodeTable> dumpedNodeTables = new HashSet<NodeTable> () ;
View Full Code Here

TOP

Related Classes of arq.cmd.CmdException

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.