Package org.openjena.atlas

Examples of org.openjena.atlas.AtlasException


   
    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

        this.finished = false;
    }
   
    private void checkFinished()
    {
        if (finished) throw new AtlasException("IteratorResourceClosing is closed, no further operations can be performed on it.") ;
    }
View Full Code Here

    }
   
    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

    {
        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

        this.comparator = comparator;
    }
   
    protected void checkClosed()
    {
        if (closed) throw new AtlasException("SortedDataBag is closed, no operations can be performed on it.") ;
    }
View Full Code Here

    @Override
    public void add(E item)
    {
        checkClosed();
        if (finishedAdding)
            throw new AtlasException("SortedDataBag: Cannot add any more items after the writing phase is complete.");
       
        if (policy.isThresholdExceeded())
        {
            spill();
        }
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.