Package org.openjena.atlas

Examples of org.openjena.atlas.AtlasException


            if ( x == 0 )
                break ;
        }
       
        if ( x != 0 )
            throw new AtlasException("formatInt: overflow[x="+x+", width="+width+"]") ;
       
        while ( width > 0 )
        {
            b[idx] = '0' ;
            idx++ ;
View Full Code Here


        {
            blacklist = getInputIterator(firstSpillFile);
        }
        catch ( FileNotFoundException e )
        {
            throw new AtlasException("Cannot find the first spill file", e);
        }
       
        // TODO: Improve performance by making the superclass .iterator() use getNetSpillFiles()
        // instead of getSpillFiles() so it doesn't contain the contents of the first file
        Iterator<E> rest = super.iterator();
View Full Code Here

    public static boolean isEmpty(String filename)
    {
        File f = new File(filename) ;
        if ( f.exists() ) return true ;
        if ( f.isFile() ) return f.length() == 0 ;
        throw new AtlasException("Not a file") ;
    }
View Full Code Here

   
    /** Compile a mapping */
    static <T> int[] compileMapping(List<T> domain, List<T>range)
    {
        if ( domain.size() != range.size() )
            throw new AtlasException("Bad mapping: lengths not the same: "+domain+" -> "+range) ;
       
        int[] cols = new int[domain.size()] ;
        boolean[] mapped = new boolean[domain.size()] ;
        //Arrays.fill(mapped, false) ;
       
        for ( int i = 0 ; i < domain.size() ; i++ )
        {
            T input = domain.get(i) ;
            int j = range.indexOf(input) ;
            if ( j < 0 )
                throw new AtlasException("Bad mapping: missing mapping: "+domain+" -> "+range) ;
            if ( mapped[j] )
                throw new AtlasException("Bad mapping: duplicate: "+domain+" -> "+range) ;
            cols[i] = j ;
            mapped[j] = true ;
        }
        return cols ;
    }
View Full Code Here

            if ( logging && classLoader != null )
                log.trace("Using system classloader") ;
        }
       
        if ( classLoader == null )
            throw new AtlasException("Failed to find a classloader") ;
        return classLoader ;
    }
View Full Code Here

            if ( x == 0 )
                break ;
        }
       
        if ( x != 0 )
            throw new AtlasException("formatInt: overflow") ;
       
        while ( width > 0 )
        {
            b[idx] = '0' ;
            idx++ ;
View Full Code Here

    private BPlusTree createBPlusTreeIndex(String indexName, DataBag<Tuple<Long>> tuples) {
        deleteExistingBPlusTreeIndex(indexName) ;
       
      final int size = indexName.length() ;

      if ( ( size != 3 ) && ( size != 4 ) ) throw new AtlasException("Unsupported size.") ;
     
      final RecordFactory recordFactory ;
      if ( size == 3 ) {
        recordFactory = new RecordFactory(SystemTDB.LenIndexTripleRecord, 0) ;
      } else {
View Full Code Here

    }

    private void createBPlusTreeIndex(String indexName, final ColumnMap colMap, BPlusTree bpt) {
      final int size = indexName.length() ;

      if ( ( size != 3 ) && ( size != 4 ) ) throw new AtlasException("Unsupported size.") ;
     
      DataBag<Tuple<Long>> outTuples ;
      if ( size == 3 ) {
        outTuples = new MultiThreadedSortedDataBag<Tuple<Long>>(getThresholdPolicy(tripleSerializationFactory), tripleSerializationFactory, comparator);
      } else {
View Full Code Here

   
    public static int getPropertyAsInteger(Properties properties, String key)
    {
        String x = properties.getProperty(key) ;
        if ( x == null )
            throw new AtlasException("No such property key: "+key) ;
        return Integer.parseInt(x) ;
    }
View Full Code Here

        String x = properties.getProperty(key) ;
        if ( x == null )
            return dftValue ;
        if ( x.equalsIgnoreCase("true") ) return true ;
        if ( x.equalsIgnoreCase("false") ) return true ;
        throw new AtlasException("Value '"+x+"'not recognized for "+key) ;
    }
View Full Code Here

TOP

Related Classes of org.openjena.atlas.AtlasException

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.