Package org.apache.jena.atlas

Examples of org.apache.jena.atlas.AtlasException


                    for (Iterator<E> it : inputs)
                    {
                        Iter.close(it);
                    }
                   
                    throw new AtlasException("Cannot find one of the spill files", e);
                }
            }
           
            SpillSortIterator<E> ssi = new SpillSortIterator<E>(inputs, comparator);
            registerCloseableIterator(ssi);
View Full Code Here


                memory = new ArrayList<E>() ;
            }
        }
        catch (IOException e)
        {
            throw new AtlasException(e) ;
        }
    }
View Full Code Here

    {
        try
        {
            InputStream details = new FileInputStream(file) ;
            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
        } catch (Exception ex) { throw new AtlasException(ex) ; }
    }
View Full Code Here

        try
        {
            InputStream details = new ByteArrayInputStream(defaultProperties.getBytes("UTF-8")) ;
            java.util.logging.LogManager.getLogManager().readConfiguration(details) ;
           
        } catch (Exception ex) { throw new AtlasException(ex) ; }
    }
View Full Code Here

   
    /** Convert an IRI to a filename */
    public static String IRIToFilename(String iri)
    {
        if ( ! iri.startsWith("file:") )
            throw new AtlasException("Not a file: URI: "+iri) ;
       
        String fn ;
        if ( iri.startsWith("file:///") )
            fn = iri.substring("file://".length()) ;
        else
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

   
    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

   
    public static Boolean getPropertyAsBoolean(Properties properties, String key)
    {
        String x = properties.getProperty(key) ;
        if ( x == null )
            throw new AtlasException("No such property key: "+key) ;
        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

    {
        String msg = String.format("Inconsistent: key=%s value=%s expected=%s",
                                   key,
                                   (actual==null?"<null>":actual),
                                   (expected==null?"<null>":expected) ) ;
        throw new AtlasException(msg) ;
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.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.