Package arq.cmd

Examples of arq.cmd.CmdException


    // Two forms : with and without arg.
    // Maximises similarity with other tools.
    String file;
    if (super.contains(assemblerDescDecl)) {
      if (getValues(assemblerDescDecl).size() != 1)
        throw new CmdException("Multiple assembler descriptions given");
      if (getPositional().size() != 0)
        throw new CmdException(
            "Additional assembler descriptions given");
      file = getValue(assemblerDescDecl);
    } else {
      if (getNumPositional() != 1)
        throw new CmdException("Multiple assembler descriptions given");
      file = getPositionalArg(0);
    }

    if (file == null)
      throw new CmdException("No dataset specified");
    // Assumes a single test daatset description in the assembler file.
    Dataset ds = SpatialDatasetFactory.create(file);
    if (ds == null)
      throw new CmdException("No dataset description found");
    // get index.
    dataset = (DatasetGraphSpatial) (ds.asDatasetGraph());
    spatialIndex = dataset.getSpatialIndex();
    if (spatialIndex == null)
      throw new CmdException("Dataset has no text index");
   
    context= new SpatialIndexContext(spatialIndex);
  }
View Full Code Here


   
    @Override
    protected void processModulesAndArgs()
    {
        if ( ! hasPositional() )
            throw new CmdException("No manifest file") ;
        createEarlReport = contains(earlDecl) ;
    }
View Full Code Here

                SDBConnection.logSQLQueries = true ;
                SDBConnection.logSQLStatements = true ;
                continue ;
            }
           
            throw new CmdException("Not recognized as a log form: "+v) ;
        }
    }
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

    @Override
    protected void processModulesAndArgs()
    {
        if ( getNumPositional() > )
            throw new CmdException("No position arguments (specify DB in spec file or with --dbName DB") ;
    }
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

    {
        for ( String s : args )
        {
            String[] frags = s.split("=", 2) ;
            if ( frags.length != 2)
                throw new CmdException("Can't split '"+s+"'") ;
            params.put(frags[0], frags[1] ) ;
        }
    }
View Full Code Here

    // Subclass for specialised commands making common updates more convenient
    @Override
    protected void execUpdate(GraphStore graphStore)
    {
        if ( requestFiles.size() == 0 && getPositional().size() == 0 )
            throw new CmdException("Nothing to do") ;
    
        Transactional transactional = (graphStore instanceof Transactional ) ? (Transactional)graphStore : new TransactionalNull() ;
       
        for ( Iterator<String> iter = requestFiles.iterator() ; iter.hasNext() ; )
        {
View Full Code Here

    }
       
    @Override
    protected void processModulesAndArgs()
    {
        if ( !super.contains(argLocation) ) throw new CmdException("Required: --loc DIR") ;
       
        locationString   = super.getValue(argLocation) ;
        location = new Location(locationString) ;

        if ( super.hasArg(argSpillSize) )
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.